diff --git a/sdk/loadtesting/azure-developer-loadtesting/spotbugs-exclude.xml b/sdk/loadtesting/azure-developer-loadtesting/spotbugs-exclude.xml
deleted file mode 100644
index 36fd7768cc86f..0000000000000
--- a/sdk/loadtesting/azure-developer-loadtesting/spotbugs-exclude.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
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 7a6f4d47dc965..1e9d3b46e7273 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) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
package com.azure.developer.loadtesting;
import com.azure.core.annotation.Generated;
@@ -12,56 +13,54 @@
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
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.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.core.util.polling.PollerFlux;
-import com.azure.developer.loadtesting.implementation.LoadTestAdministrationsImpl;
-import java.time.Duration;
+import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper;
+import com.azure.developer.loadtesting.implementation.LoadTestAdministrationClientImpl;
+import com.azure.developer.loadtesting.models.TestProfile;
+import java.time.OffsetDateTime;
+import java.util.stream.Collectors;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/**
- * Initializes a new instance of the asynchronous LoadTestingClient type.
+ * Initializes a new instance of the asynchronous LoadTestAdministrationClient type.
*/
@ServiceClient(builder = LoadTestAdministrationClientBuilder.class, isAsync = true)
public final class LoadTestAdministrationAsyncClient {
-
- private static final ClientLogger LOGGER = new ClientLogger(LoadTestAdministrationAsyncClient.class);
-
@Generated
- private final LoadTestAdministrationsImpl serviceClient;
+ private final LoadTestAdministrationClientImpl serviceClient;
/**
* Initializes an instance of LoadTestAdministrationAsyncClient class.
- *
+ *
* @param serviceClient the service client implementation.
*/
@Generated
- LoadTestAdministrationAsyncClient(LoadTestAdministrationsImpl serviceClient) {
+ LoadTestAdministrationAsyncClient(LoadTestAdministrationClientImpl serviceClient) {
this.serviceClient = serviceClient;
}
/**
- * Configure server metrics for a test.
+ * 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
* {
+ * testProfileId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
* testId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
* }
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
@@ -76,18 +75,13 @@ public final class LoadTestAdministrationAsyncClient {
*
* {@code
* {
+ * testProfileId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
* testId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
* }
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
@@ -96,260 +90,31 @@ public final class LoadTestAdministrationAsyncClient {
* }
* }
*
- *
- * @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 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 server metrics configuration 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> createOrUpdateServerMetricsConfigWithResponse(String testId, BinaryData body,
+ public Mono> createOrUpdateTestProfileWithResponse(String testProfileId, 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));
- }
-
- /**
- * Get all test files.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param 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);
+ return this.serviceClient.createOrUpdateTestProfileWithResponseAsync(testProfileId, body, requestOptions);
}
/**
- * Create a new test or update an existing 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
+ * Delete a test profile.
*
- * Response Body Schema
+ * Delete a test profile by its test profile Id.
*
- *
- * {@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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param body Load test model.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return load test model along with {@link Response} on successful completion of {@link Mono}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> createOrUpdateTestWithResponse(String testId, BinaryData body,
- RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateTestWithResponseAsync(testId, body, requestOptions);
- }
-
- /**
- * Delete a test by its name.
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
+ * @param 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.
@@ -359,78 +124,27 @@ public Mono> createOrUpdateTestWithResponse(String testId,
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> deleteTestWithResponse(String testId, RequestOptions requestOptions) {
- return this.serviceClient.deleteTestWithResponseAsync(testId, requestOptions);
+ public Mono> deleteTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) {
+ return this.serviceClient.deleteTestProfileWithResponseAsync(testProfileId, requestOptions);
}
/**
- * Get load test details by test name.
+ * Get load test profile details.
+ *
+ * Get load test profile details by test profile 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
+ * testProfileId: String (Required)
* displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: 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)
@@ -438,39 +152,43 @@ public Mono> deleteTestWithResponse(String testId, RequestOptions
* }
* }
*
- *
- * @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 load test details by test name 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> getTestWithResponse(String testId, RequestOptions requestOptions) {
- return this.serviceClient.getTestWithResponseAsync(testId, requestOptions);
+ public Mono> getTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) {
+ return this.serviceClient.getTestProfileWithResponseAsync(testProfileId, requestOptions);
}
/**
- * Get all load tests by the fully qualified resource Id e.g
- * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.
+ * List test profiles.
+ *
+ * Get all test profiles for the given filters.
* Query Parameters
*
* Query Parameters
* Name | Type | Required | Description |
- * orderby | String | No | Sort on the supported fields in (field asc/desc) format. eg:
- * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime |
- * search | String | No | 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. |
- * lastModifiedStartTime | OffsetDateTime | No | Start DateTime(ISO 8601 literal format)
- * of the last updated time range to filter tests. |
- * lastModifiedEndTime | OffsetDateTime | No | End DateTime(ISO 8601 literal format) of
- * the last updated time range to filter tests. |
- * maxpagesize | Integer | No | Number of results in response. |
+ * maxpagesize | Integer | No | Maximum number of results to include in a single
+ * response. |
+ * lastModifiedStartTime | OffsetDateTime | No | Start DateTime(RFC 3339 literal format)
+ * of the last updated time range to filter test profiles. |
+ * lastModifiedEndTime | OffsetDateTime | No | End DateTime(RFC 3339 literal format) of
+ * the last updated time range to filter test profiles. |
+ * testProfileIds | String | No | Comma separated list of IDs of the test profiles to
+ * filter. |
+ * testIds | String | No | Comma separated list IDs of the tests which should be
+ * associated with the test profiles to fetch. |
*
* You can add these to a request with {@link RequestOptions#addQueryParam}
* Response Body Schema
@@ -478,67 +196,14 @@ public Mono> getTestWithResponse(String testId, RequestOpti
*
* {@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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
+ * testProfileId: String (Required)
* displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: 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)
@@ -546,295 +211,181 @@ 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.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return all load tests by the fully qualified resource Id e.g
- * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} as paginated
- * response with {@link PagedFlux}.
+ * @return paged collection of TestProfile items as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux listTests(RequestOptions requestOptions) {
- return this.serviceClient.listTestsAsync(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
- *
- *
- * Query Parameters
- *
- * Name |
- * Type |
- * Required |
- * Description |
- *
- *
- * fileType |
- * String |
- * No |
- * File type. Allowed values: "JMX_FILE", "USER_PROPERTIES", "ADDITIONAL_ARTIFACTS". |
- *
- *
- *
- * You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- *
- * Request Body Schema
- *
- *
- * {@code
- * BinaryData
- * }
- *
- *
- *
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param fileName Unique name for test file with file extension like : App.jmx.
- * @param body The file content as application/octet-stream.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return file info along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono> uploadTestFileWithResponse(String testId, String fileName, BinaryData body,
- RequestOptions requestOptions) {
- return this.serviceClient.uploadTestFileWithResponseAsync(testId, fileName, body, requestOptions);
+ public PagedFlux listTestProfiles(RequestOptions requestOptions) {
+ return this.serviceClient.listTestProfilesAsync(requestOptions);
}
/**
- * Get test file by the file name.
- * Response Body Schema
+ * Create a new test profile or update an existing test profile.
*
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param fileName File name with file extension like app.jmx.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
- * @return test file by the file name along with {@link Response} on successful completion of {@link Mono}.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test Profile Model 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);
+ public Mono createOrUpdateTestProfile(String testProfileId, TestProfile body) {
+ // Generated convenience method for createOrUpdateTestProfileWithResponse
+ 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)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class));
}
/**
- * Delete file by the file name for a test.
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param fileName File name with file extension like app.jmx.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @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> deleteTestFileWithResponse(String testId, String fileName,
- RequestOptions requestOptions) {
- return this.serviceClient.deleteTestFileWithResponseAsync(testId, fileName, requestOptions);
+ public Mono deleteTestProfile(String testProfileId) {
+ // Generated convenience method for deleteTestProfileWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteTestProfileWithResponse(testProfileId, requestOptions).flatMap(FluxUtil::toMono);
}
/**
- * Associate an app component (collection of azure resources) to a test.
- * Request Body Schema
+ * Get load test profile details.
*
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
+ * Get load test profile details by test profile Id.
*
- * Response Body Schema
- *
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param body App Component model.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @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.
- * @return test app component along with {@link Response} on successful completion of {@link Mono}.
+ * @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}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> createOrUpdateAppComponentsWithResponse(String testId, BinaryData body,
- RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateAppComponentsWithResponseAsync(testId, body, requestOptions);
+ 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));
}
/**
- * Get associated app component (collection of azure resources) for the given test.
- * Response Body Schema
+ * List test profiles.
*
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
- * @return associated app component (collection of azure resources) for the given test along with {@link Response}
- * on successful completion of {@link Mono}.
+ * @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.SINGLE)
- public Mono> getAppComponentsWithResponse(String testId, RequestOptions requestOptions) {
- return this.serviceClient.getAppComponentsWithResponseAsync(testId, requestOptions);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestProfiles(OffsetDateTime lastModifiedStartTime,
+ OffsetDateTime lastModifiedEndTime, String testProfileIds, String 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, false);
+ }
+ if (testIds != null) {
+ requestOptions.addQueryParam("testIds", testIds, 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(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
}
/**
- * List server metrics configuration for the given test.
- * Response Body Schema
+ * List test profiles.
+ *
+ * Get all test profiles for the given filters.
*
- *
- * {@code
- * {
- * testId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
- * }
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param 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}.
+ * @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.SINGLE)
- public Mono> getServerMetricsConfigWithResponse(String testId, RequestOptions requestOptions) {
- return this.serviceClient.getServerMetricsConfigWithResponseAsync(testId, requestOptions);
+ @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));
+ });
}
}
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 55fdab103fbd3..e69f4491e7a01 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) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
package com.azure.developer.loadtesting;
import com.azure.core.annotation.Generated;
@@ -15,51 +16,44 @@
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.LoadTestAdministrationsImpl;
-import java.time.Duration;
+import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper;
+import com.azure.developer.loadtesting.models.TestProfile;
+import java.time.OffsetDateTime;
/**
- * Initializes a new instance of the synchronous LoadTestingClient type.
+ * Initializes a new instance of the synchronous LoadTestAdministrationClient type.
*/
@ServiceClient(builder = LoadTestAdministrationClientBuilder.class)
public final class LoadTestAdministrationClient {
-
- private static final ClientLogger LOGGER = new ClientLogger(LoadTestAdministrationClient.class);
-
@Generated
- private final LoadTestAdministrationsImpl serviceClient;
+ private final LoadTestAdministrationAsyncClient client;
/**
* Initializes an instance of LoadTestAdministrationClient class.
- *
- * @param serviceClient the service client implementation.
+ *
+ * @param client the async client.
*/
@Generated
- LoadTestAdministrationClient(LoadTestAdministrationsImpl serviceClient) {
- this.serviceClient = serviceClient;
+ LoadTestAdministrationClient(LoadTestAdministrationAsyncClient client) {
+ this.client = client;
}
/**
- * Configure server metrics for a test.
+ * 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
* {
+ * testProfileId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
* testId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
* }
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
@@ -74,18 +68,13 @@ public final class LoadTestAdministrationClient {
*
* {@code
* {
+ * testProfileId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
* testId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
* }
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
@@ -94,256 +83,31 @@ public final class LoadTestAdministrationClient {
* }
* }
*
- *
- * @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 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 server metrics configuration along with {@link Response}.
+ * @return test Profile Model along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateServerMetricsConfigWithResponse(String testId, BinaryData body,
+ public Response createOrUpdateTestProfileWithResponse(String testProfileId, 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());
- }
-
- /**
- * Get all test files.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param 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);
+ return this.client.createOrUpdateTestProfileWithResponse(testProfileId, body, requestOptions).block();
}
/**
- * Create a new test or update an existing 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
+ * Delete a test profile.
*
- * Response Body Schema
+ * Delete a test profile by its test profile Id.
*
- *
- * {@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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param body Load test model.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return load test model along with {@link Response}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateTestWithResponse(String testId, BinaryData body,
- RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateTestWithResponse(testId, body, requestOptions);
- }
-
- /**
- * Delete a test by its name.
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
+ * @param 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.
@@ -353,78 +117,27 @@ public Response createOrUpdateTestWithResponse(String testId, Binary
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteTestWithResponse(String testId, RequestOptions requestOptions) {
- return this.serviceClient.deleteTestWithResponse(testId, requestOptions);
+ public Response deleteTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) {
+ return this.client.deleteTestProfileWithResponse(testProfileId, requestOptions).block();
}
/**
- * Get load test details by test name.
+ * Get load test profile details.
+ *
+ * Get load test profile details by test profile 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
+ * testProfileId: String (Required)
* displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: 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)
@@ -432,39 +145,42 @@ public Response deleteTestWithResponse(String testId, RequestOptions reque
* }
* }
*
- *
- * @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 load test details by test name 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 getTestWithResponse(String testId, RequestOptions requestOptions) {
- return this.serviceClient.getTestWithResponse(testId, requestOptions);
+ public Response getTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) {
+ return this.client.getTestProfileWithResponse(testProfileId, requestOptions).block();
}
/**
- * Get all load tests by the fully qualified resource Id e.g
- * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.
+ * List test profiles.
+ *
+ * Get all test profiles for the given filters.
* Query Parameters
*
* Query Parameters
* Name | Type | Required | Description |
- * orderby | String | No | Sort on the supported fields in (field asc/desc) format. eg:
- * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime |
- * search | String | No | 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. |
- * lastModifiedStartTime | OffsetDateTime | No | Start DateTime(ISO 8601 literal format)
- * of the last updated time range to filter tests. |
- * lastModifiedEndTime | OffsetDateTime | No | End DateTime(ISO 8601 literal format) of
- * the last updated time range to filter tests. |
- * maxpagesize | Integer | No | Number of results in response. |
+ * maxpagesize | Integer | No | Maximum number of results to include in a single
+ * response. |
+ * lastModifiedStartTime | OffsetDateTime | No | Start DateTime(RFC 3339 literal format)
+ * of the last updated time range to filter test profiles. |
+ * lastModifiedEndTime | OffsetDateTime | No | End DateTime(RFC 3339 literal format) of
+ * the last updated time range to filter test profiles. |
+ * testProfileIds | String | No | Comma separated list of IDs of the test profiles to
+ * filter. |
+ * testIds | String | No | Comma separated list IDs of the tests which should be
+ * associated with the test profiles to fetch. |
*
* You can add these to a request with {@link RequestOptions#addQueryParam}
* Response Body Schema
@@ -472,67 +188,14 @@ public Response getTestWithResponse(String testId, RequestOptions re
*
* {@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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
+ * testProfileId: String (Required)
* displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: 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)
@@ -540,292 +203,141 @@ 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.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return all load tests by the fully qualified resource Id e.g
- * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} as paginated
- * response with {@link PagedIterable}.
+ * @return paged collection of TestProfile items as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listTests(RequestOptions requestOptions) {
- return this.serviceClient.listTests(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
- *
- *
- * Query Parameters
- *
- * Name |
- * Type |
- * Required |
- * Description |
- *
- *
- * fileType |
- * String |
- * No |
- * File type. Allowed values: "JMX_FILE", "USER_PROPERTIES", "ADDITIONAL_ARTIFACTS". |
- *
- *
- *
- * You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- *
- * Request Body Schema
- *
- *
- * {@code
- * BinaryData
- * }
- *
- *
- *
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param fileName Unique name for test file with file extension like : App.jmx.
- * @param body The file content as application/octet-stream.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return file info along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response uploadTestFileWithResponse(String testId, String fileName, BinaryData body,
- RequestOptions requestOptions) {
- return this.serviceClient.uploadTestFileWithResponse(testId, fileName, body, requestOptions);
+ public PagedIterable listTestProfiles(RequestOptions requestOptions) {
+ return new PagedIterable<>(this.client.listTestProfiles(requestOptions));
}
/**
- * Get test file by the file name.
- * Response Body Schema
+ * Create a new test profile or update an existing test profile.
*
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param fileName File name with file extension like app.jmx.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
- * @return test file by the file name along with {@link Response}.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test Profile Model.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) {
- return this.serviceClient.getTestFileWithResponse(testId, fileName, requestOptions);
+ public TestProfile createOrUpdateTestProfile(String testProfileId, TestProfile body) {
+ // Generated convenience method for createOrUpdateTestProfileWithResponse
+ 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);
}
/**
- * Delete file by the file name for a test.
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param fileName File name with file extension like app.jmx.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
- * @return the {@link Response}.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) {
- return this.serviceClient.deleteTestFileWithResponse(testId, fileName, requestOptions);
+ public void deleteTestProfile(String testProfileId) {
+ // Generated convenience method for deleteTestProfileWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteTestProfileWithResponse(testProfileId, requestOptions).getValue();
}
/**
- * Associate an app component (collection of azure resources) to a test.
- * Request Body Schema
+ * Get load test profile details.
*
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * Response Body Schema
+ * Get load test profile details by test profile Id.
*
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param body App Component model.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @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.
- * @return test app component along with {@link Response}.
+ * @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 Response createOrUpdateAppComponentsWithResponse(String testId, BinaryData body,
- RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateAppComponentsWithResponse(testId, body, requestOptions);
+ public TestProfile getTestProfile(String testProfileId) {
+ // Generated convenience method for getTestProfileWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTestProfileWithResponse(testProfileId, requestOptions).getValue().toObject(TestProfile.class);
}
/**
- * Get associated app component (collection of azure resources) for the given test.
- * Response Body Schema
+ * List test profiles.
*
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
- * @return associated app component (collection of azure resources) for the given test along with {@link Response}.
+ * @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.SINGLE)
- public Response getAppComponentsWithResponse(String testId, RequestOptions requestOptions) {
- return this.serviceClient.getAppComponentsWithResponse(testId, requestOptions);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTestProfiles(OffsetDateTime lastModifiedStartTime,
+ OffsetDateTime lastModifiedEndTime, String testProfileIds, String testIds) {
+ // Generated convenience method for listTestProfiles
+ return new PagedIterable<>(
+ client.listTestProfiles(lastModifiedStartTime, lastModifiedEndTime, testProfileIds, testIds));
}
/**
- * List server metrics configuration for the given test.
- * Response Body Schema
+ * List test profiles.
+ *
+ * Get all test profiles for the given filters.
*
- *
- * {@code
- * {
- * testId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
- * }
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param 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}.
+ * @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.SINGLE)
- public Response getServerMetricsConfigWithResponse(String testId, RequestOptions requestOptions) {
- return this.serviceClient.getServerMetricsConfigWithResponse(testId, requestOptions);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTestProfiles() {
+ // Generated convenience method for listTestProfiles
+ return new PagedIterable<>(client.listTestProfiles());
}
}
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 03c74af38b25b..12dd46f6138a6 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) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
package com.azure.developer.loadtesting;
import com.azure.core.annotation.Generated;
@@ -33,7 +34,7 @@
import com.azure.core.util.builder.ClientBuilderUtil;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.serializer.JacksonAdapter;
-import com.azure.developer.loadtesting.implementation.LoadTestingClientImpl;
+import com.azure.developer.loadtesting.implementation.LoadTestAdministrationClientImpl;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -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;
@@ -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.
*/
@@ -246,21 +250,28 @@ public LoadTestAdministrationClientBuilder retryPolicy(RetryPolicy retryPolicy)
}
/**
- * Builds an instance of LoadTestingClientImpl with the provided parameters.
- *
- * @return an instance of LoadTestingClientImpl.
+ * Builds an instance of LoadTestAdministrationClientImpl with the provided parameters.
+ *
+ * @return an instance of LoadTestAdministrationClientImpl.
*/
@Generated
- private LoadTestingClientImpl buildInnerClient() {
+ private LoadTestAdministrationClientImpl buildInnerClient() {
this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
LoadTestingServiceVersion localServiceVersion
= (serviceVersion != null) ? serviceVersion : LoadTestingServiceVersion.getLatest();
- LoadTestingClientImpl client = new LoadTestingClientImpl(localPipeline,
+ LoadTestAdministrationClientImpl client = new LoadTestAdministrationClientImpl(localPipeline,
JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion);
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,34 +312,23 @@ private HttpPipeline createHttpPipeline() {
/**
* Builds an instance of LoadTestAdministrationAsyncClient class.
- *
+ *
* @return an instance of LoadTestAdministrationAsyncClient.
*/
@Generated
public LoadTestAdministrationAsyncClient buildAsyncClient() {
- return new LoadTestAdministrationAsyncClient(buildInnerClient().getLoadTestAdministrations());
+ return new LoadTestAdministrationAsyncClient(buildInnerClient());
}
/**
* Builds an instance of LoadTestAdministrationClient class.
- *
+ *
* @return an instance of LoadTestAdministrationClient.
*/
@Generated
public LoadTestAdministrationClient buildClient() {
- return new LoadTestAdministrationClient(buildInnerClient().getLoadTestAdministrations());
+ return new LoadTestAdministrationClient(new LoadTestAdministrationAsyncClient(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 bfafcd59881bd..9d01e002690c5 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) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
package com.azure.developer.loadtesting;
import com.azure.core.annotation.Generated;
@@ -11,56 +12,82 @@
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;
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.FluxUtil;
-import com.azure.core.util.polling.PollerFlux;
-import com.azure.developer.loadtesting.implementation.LoadTestRunsImpl;
-import java.time.Duration;
+import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper;
+import com.azure.developer.loadtesting.implementation.LoadTestRunClientImpl;
+import com.azure.developer.loadtesting.models.TestProfileRun;
+import java.time.OffsetDateTime;
+import java.util.stream.Collectors;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/**
- * Initializes a new instance of the asynchronous LoadTestingClient type.
+ * Initializes a new instance of the asynchronous LoadTestRunClient type.
*/
@ServiceClient(builder = LoadTestRunClientBuilder.class, isAsync = true)
public final class LoadTestRunAsyncClient {
-
@Generated
- private final LoadTestRunsImpl serviceClient;
+ private final LoadTestRunClientImpl serviceClient;
/**
* Initializes an instance of LoadTestRunAsyncClient class.
- *
+ *
* @param serviceClient the service client implementation.
*/
@Generated
- LoadTestRunAsyncClient(LoadTestRunsImpl serviceClient) {
+ LoadTestRunAsyncClient(LoadTestRunClientImpl serviceClient) {
this.serviceClient = serviceClient;
}
/**
- * Configure server metrics for a test run.
+ * 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
*
*
* {@code
* {
- * testRunId: String (Optional)
- * metrics (Optional): {
+ * 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){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
* String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: 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)
@@ -74,19 +101,40 @@ public final class LoadTestRunAsyncClient {
*
* {@code
* {
- * testRunId: String (Optional)
- * metrics (Optional): {
+ * 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){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
* String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: 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)
@@ -94,281 +142,88 @@ public final class LoadTestRunAsyncClient {
* }
* }
*
- *
- * @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 testProfileRunId Unique identifier for the test profile 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 test run server metrics configuration along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return test Profile Run model along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> createOrUpdateServerMetricsConfigWithResponse(String testRunId, BinaryData body,
+ public Mono> createOrUpdateTestProfileRunWithResponse(String testProfileRunId, BinaryData body,
RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateServerMetricsConfigWithResponseAsync(testRunId, body, requestOptions);
+ return this.serviceClient.createOrUpdateTestProfileRunWithResponseAsync(testProfileRunId, 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 testRunId} 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));
- }
-
- /**
- * Associate an app component (collection of azure resources) to a test run.
- * Request Body Schema
- *
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testRunId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
+ * Delete an existing load test profile run.
*
- * Response Body Schema
+ * Delete an existing load test profile run by providing the test profile run Id.
*
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testRunId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param body App Component model.
+ * @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 run app component 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> createOrUpdateAppComponentsWithResponse(String testRunId, BinaryData body,
+ public Mono> deleteTestProfileRunWithResponse(String testProfileRunId,
RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateAppComponentsWithResponseAsync(testRunId, body, requestOptions);
+ return this.serviceClient.deleteTestProfileRunWithResponseAsync(testProfileRunId, requestOptions);
}
/**
- * List the metric values for a load test run.
- *
- *
- * Query Parameters
- *
- *
- * Query Parameters
- *
- * Name |
- * Type |
- * Required |
- * Description |
- *
- *
- * aggregation |
- * String |
- * No |
- * The aggregation |
- *
- *
- * interval |
- * String |
- * No |
- * The 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
- *
+ * Get test profile run details.
+ *
+ * Get test profile run details by test profile run Id.
+ *
Response Body Schema
+ *
*
* {@code
* {
- * filters (Optional): [
+ * 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){
- * name: String (Optional)
- * values (Optional): [
- * String (Optional)
- * ]
+ * message: String (Optional)
* }
* ]
- * }
- * }
- *
- *
- *
- * Response Body Schema
- *
- *
- * {@code
- * {
- * value (Optional): [
+ * 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){
- * data (Optional): [
- * (Optional){
- * timestamp: String (Optional)
- * value: Double (Optional)
- * }
- * ]
- * dimensionValues (Optional): [
- * (Optional){
- * name: String (Optional)
- * value: String (Optional)
- * }
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
* ]
* }
* ]
- * nextLink: String (Optional)
- * }
- * }
- *
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param 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);
- }
-
- /**
- * List the dimension values for the given metric dimension name.
- * Query Parameters
- *
- * Query Parameters
- * Name | Type | Required | Description |
- * interval | String | No | The 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);
- }
-
- /**
- * Get associated app component (collection of azure resources) for the given test run.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testRunId: String (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -376,308 +231,95 @@ public PagedFlux listMetricDimensionValues(String testRunId, String
* }
* }
*
- *
- * @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);
- }
-
- /**
- * List server metrics configuration for the given test run.
- * Response Body Schema
*
- *
- * {@code
- * {
- * testRunId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
- * }
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ * @param 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 run server metrics configuration along with {@link Response} on successful completion of
+ * @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}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getServerMetricsConfigWithResponse(String testRunId,
+ public Mono> getTestProfileRunWithResponse(String testProfileRunId,
RequestOptions requestOptions) {
- return this.serviceClient.getServerMetricsConfigWithResponseAsync(testRunId, requestOptions);
+ return this.serviceClient.getTestProfileRunWithResponseAsync(testProfileRunId, requestOptions);
}
/**
- * Create and start a new test run with the given name.
- *
- *
- * Query Parameters
- *
+ * List test profile runs.
+ *
+ * Get all test profile runs for the given filters.
+ *
Query Parameters
*
* Query Parameters
- *
- * Name |
- * Type |
- * Required |
- * Description |
- *
- *
- * oldTestRunId |
- * String |
- * No |
- * 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. |
- *
+ * Name | Type | Required | Description |
+ * maxpagesize | Integer | No | Maximum number of results to include in a single
+ * response. |
+ * minStartDateTime | OffsetDateTime | No | Minimum Start DateTime(RFC 3339 literal
+ * format) of the test profile runs to filter on. |
+ * maxStartDateTime | OffsetDateTime | No | Maximum Start DateTime(RFC 3339 literal
+ * format) of the test profile runs to filter on. |
+ * minEndDateTime | OffsetDateTime | No | Minimum End DateTime(RFC 3339 literal format) of
+ * the test profile runs to filter on. |
+ * maxEndDateTime | OffsetDateTime | No | Maximum End DateTime(RFC 3339 literal format) of
+ * the test profile runs to filter on. |
+ * createdDateStartTime | OffsetDateTime | No | Start DateTime(RFC 3339 literal format) of
+ * the created time range to filter test profile runs. |
+ * createdDateEndTime | OffsetDateTime | No | End DateTime(RFC 3339 literal format) of the
+ * created time range to filter test profile runs. |
+ * testProfileRunIds | String | No | Comma separated list of IDs of the test profile runs
+ * to filter. |
+ * testProfileIds | String | No | Comma separated IDs of the test profiles which should be
+ * associated with the test profile runs to fetch. |
+ * statuses | String | No | Comma separated list of Statuses of the test profile runs to
+ * filter. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- *
- * Request Body Schema
- *
+ *
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)
+ * 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){
* 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
- *
- *
- * {@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)
+ * 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)
* }
* }
* }
- * 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): [
+ * recommendations (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)
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
* ]
* }
- * outputArtifacts (Optional): {
- * resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
- * logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
- * }
- * }
- * testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
- * virtualUsers: Integer (Optional)
- * testRunId: String (Optional)
- * displayName: String (Optional)
- * testId: String (Optional)
- * description: String (Optional)
- * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
- * startDateTime: OffsetDateTime (Optional)
- * endDateTime: OffsetDateTime (Optional)
- * executedDateTime: OffsetDateTime (Optional)
- * portalUrl: String (Optional)
- * duration: Long (Optional)
- * subnetId: String (Optional)
+ * ]
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -685,127 +327,63 @@ 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 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 paged collection of TestProfileRun items as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Mono> createOrUpdateTestRunWithResponse(String testRunId, BinaryData body,
- RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateTestRunWithResponseAsync(testRunId, body, requestOptions);
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestProfileRuns(RequestOptions requestOptions) {
+ return this.serviceClient.listTestProfileRunsAsync(requestOptions);
}
/**
- * Get test run details by name.
+ * Stop test profile run.
+ *
+ * Stop test profile run for the given test profile run 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
+ * 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){
* message: String (Optional)
* }
* ]
- * testRunStatistics (Optional): {
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (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)
- * 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)
+ * 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)
+ * }
* }
* }
- * 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)
+ * recommendations (Optional): [
+ * (Optional){
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
* ]
* }
- * outputArtifacts (Optional): {
- * resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
- * logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
- * }
- * }
- * testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
- * virtualUsers: Integer (Optional)
- * testRunId: String (Optional)
- * displayName: String (Optional)
- * testId: String (Optional)
- * description: String (Optional)
- * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
- * startDateTime: OffsetDateTime (Optional)
- * endDateTime: OffsetDateTime (Optional)
- * executedDateTime: OffsetDateTime (Optional)
- * portalUrl: String (Optional)
- * duration: Long (Optional)
- * subnetId: String (Optional)
+ * ]
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -813,426 +391,231 @@ Mono> createOrUpdateTestRunWithResponse(String testRunId, B
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @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 run details by name along with {@link Response} on successful completion of {@link Mono}.
+ * @return test Profile Run model along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.getTestRunWithResponseAsync(testRunId, requestOptions);
+ public Mono> stopTestProfileRunWithResponse(String testProfileRunId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.stopTestProfileRunWithResponseAsync(testProfileRunId, requestOptions);
}
/**
- * Delete a test run by its name.
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
+ * @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.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @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> deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.deleteTestRunWithResponseAsync(testRunId, requestOptions);
+ public Mono createOrUpdateTestProfileRun(String testProfileRunId, TestProfileRun body) {
+ // Generated convenience method for createOrUpdateTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTestProfileRunAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestProfileRunAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateTestProfileRunWithResponse(testProfileRunId, bodyInBinaryData, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfileRun.class));
}
/**
- * Get test run file by file name.
- * Response Body Schema
+ * Delete an existing load test profile run.
*
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param fileName Test run file name with file extension.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if 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}.
+ * @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> getTestRunFileWithResponse(String testRunId, String fileName,
- RequestOptions requestOptions) {
- return this.serviceClient.getTestRunFileWithResponseAsync(testRunId, fileName, requestOptions);
+ public Mono deleteTestProfileRun(String testProfileRunId) {
+ // Generated convenience method for deleteTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteTestProfileRunWithResponse(testProfileRunId, requestOptions).flatMap(FluxUtil::toMono);
}
/**
- * Get all test runs with given filters.
- * Query Parameters
- *
- * Query Parameters
- * Name | Type | Required | Description |
- * orderby | String | No | Sort on the supported fields in (field asc/desc) format. eg:
- * executedDateTime asc. Supported fields - executedDateTime |
- * search | String | No | 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. |
- * testId | String | No | Unique name of an existing load test. |
- * executionFrom | OffsetDateTime | No | Start DateTime(ISO 8601 literal format) of
- * test-run execution time filter range. |
- * executionTo | OffsetDateTime | No | End DateTime(ISO 8601 literal format) of test-run
- * execution time filter range. |
- * status | String | No | Comma separated list of test run status. |
- * maxpagesize | Integer | No | Number of results in response. |
- *
- * You can add these to a request with {@link RequestOptions#addQueryParam}
- * Response Body Schema
+ * Get test profile run details.
*
- *
- * {@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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * errorDetails (Optional): [
- * (Optional){
- * message: String (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)
- * 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)
- * }
- * }
- *
- *
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return all test runs with given filters as paginated response with {@link PagedFlux}.
+ * @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
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux listTestRuns(RequestOptions requestOptions) {
- return this.serviceClient.listTestRunsAsync(requestOptions);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getTestProfileRun(String testProfileRunId) {
+ // Generated convenience method for getTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTestProfileRunWithResponse(testProfileRunId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfileRun.class));
}
/**
- * Stop test run by name.
- * Response Body Schema
+ * List test profile runs.
*
- *
- * {@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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * errorDetails (Optional): [
- * (Optional){
- * message: String (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)
- * 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)
- * }
- * }
- *
- *
- * @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.
+ * 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.
+ * @param maxEndDateTime Maximum End DateTime(RFC 3339 literal format) of the test profile runs to filter on.
+ * @param createdDateStartTime Start DateTime(RFC 3339 literal format) of the created time range to filter test
+ * profile runs.
+ * @param createdDateEndTime End DateTime(RFC 3339 literal format) of the created time range to filter test profile
+ * runs.
+ * @param testProfileRunIds Comma separated list of IDs of the test profile runs to filter.
+ * @param testProfileIds Comma separated IDs of the test profiles which should be associated with the test profile
+ * runs to fetch.
+ * @param statuses Comma separated list of Statuses of the test profile runs to 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.
- * @return load test run model along with {@link Response} on successful completion of {@link Mono}.
+ * @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.SINGLE)
- public Mono> stopTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.stopTestRunWithResponseAsync(testRunId, requestOptions);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestProfileRuns(OffsetDateTime minStartDateTime,
+ OffsetDateTime maxStartDateTime, OffsetDateTime minEndDateTime, OffsetDateTime maxEndDateTime,
+ OffsetDateTime createdDateStartTime, OffsetDateTime createdDateEndTime, String testProfileRunIds,
+ String testProfileIds, String statuses) {
+ // Generated convenience method for listTestProfileRuns
+ RequestOptions requestOptions = new RequestOptions();
+ if (minStartDateTime != null) {
+ requestOptions.addQueryParam("minStartDateTime", String.valueOf(minStartDateTime), false);
+ }
+ if (maxStartDateTime != null) {
+ requestOptions.addQueryParam("maxStartDateTime", String.valueOf(maxStartDateTime), false);
+ }
+ if (minEndDateTime != null) {
+ requestOptions.addQueryParam("minEndDateTime", String.valueOf(minEndDateTime), false);
+ }
+ if (maxEndDateTime != null) {
+ requestOptions.addQueryParam("maxEndDateTime", String.valueOf(maxEndDateTime), false);
+ }
+ if (createdDateStartTime != null) {
+ requestOptions.addQueryParam("createdDateStartTime", String.valueOf(createdDateStartTime), false);
+ }
+ if (createdDateEndTime != null) {
+ requestOptions.addQueryParam("createdDateEndTime", String.valueOf(createdDateEndTime), false);
+ }
+ if (testProfileRunIds != null) {
+ requestOptions.addQueryParam("testProfileRunIds", testProfileRunIds, false);
+ }
+ if (testProfileIds != null) {
+ requestOptions.addQueryParam("testProfileIds", testProfileIds, false);
+ }
+ if (statuses != null) {
+ requestOptions.addQueryParam("statuses", statuses, false);
+ }
+ 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));
+ });
}
/**
- * List the metric namespaces for a load test run.
- * Response Body Schema
+ * List test profile runs.
+ *
+ * Get all test profile runs for the given filters.
*
- *
- * {@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}.
+ * @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.SINGLE)
- public Mono> getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.getMetricNamespacesWithResponseAsync(testRunId, requestOptions);
+ @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));
+ });
}
/**
- * List the metric definitions for a load test run.
- * Response Body Schema
+ * Stop test profile run.
*
- *
- * {@code
- * {
- * value (Required): [
- * (Required){
- * dimensions (Optional): [
- * (Optional){
- * description: String (Optional)
- * name: String (Optional)
- * }
- * ]
- * description: String (Optional)
- * name: String (Optional)
- * namespace: String (Optional)
- * primaryAggregationType: String(Average/Count/None/Total/Percentile90/Percentile95/Percentile99) (Optional)
- * supportedAggregationTypes (Optional): [
- * String (Optional)
- * ]
- * unit: String(NotSpecified/Percent/Count/Seconds/Milliseconds/Bytes/BytesPerSecond/CountPerSecond) (Optional)
- * metricAvailabilities (Optional): [
- * (Optional){
- * timeGrain: String(PT5S/PT10S/PT1M/PT5M/PT1H) (Optional)
- * }
- * ]
- * }
- * ]
- * }
- * }
- *
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param metricNamespace Metric namespace to query metric definitions for.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
- * @return represents collection of metric definitions along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @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> getMetricDefinitionsWithResponse(String testRunId, String metricNamespace,
- RequestOptions requestOptions) {
- return this.serviceClient.getMetricDefinitionsWithResponseAsync(testRunId, metricNamespace, requestOptions);
+ 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));
}
}
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 64358eff94b37..f7f6f49e516d5 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) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
package com.azure.developer.loadtesting;
import com.azure.core.annotation.Generated;
@@ -11,54 +12,75 @@
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;
import com.azure.core.util.BinaryData;
-import com.azure.core.util.polling.SyncPoller;
-import com.azure.developer.loadtesting.implementation.LoadTestRunsImpl;
-import java.time.Duration;
+import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper;
+import com.azure.developer.loadtesting.models.TestProfileRun;
+import java.time.OffsetDateTime;
/**
- * Initializes a new instance of the synchronous LoadTestingClient type.
+ * Initializes a new instance of the synchronous LoadTestRunClient type.
*/
@ServiceClient(builder = LoadTestRunClientBuilder.class)
public final class LoadTestRunClient {
-
@Generated
- private final LoadTestRunsImpl serviceClient;
+ private final LoadTestRunAsyncClient client;
/**
* Initializes an instance of LoadTestRunClient class.
- *
- * @param serviceClient the service client implementation.
+ *
+ * @param client the async client.
*/
@Generated
- LoadTestRunClient(LoadTestRunsImpl serviceClient) {
- this.serviceClient = serviceClient;
+ LoadTestRunClient(LoadTestRunAsyncClient client) {
+ this.client = client;
}
/**
- * Configure server metrics for a test run.
+ * 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
*
*
* {@code
* {
- * testRunId: String (Optional)
- * metrics (Optional): {
+ * 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){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
* String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: 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)
@@ -72,19 +94,40 @@ public final class LoadTestRunClient {
*
* {@code
* {
- * testRunId: String (Optional)
- * metrics (Optional): {
+ * 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){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
* String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: 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)
@@ -92,291 +135,87 @@ public final class LoadTestRunClient {
* }
* }
*
- *
- * @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 testProfileRunId Unique identifier for the test profile 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 test run server metrics configuration along with {@link Response}.
+ * @return test Profile Run model along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateServerMetricsConfigWithResponse(String testRunId, BinaryData body,
+ public Response createOrUpdateTestProfileRunWithResponse(String testProfileRunId, BinaryData body,
RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateServerMetricsConfigWithResponse(testRunId, body, requestOptions);
+ return this.client.createOrUpdateTestProfileRunWithResponse(testProfileRunId, body, requestOptions).block();
}
/**
- * 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 testRunId} 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).
- */
- @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());
- }
-
- /**
- * Associate an app component (collection of azure resources) to a test run.
- * Request Body Schema
+ * Delete an existing load test profile run.
*
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testRunId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * Response Body Schema
+ * Delete an existing load test profile run by providing the test profile run Id.
*
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testRunId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param body App Component model.
+ * @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 run app component along with {@link Response}.
+ * @return the {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateAppComponentsWithResponse(String testRunId, BinaryData body,
- RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateAppComponentsWithResponse(testRunId, body, requestOptions);
+ public Response deleteTestProfileRunWithResponse(String testProfileRunId, RequestOptions requestOptions) {
+ return this.client.deleteTestProfileRunWithResponse(testProfileRunId, requestOptions).block();
}
/**
- * List the metric values for a load test run.
- *
- * Query Parameters
- *
- *
- * Query Parameters
- *
- * Name |
- * Type |
- * Required |
- * Description |
- *
- *
- * aggregation |
- * String |
- * No |
- * The aggregation |
- *
- *
- * interval |
- * String |
- * No |
- * The 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
- *
- * Name |
- * Type |
- * Required |
- * Description |
- *
- *
- * Content-Type |
- * String |
- * No |
- * The content type. Allowed values: "application/json". |
- *
- *
- * You can add these to a request with {@link RequestOptions#addHeader}
- *
- * Request Body Schema
- *
- *
+ * Get test profile run details.
+ *
+ * Get test profile run details by test profile run Id.
+ * Response Body Schema
+ *
*
* {@code
* {
- * filters (Optional): [
+ * 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){
- * name: String (Optional)
- * values (Optional): [
- * String (Optional)
- * ]
+ * message: String (Optional)
* }
* ]
- * }
- * }
- *
- *
- *
- * Response Body Schema
- *
- *
- *
- * {@code
- * {
- * data (Optional): [
- * (Optional){
- * timestamp: String (Optional)
- * value: Double (Optional)
+ * 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)
+ * }
* }
- * ]
- * dimensionValues (Optional): [
+ * }
+ * recommendations (Optional): [
* (Optional){
- * name: String (Optional)
- * value: String (Optional)
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * 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 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);
- }
-
- /**
- * List the dimension values for the given metric dimension name.
- * Query Parameters
- *
- * Query Parameters
- * Name | Type | Required | Description |
- * interval | String | No | The 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);
- }
-
- /**
- * Get associated app component (collection of azure resources) for the given test run.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testRunId: String (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -384,306 +223,93 @@ public PagedIterable listMetricDimensionValues(String testRunId, Str
* }
* }
*
- *
- * @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);
- }
-
- /**
- * List server metrics configuration for the given test run.
- * Response Body Schema
*
- *
- * {@code
- * {
- * testRunId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
- * }
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ * @param 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 run server metrics configuration along with {@link Response}.
+ * @return test profile run details.
+ *
+ * Get test profile run details by test profile run Id along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getServerMetricsConfigWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.getServerMetricsConfigWithResponse(testRunId, requestOptions);
+ public Response getTestProfileRunWithResponse(String testProfileRunId, RequestOptions requestOptions) {
+ return this.client.getTestProfileRunWithResponse(testProfileRunId, requestOptions).block();
}
/**
- * Create and start a new test run with the given name.
- *
- *
- * Query Parameters
- *
+ * List test profile runs.
+ *
+ * Get all test profile runs for the given filters.
+ *
Query Parameters
*
* Query Parameters
- *
- * Name |
- * Type |
- * Required |
- * Description |
- *
- *
- * oldTestRunId |
- * String |
- * No |
- * 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. |
- *
+ * Name | Type | Required | Description |
+ * maxpagesize | Integer | No | Maximum number of results to include in a single
+ * response. |
+ * minStartDateTime | OffsetDateTime | No | Minimum Start DateTime(RFC 3339 literal
+ * format) of the test profile runs to filter on. |
+ * maxStartDateTime | OffsetDateTime | No | Maximum Start DateTime(RFC 3339 literal
+ * format) of the test profile runs to filter on. |
+ * minEndDateTime | OffsetDateTime | No | Minimum End DateTime(RFC 3339 literal format) of
+ * the test profile runs to filter on. |
+ * maxEndDateTime | OffsetDateTime | No | Maximum End DateTime(RFC 3339 literal format) of
+ * the test profile runs to filter on. |
+ * createdDateStartTime | OffsetDateTime | No | Start DateTime(RFC 3339 literal format) of
+ * the created time range to filter test profile runs. |
+ * createdDateEndTime | OffsetDateTime | No | End DateTime(RFC 3339 literal format) of the
+ * created time range to filter test profile runs. |
+ * testProfileRunIds | String | No | Comma separated list of IDs of the test profile runs
+ * to filter. |
+ * testProfileIds | String | No | Comma separated IDs of the test profiles which should be
+ * associated with the test profile runs to fetch. |
+ * statuses | String | No | Comma separated list of Statuses of the test profile runs to
+ * filter. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- *
- * Request Body Schema
- *
+ *
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)
+ * 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){
* 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
- *
- *
- * {@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)
+ * 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)
* }
* }
* }
- * 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): [
+ * recommendations (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)
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
* ]
* }
- * outputArtifacts (Optional): {
- * resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
- * logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
- * }
- * }
- * testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
- * virtualUsers: Integer (Optional)
- * testRunId: String (Optional)
- * displayName: String (Optional)
- * testId: String (Optional)
- * description: String (Optional)
- * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
- * startDateTime: OffsetDateTime (Optional)
- * endDateTime: OffsetDateTime (Optional)
- * executedDateTime: OffsetDateTime (Optional)
- * portalUrl: String (Optional)
- * duration: Long (Optional)
- * subnetId: String (Optional)
+ * ]
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -691,127 +317,63 @@ 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 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 paged collection of TestProfileRun items as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateTestRunWithResponse(String testRunId, BinaryData body,
- RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateTestRunWithResponse(testRunId, body, requestOptions);
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTestProfileRuns(RequestOptions requestOptions) {
+ return new PagedIterable<>(this.client.listTestProfileRuns(requestOptions));
}
/**
- * Get test run details by name.
+ * Stop test profile run.
+ *
+ * Stop test profile run for the given test profile run 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
+ * 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){
* message: String (Optional)
* }
* ]
- * testRunStatistics (Optional): {
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (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)
- * 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)
+ * 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)
+ * }
* }
* }
- * 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)
+ * recommendations (Optional): [
+ * (Optional){
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
* ]
* }
- * outputArtifacts (Optional): {
- * resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
- * logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
- * }
- * }
- * testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
- * virtualUsers: Integer (Optional)
- * testRunId: String (Optional)
- * displayName: String (Optional)
- * testId: String (Optional)
- * description: String (Optional)
- * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
- * startDateTime: OffsetDateTime (Optional)
- * endDateTime: OffsetDateTime (Optional)
- * executedDateTime: OffsetDateTime (Optional)
- * portalUrl: String (Optional)
- * duration: Long (Optional)
- * subnetId: String (Optional)
+ * ]
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -819,424 +381,176 @@ Response createOrUpdateTestRunWithResponse(String testRunId, BinaryD
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @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 run details by name along with {@link Response}.
+ * @return test Profile Run model along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.getTestRunWithResponse(testRunId, requestOptions);
+ public Response stopTestProfileRunWithResponse(String testProfileRunId, RequestOptions requestOptions) {
+ return this.client.stopTestProfileRunWithResponse(testProfileRunId, requestOptions).block();
}
/**
- * Delete a test run by its name.
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
+ * @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.
- * @return the {@link Response}.
+ * @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 Response deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.deleteTestRunWithResponse(testRunId, requestOptions);
+ public TestProfileRun createOrUpdateTestProfileRun(String testProfileRunId, TestProfileRun body) {
+ // Generated convenience method for createOrUpdateTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTestProfileRunAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestProfileRunAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateTestProfileRunWithResponse(testProfileRunId, bodyInBinaryData, requestOptions).getValue()
+ .toObject(TestProfileRun.class);
}
/**
- * Get test run file by file name.
- * Response Body Schema
+ * Delete an existing load test profile run.
*
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param fileName Test run file name with file extension.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if 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}.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getTestRunFileWithResponse(String testRunId, String fileName,
- RequestOptions requestOptions) {
- return this.serviceClient.getTestRunFileWithResponse(testRunId, fileName, requestOptions);
+ public void deleteTestProfileRun(String testProfileRunId) {
+ // Generated convenience method for deleteTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteTestProfileRunWithResponse(testProfileRunId, requestOptions).getValue();
}
/**
- * Get all test runs with given filters.
- * Query Parameters
- *
- * Query Parameters
- * Name | Type | Required | Description |
- * orderby | String | No | Sort on the supported fields in (field asc/desc) format. eg:
- * executedDateTime asc. Supported fields - executedDateTime |
- * search | String | No | 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. |
- * testId | String | No | Unique name of an existing load test. |
- * executionFrom | OffsetDateTime | No | Start DateTime(ISO 8601 literal format) of
- * test-run execution time filter range. |
- * executionTo | OffsetDateTime | No | End DateTime(ISO 8601 literal format) of test-run
- * execution time filter range. |
- * status | String | No | Comma separated list of test run status. |
- * maxpagesize | Integer | No | Number of results in response. |
- *
- * You can add these to a request with {@link RequestOptions#addQueryParam}
- * Response Body Schema
+ * Get test profile run details.
*
- *
- * {@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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * errorDetails (Optional): [
- * (Optional){
- * message: String (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)
- * 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)
- * }
- * }
- *
- *
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return all test runs with given filters as paginated response with {@link PagedIterable}.
+ * @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
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listTestRuns(RequestOptions requestOptions) {
- return this.serviceClient.listTestRuns(requestOptions);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestProfileRun getTestProfileRun(String testProfileRunId) {
+ // Generated convenience method for getTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTestProfileRunWithResponse(testProfileRunId, requestOptions).getValue()
+ .toObject(TestProfileRun.class);
}
/**
- * Stop test run by name.
- * Response Body Schema
+ * List test profile runs.
*
- *
- * {@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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * errorDetails (Optional): [
- * (Optional){
- * message: String (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)
- * 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)
- * }
- * }
- *
- *
- * @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.
+ * 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.
+ * @param maxEndDateTime Maximum End DateTime(RFC 3339 literal format) of the test profile runs to filter on.
+ * @param createdDateStartTime Start DateTime(RFC 3339 literal format) of the created time range to filter test
+ * profile runs.
+ * @param createdDateEndTime End DateTime(RFC 3339 literal format) of the created time range to filter test profile
+ * runs.
+ * @param testProfileRunIds Comma separated list of IDs of the test profile runs to filter.
+ * @param testProfileIds Comma separated IDs of the test profiles which should be associated with the test profile
+ * runs to fetch.
+ * @param statuses Comma separated list of Statuses of the test profile runs to 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.
- * @return load test run model along with {@link Response}.
+ * @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.SINGLE)
- public Response stopTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.stopTestRunWithResponse(testRunId, requestOptions);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTestProfileRuns(OffsetDateTime minStartDateTime,
+ OffsetDateTime maxStartDateTime, OffsetDateTime minEndDateTime, OffsetDateTime maxEndDateTime,
+ OffsetDateTime createdDateStartTime, OffsetDateTime createdDateEndTime, String testProfileRunIds,
+ String testProfileIds, String statuses) {
+ // Generated convenience method for listTestProfileRuns
+ return new PagedIterable<>(client.listTestProfileRuns(minStartDateTime, maxStartDateTime, minEndDateTime,
+ maxEndDateTime, createdDateStartTime, createdDateEndTime, testProfileRunIds, testProfileIds, statuses));
}
/**
- * List the metric namespaces for a load test run.
- * Response Body Schema
+ * List test profile runs.
+ *
+ * Get all test profile runs for the given filters.
*
- *
- * {@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}.
+ * @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.SINGLE)
- public Response getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.getMetricNamespacesWithResponse(testRunId, requestOptions);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTestProfileRuns() {
+ // Generated convenience method for listTestProfileRuns
+ return new PagedIterable<>(client.listTestProfileRuns());
}
/**
- * List the metric definitions for a load test run.
- * Response Body Schema
+ * Stop test profile run.
*
- *
- * {@code
- * {
- * value (Required): [
- * (Required){
- * dimensions (Optional): [
- * (Optional){
- * description: String (Optional)
- * name: String (Optional)
- * }
- * ]
- * description: String (Optional)
- * name: String (Optional)
- * namespace: String (Optional)
- * primaryAggregationType: String(Average/Count/None/Total/Percentile90/Percentile95/Percentile99) (Optional)
- * supportedAggregationTypes (Optional): [
- * String (Optional)
- * ]
- * unit: String(NotSpecified/Percent/Count/Seconds/Milliseconds/Bytes/BytesPerSecond/CountPerSecond) (Optional)
- * metricAvailabilities (Optional): [
- * (Optional){
- * timeGrain: String(PT5S/PT10S/PT1M/PT5M/PT1H) (Optional)
- * }
- * ]
- * }
- * ]
- * }
- * }
- *
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param metricNamespace Metric namespace to query metric definitions for.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * 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.
- * @return represents collection of metric definitions along with {@link Response}.
+ * @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 Response getMetricDefinitionsWithResponse(String testRunId, String metricNamespace,
- RequestOptions requestOptions) {
- return this.serviceClient.getMetricDefinitionsWithResponse(testRunId, metricNamespace, requestOptions);
+ public TestProfileRun stopTestProfileRun(String testProfileRunId) {
+ // Generated convenience method for stopTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return stopTestProfileRunWithResponse(testProfileRunId, requestOptions).getValue()
+ .toObject(TestProfileRun.class);
}
}
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 8eef8080f17f7..4ffa426eed9eb 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) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
package com.azure.developer.loadtesting;
import com.azure.core.annotation.Generated;
@@ -33,7 +34,7 @@
import com.azure.core.util.builder.ClientBuilderUtil;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.serializer.JacksonAdapter;
-import com.azure.developer.loadtesting.implementation.LoadTestingClientImpl;
+import com.azure.developer.loadtesting.implementation.LoadTestRunClientImpl;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -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;
@@ -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.
*/
@@ -246,21 +250,28 @@ public LoadTestRunClientBuilder retryPolicy(RetryPolicy retryPolicy) {
}
/**
- * Builds an instance of LoadTestingClientImpl with the provided parameters.
- *
- * @return an instance of LoadTestingClientImpl.
+ * Builds an instance of LoadTestRunClientImpl with the provided parameters.
+ *
+ * @return an instance of LoadTestRunClientImpl.
*/
@Generated
- private LoadTestingClientImpl buildInnerClient() {
+ private LoadTestRunClientImpl buildInnerClient() {
this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
LoadTestingServiceVersion localServiceVersion
= (serviceVersion != null) ? serviceVersion : LoadTestingServiceVersion.getLatest();
- LoadTestingClientImpl client = new LoadTestingClientImpl(localPipeline,
+ LoadTestRunClientImpl client = new LoadTestRunClientImpl(localPipeline,
JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion);
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,34 +312,23 @@ private HttpPipeline createHttpPipeline() {
/**
* Builds an instance of LoadTestRunAsyncClient class.
- *
+ *
* @return an instance of LoadTestRunAsyncClient.
*/
@Generated
public LoadTestRunAsyncClient buildAsyncClient() {
- return new LoadTestRunAsyncClient(buildInnerClient().getLoadTestRuns());
+ return new LoadTestRunAsyncClient(buildInnerClient());
}
/**
* Builds an instance of LoadTestRunClient class.
- *
+ *
* @return an instance of LoadTestRunClient.
*/
@Generated
public LoadTestRunClient buildClient() {
- return new LoadTestRunClient(buildInnerClient().getLoadTestRuns());
+ return new LoadTestRunClient(new LoadTestRunAsyncClient(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 277cd8cc2f90d..5924139072315 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
@@ -1,19 +1,44 @@
// 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 com.azure.developer.loadtesting;
import com.azure.core.util.ServiceVersion;
/**
- * Service version of LoadTestingClient.
+ * Service version of Load TestingClient.
*/
public enum LoadTestingServiceVersion implements ServiceVersion {
/**
* Enum value 2022-11-01.
*/
- V2022_11_01("2022-11-01");
+ V2022_11_01("2022-11-01"),
+
+ /**
+ * Enum value 2023-04-01-preview.
+ */
+ V2023_04_01_PREVIEW("2023-04-01-preview"),
+
+ /**
+ * Enum value 2024-03-01-preview.
+ */
+ V2024_03_01_PREVIEW("2024-03-01-preview"),
+
+ /**
+ * Enum value 2024-05-01-preview.
+ */
+ V2024_05_01_PREVIEW("2024-05-01-preview"),
+
+ /**
+ * Enum value 2024-07-01-preview.
+ */
+ V2024_07_01_PREVIEW("2024-07-01-preview"),
+
+ /**
+ * Enum value 2024-12-01-preview.
+ */
+ V2024_12_01_PREVIEW("2024-12-01-preview");
private final String version;
@@ -35,6 +60,6 @@ public String getVersion() {
* @return The latest {@link LoadTestingServiceVersion}.
*/
public static LoadTestingServiceVersion getLatest() {
- return V2022_11_01;
+ return V2024_12_01_PREVIEW;
}
}
diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/PollingUtils.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/PollingUtils.java
deleted file mode 100644
index 39ab7f76248d9..0000000000000
--- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/PollingUtils.java
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-package com.azure.developer.loadtesting;
-
-import com.azure.core.util.BinaryData;
-import com.azure.core.util.polling.LongRunningOperationStatus;
-import com.azure.core.util.polling.PollResponse;
-import com.azure.json.JsonProviders;
-import com.azure.json.JsonReader;
-import reactor.core.publisher.Mono;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.concurrent.Callable;
-
-final class PollingUtils {
- static Mono> getPollResponseMono(Callable> pollOperation) {
- try {
- return Mono.just(pollOperation.call());
- } catch (Exception e) {
- return Mono.error(e);
- }
- }
-
- static PollResponse getValidationStatus(BinaryData fileBinary) throws RuntimeException {
- String validationStatus, fileType;
-
- try (JsonReader jsonReader = JsonProviders.createReader(fileBinary.toBytes())) {
- Map jsonTree = jsonReader.readMap(JsonReader::readUntyped);
-
- validationStatus = jsonTree.get("validationStatus").toString();
- } catch (IOException e) {
- throw new RuntimeException("Encountered exception while retrieving validation status", e);
- }
-
- LongRunningOperationStatus lroStatus;
-
- switch (validationStatus) {
- case "VALIDATION_NOT_REQUIRED":
- case "VALIDATION_SUCCESS":
- lroStatus = LongRunningOperationStatus.SUCCESSFULLY_COMPLETED;
-
- break;
-
- case "VALIDATION_FAILURE":
- lroStatus = LongRunningOperationStatus.FAILED;
-
- break;
-
- case "VALIDATION_INITIATED":
- lroStatus = LongRunningOperationStatus.IN_PROGRESS;
-
- break;
-
- case "NOT_VALIDATED":
- lroStatus = LongRunningOperationStatus.SUCCESSFULLY_COMPLETED;
-
- break;
-
- default:
- lroStatus = LongRunningOperationStatus.NOT_STARTED;
-
- break;
- }
-
- return new PollResponse<>(lroStatus, fileBinary);
- }
-
- static PollResponse getTestRunStatus(BinaryData testRunBinary) throws RuntimeException {
- String status;
-
- try (JsonReader jsonReader = JsonProviders.createReader(testRunBinary.toBytes())) {
- Map jsonTree = jsonReader.readMap(JsonReader::readUntyped);
-
- status = jsonTree.get("status").toString();
- } catch (IOException e) {
- throw new RuntimeException("Encountered exception while retrieving test run status", e);
- }
-
- LongRunningOperationStatus lroStatus;
-
- switch (status) {
- case "NOTSTARTED":
- lroStatus = LongRunningOperationStatus.NOT_STARTED;
-
- break;
-
- case "DONE":
- lroStatus = LongRunningOperationStatus.SUCCESSFULLY_COMPLETED;
-
- break;
-
- case "FAILED":
- lroStatus = LongRunningOperationStatus.FAILED;
-
- break;
-
- case "CANCELLED":
- lroStatus = LongRunningOperationStatus.USER_CANCELLED;
-
- break;
-
- default:
- lroStatus = LongRunningOperationStatus.IN_PROGRESS;
-
- break;
- }
-
- return new PollResponse<>(lroStatus, testRunBinary);
- }
-}
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
new file mode 100644
index 0000000000000..4b2519d21bd8f
--- /dev/null
+++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/JsonMergePatchHelper.java
@@ -0,0 +1,385 @@
+// 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;
+
+import com.azure.developer.loadtesting.models.AppComponent;
+import com.azure.developer.loadtesting.models.AutoStopCriteria;
+import com.azure.developer.loadtesting.models.CertificateMetadata;
+import com.azure.developer.loadtesting.models.FunctionFlexConsumptionResourceConfiguration;
+import com.azure.developer.loadtesting.models.LoadTestConfiguration;
+import com.azure.developer.loadtesting.models.OptionalLoadTestConfig;
+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.RegionalConfiguration;
+import com.azure.developer.loadtesting.models.ResourceMetric;
+import com.azure.developer.loadtesting.models.Secret;
+import com.azure.developer.loadtesting.models.TargetResourceConfigurations;
+import com.azure.developer.loadtesting.models.Test;
+import com.azure.developer.loadtesting.models.TestAppComponents;
+import com.azure.developer.loadtesting.models.TestProfile;
+import com.azure.developer.loadtesting.models.TestProfileRun;
+import com.azure.developer.loadtesting.models.TestRun;
+import com.azure.developer.loadtesting.models.TestRunAppComponents;
+import com.azure.developer.loadtesting.models.TestRunServerMetricConfig;
+import com.azure.developer.loadtesting.models.TestServerMetricConfig;
+
+/**
+ * This is the Helper class to enable json merge patch serialization for a model.
+ */
+public class JsonMergePatchHelper {
+ private static TestAccessor testAccessor;
+
+ public interface TestAccessor {
+ Test prepareModelForJsonMergePatch(Test test, boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(Test test);
+ }
+
+ public static void setTestAccessor(TestAccessor accessor) {
+ testAccessor = accessor;
+ }
+
+ public static TestAccessor getTestAccessor() {
+ return testAccessor;
+ }
+
+ private static PassFailCriteriaAccessor passFailCriteriaAccessor;
+
+ public interface PassFailCriteriaAccessor {
+ PassFailCriteria prepareModelForJsonMergePatch(PassFailCriteria passFailCriteria,
+ boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(PassFailCriteria passFailCriteria);
+ }
+
+ public static void setPassFailCriteriaAccessor(PassFailCriteriaAccessor accessor) {
+ passFailCriteriaAccessor = accessor;
+ }
+
+ public static PassFailCriteriaAccessor getPassFailCriteriaAccessor() {
+ return passFailCriteriaAccessor;
+ }
+
+ private static PassFailMetricAccessor passFailMetricAccessor;
+
+ public interface PassFailMetricAccessor {
+ PassFailMetric prepareModelForJsonMergePatch(PassFailMetric passFailMetric, boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(PassFailMetric passFailMetric);
+ }
+
+ public static void setPassFailMetricAccessor(PassFailMetricAccessor accessor) {
+ passFailMetricAccessor = accessor;
+ }
+
+ public static PassFailMetricAccessor getPassFailMetricAccessor() {
+ return passFailMetricAccessor;
+ }
+
+ private static PassFailServerMetricAccessor passFailServerMetricAccessor;
+
+ public interface PassFailServerMetricAccessor {
+ PassFailServerMetric prepareModelForJsonMergePatch(PassFailServerMetric passFailServerMetric,
+ boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(PassFailServerMetric passFailServerMetric);
+ }
+
+ public static void setPassFailServerMetricAccessor(PassFailServerMetricAccessor accessor) {
+ passFailServerMetricAccessor = accessor;
+ }
+
+ public static PassFailServerMetricAccessor getPassFailServerMetricAccessor() {
+ return passFailServerMetricAccessor;
+ }
+
+ private static AutoStopCriteriaAccessor autoStopCriteriaAccessor;
+
+ public interface AutoStopCriteriaAccessor {
+ AutoStopCriteria prepareModelForJsonMergePatch(AutoStopCriteria autoStopCriteria,
+ boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(AutoStopCriteria autoStopCriteria);
+ }
+
+ public static void setAutoStopCriteriaAccessor(AutoStopCriteriaAccessor accessor) {
+ autoStopCriteriaAccessor = accessor;
+ }
+
+ public static AutoStopCriteriaAccessor getAutoStopCriteriaAccessor() {
+ return autoStopCriteriaAccessor;
+ }
+
+ private static SecretAccessor secretAccessor;
+
+ public interface SecretAccessor {
+ Secret prepareModelForJsonMergePatch(Secret secret, boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(Secret secret);
+ }
+
+ public static void setSecretAccessor(SecretAccessor accessor) {
+ secretAccessor = accessor;
+ }
+
+ public static SecretAccessor getSecretAccessor() {
+ return secretAccessor;
+ }
+
+ private static CertificateMetadataAccessor certificateMetadataAccessor;
+
+ public interface CertificateMetadataAccessor {
+ CertificateMetadata prepareModelForJsonMergePatch(CertificateMetadata certificateMetadata,
+ boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(CertificateMetadata certificateMetadata);
+ }
+
+ public static void setCertificateMetadataAccessor(CertificateMetadataAccessor accessor) {
+ certificateMetadataAccessor = accessor;
+ }
+
+ public static CertificateMetadataAccessor getCertificateMetadataAccessor() {
+ return certificateMetadataAccessor;
+ }
+
+ private static LoadTestConfigurationAccessor loadTestConfigurationAccessor;
+
+ public interface LoadTestConfigurationAccessor {
+ LoadTestConfiguration prepareModelForJsonMergePatch(LoadTestConfiguration loadTestConfiguration,
+ boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(LoadTestConfiguration loadTestConfiguration);
+ }
+
+ public static void setLoadTestConfigurationAccessor(LoadTestConfigurationAccessor accessor) {
+ loadTestConfigurationAccessor = accessor;
+ }
+
+ public static LoadTestConfigurationAccessor getLoadTestConfigurationAccessor() {
+ return loadTestConfigurationAccessor;
+ }
+
+ private static OptionalLoadTestConfigAccessor optionalLoadTestConfigAccessor;
+
+ public interface OptionalLoadTestConfigAccessor {
+ OptionalLoadTestConfig prepareModelForJsonMergePatch(OptionalLoadTestConfig optionalLoadTestConfig,
+ boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(OptionalLoadTestConfig optionalLoadTestConfig);
+ }
+
+ public static void setOptionalLoadTestConfigAccessor(OptionalLoadTestConfigAccessor accessor) {
+ optionalLoadTestConfigAccessor = accessor;
+ }
+
+ public static OptionalLoadTestConfigAccessor getOptionalLoadTestConfigAccessor() {
+ return optionalLoadTestConfigAccessor;
+ }
+
+ private static RegionalConfigurationAccessor regionalConfigurationAccessor;
+
+ public interface RegionalConfigurationAccessor {
+ RegionalConfiguration prepareModelForJsonMergePatch(RegionalConfiguration regionalConfiguration,
+ boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(RegionalConfiguration regionalConfiguration);
+ }
+
+ public static void setRegionalConfigurationAccessor(RegionalConfigurationAccessor accessor) {
+ regionalConfigurationAccessor = accessor;
+ }
+
+ public static RegionalConfigurationAccessor getRegionalConfigurationAccessor() {
+ return regionalConfigurationAccessor;
+ }
+
+ private static TestAppComponentsAccessor testAppComponentsAccessor;
+
+ public interface TestAppComponentsAccessor {
+ TestAppComponents prepareModelForJsonMergePatch(TestAppComponents testAppComponents,
+ boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(TestAppComponents testAppComponents);
+ }
+
+ public static void setTestAppComponentsAccessor(TestAppComponentsAccessor accessor) {
+ testAppComponentsAccessor = accessor;
+ }
+
+ public static TestAppComponentsAccessor getTestAppComponentsAccessor() {
+ return testAppComponentsAccessor;
+ }
+
+ private static AppComponentAccessor appComponentAccessor;
+
+ public interface AppComponentAccessor {
+ AppComponent prepareModelForJsonMergePatch(AppComponent appComponent, boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(AppComponent appComponent);
+ }
+
+ public static void setAppComponentAccessor(AppComponentAccessor accessor) {
+ appComponentAccessor = accessor;
+ }
+
+ public static AppComponentAccessor getAppComponentAccessor() {
+ return appComponentAccessor;
+ }
+
+ private static TestServerMetricConfigAccessor testServerMetricConfigAccessor;
+
+ public interface TestServerMetricConfigAccessor {
+ TestServerMetricConfig prepareModelForJsonMergePatch(TestServerMetricConfig testServerMetricConfig,
+ boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(TestServerMetricConfig testServerMetricConfig);
+ }
+
+ public static void setTestServerMetricConfigAccessor(TestServerMetricConfigAccessor accessor) {
+ testServerMetricConfigAccessor = accessor;
+ }
+
+ public static TestServerMetricConfigAccessor getTestServerMetricConfigAccessor() {
+ return testServerMetricConfigAccessor;
+ }
+
+ private static ResourceMetricAccessor resourceMetricAccessor;
+
+ public interface ResourceMetricAccessor {
+ ResourceMetric prepareModelForJsonMergePatch(ResourceMetric resourceMetric, boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(ResourceMetric resourceMetric);
+ }
+
+ public static void setResourceMetricAccessor(ResourceMetricAccessor accessor) {
+ resourceMetricAccessor = accessor;
+ }
+
+ public static ResourceMetricAccessor getResourceMetricAccessor() {
+ return resourceMetricAccessor;
+ }
+
+ private static TestRunAccessor testRunAccessor;
+
+ public interface TestRunAccessor {
+ TestRun prepareModelForJsonMergePatch(TestRun testRun, boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(TestRun testRun);
+ }
+
+ public static void setTestRunAccessor(TestRunAccessor accessor) {
+ testRunAccessor = accessor;
+ }
+
+ public static TestRunAccessor getTestRunAccessor() {
+ return testRunAccessor;
+ }
+
+ private static TestRunAppComponentsAccessor testRunAppComponentsAccessor;
+
+ public interface TestRunAppComponentsAccessor {
+ TestRunAppComponents prepareModelForJsonMergePatch(TestRunAppComponents testRunAppComponents,
+ boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(TestRunAppComponents testRunAppComponents);
+ }
+
+ public static void setTestRunAppComponentsAccessor(TestRunAppComponentsAccessor accessor) {
+ testRunAppComponentsAccessor = accessor;
+ }
+
+ public static TestRunAppComponentsAccessor getTestRunAppComponentsAccessor() {
+ return testRunAppComponentsAccessor;
+ }
+
+ private static TestRunServerMetricConfigAccessor testRunServerMetricConfigAccessor;
+
+ public interface TestRunServerMetricConfigAccessor {
+ TestRunServerMetricConfig prepareModelForJsonMergePatch(TestRunServerMetricConfig testRunServerMetricConfig,
+ boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(TestRunServerMetricConfig testRunServerMetricConfig);
+ }
+
+ public static void setTestRunServerMetricConfigAccessor(TestRunServerMetricConfigAccessor accessor) {
+ testRunServerMetricConfigAccessor = accessor;
+ }
+
+ public static TestRunServerMetricConfigAccessor getTestRunServerMetricConfigAccessor() {
+ return testRunServerMetricConfigAccessor;
+ }
+
+ private static TestProfileAccessor testProfileAccessor;
+
+ public interface TestProfileAccessor {
+ TestProfile prepareModelForJsonMergePatch(TestProfile testProfile, boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(TestProfile testProfile);
+ }
+
+ public static void setTestProfileAccessor(TestProfileAccessor accessor) {
+ testProfileAccessor = accessor;
+ }
+
+ public static TestProfileAccessor getTestProfileAccessor() {
+ return testProfileAccessor;
+ }
+
+ private static TargetResourceConfigurationsAccessor targetResourceConfigurationsAccessor;
+
+ public interface TargetResourceConfigurationsAccessor {
+ TargetResourceConfigurations prepareModelForJsonMergePatch(
+ TargetResourceConfigurations targetResourceConfigurations, boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(TargetResourceConfigurations targetResourceConfigurations);
+ }
+
+ public static void setTargetResourceConfigurationsAccessor(TargetResourceConfigurationsAccessor accessor) {
+ targetResourceConfigurationsAccessor = accessor;
+ }
+
+ public static TargetResourceConfigurationsAccessor getTargetResourceConfigurationsAccessor() {
+ return targetResourceConfigurationsAccessor;
+ }
+
+ private static FunctionFlexConsumptionResourceConfigurationAccessor functionFlexConsumptionResourceConfigurationAccessor;
+
+ public interface FunctionFlexConsumptionResourceConfigurationAccessor {
+ FunctionFlexConsumptionResourceConfiguration prepareModelForJsonMergePatch(
+ FunctionFlexConsumptionResourceConfiguration functionFlexConsumptionResourceConfiguration,
+ boolean jsonMergePatchEnabled);
+
+ boolean
+ isJsonMergePatch(FunctionFlexConsumptionResourceConfiguration functionFlexConsumptionResourceConfiguration);
+ }
+
+ public static void setFunctionFlexConsumptionResourceConfigurationAccessor(
+ FunctionFlexConsumptionResourceConfigurationAccessor accessor) {
+ functionFlexConsumptionResourceConfigurationAccessor = accessor;
+ }
+
+ public static FunctionFlexConsumptionResourceConfigurationAccessor
+ getFunctionFlexConsumptionResourceConfigurationAccessor() {
+ return functionFlexConsumptionResourceConfigurationAccessor;
+ }
+
+ private static TestProfileRunAccessor testProfileRunAccessor;
+
+ public interface TestProfileRunAccessor {
+ TestProfileRun prepareModelForJsonMergePatch(TestProfileRun testProfileRun, boolean jsonMergePatchEnabled);
+
+ boolean isJsonMergePatch(TestProfileRun testProfileRun);
+ }
+
+ public static void setTestProfileRunAccessor(TestProfileRunAccessor accessor) {
+ testProfileRunAccessor = accessor;
+ }
+
+ public static TestProfileRunAccessor getTestProfileRunAccessor() {
+ return testProfileRunAccessor;
+ }
+}
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
new file mode 100644
index 0000000000000..9b1d4c0c3f804
--- /dev/null
+++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationClientImpl.java
@@ -0,0 +1,718 @@
+// 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;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.exception.ClientAuthenticationException;
+import com.azure.core.exception.HttpResponseException;
+import com.azure.core.exception.ResourceModifiedException;
+import com.azure.core.exception.ResourceNotFoundException;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.UrlBuilder;
+import com.azure.core.util.serializer.JacksonAdapter;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.developer.loadtesting.LoadTestingServiceVersion;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import reactor.core.publisher.Mono;
+
+/**
+ * Initializes a new instance of the LoadTestAdministrationClient type.
+ */
+public final class LoadTestAdministrationClientImpl {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final LoadTestAdministrationClientService service;
+
+ /**
+ */
+ private final String endpoint;
+
+ /**
+ * Gets.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Service version.
+ */
+ private final LoadTestingServiceVersion serviceVersion;
+
+ /**
+ * Gets Service version.
+ *
+ * @return the serviceVersion value.
+ */
+ public LoadTestingServiceVersion getServiceVersion() {
+ return this.serviceVersion;
+ }
+
+ /**
+ * The HTTP pipeline to send requests through.
+ */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /**
+ * The serializer to serialize an object into a string.
+ */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ public SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /**
+ * Initializes an instance of LoadTestAdministrationClient client.
+ *
+ * @param endpoint
+ * @param serviceVersion Service version.
+ */
+ public LoadTestAdministrationClientImpl(String endpoint, LoadTestingServiceVersion serviceVersion) {
+ this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(),
+ JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion);
+ }
+
+ /**
+ * Initializes an instance of LoadTestAdministrationClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param endpoint
+ * @param serviceVersion Service version.
+ */
+ public LoadTestAdministrationClientImpl(HttpPipeline httpPipeline, String endpoint,
+ LoadTestingServiceVersion serviceVersion) {
+ this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion);
+ }
+
+ /**
+ * Initializes an instance of LoadTestAdministrationClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param endpoint
+ * @param serviceVersion Service version.
+ */
+ public LoadTestAdministrationClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ String endpoint, LoadTestingServiceVersion serviceVersion) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.endpoint = endpoint;
+ this.serviceVersion = serviceVersion;
+ this.service = RestProxy.create(LoadTestAdministrationClientService.class, this.httpPipeline,
+ this.getSerializerAdapter());
+ }
+
+ /**
+ * The interface defining all the services for LoadTestAdministrationClient to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("https://{endpoint}")
+ @ServiceInterface(name = "LoadTestAdministrati")
+ public interface LoadTestAdministrationClientService {
+ @Patch("/test-profiles/{testProfileId}")
+ @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> createOrUpdateTestProfile(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("testProfileId") String testProfileId,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/merge-patch+json") BinaryData body, RequestOptions requestOptions, Context context);
+
+ @Delete("/test-profiles/{testProfileId}")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
+ @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);
+
+ @Get("/test-profiles/{testProfileId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> getTestProfile(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("testProfileId") String testProfileId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+
+ @Get("/test-profiles")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> listTestProfiles(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions, Context context);
+
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> listTestProfilesNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions,
+ Context context);
+ }
+
+ /**
+ * 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
+ * {
+ * 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)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * 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)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ *
+ * @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 Profile Model along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> createOrUpdateTestProfileWithResponseAsync(String testProfileId, BinaryData body,
+ RequestOptions requestOptions) {
+ final String contentType = "application/merge-patch+json";
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.createOrUpdateTestProfile(this.getEndpoint(),
+ this.getServiceVersion().getVersion(), testProfileId, contentType, accept, body, requestOptions, context));
+ }
+
+ /**
+ * 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
+ * {
+ * 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)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * 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)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ *
+ * @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 Profile Model along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateTestProfileWithResponse(String testProfileId, BinaryData body,
+ RequestOptions requestOptions) {
+ return createOrUpdateTestProfileWithResponseAsync(testProfileId, body, requestOptions).block();
+ }
+
+ /**
+ * 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}.
+ */
+ @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));
+ }
+
+ /**
+ * 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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) {
+ return deleteTestProfileWithResponseAsync(testProfileId, requestOptions).block();
+ }
+
+ /**
+ * Get load test profile details.
+ *
+ * Get load test profile details by test profile Id.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * 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)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ *
+ * @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 load test profile details.
+ *
+ * Get load test profile details by test profile Id along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getTestProfileWithResponseAsync(String testProfileId,
+ RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.getTestProfile(this.getEndpoint(),
+ this.getServiceVersion().getVersion(), testProfileId, accept, requestOptions, context));
+ }
+
+ /**
+ * Get load test profile details.
+ *
+ * Get load test profile details by test profile Id.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * 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)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ *
+ * @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 load test profile details.
+ *
+ * Get load test profile details by test profile Id along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) {
+ return getTestProfileWithResponseAsync(testProfileId, requestOptions).block();
+ }
+
+ /**
+ * List test profiles.
+ *
+ * Get all test profiles for the given filters.
+ * Query Parameters
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * maxpagesize | Integer | No | Maximum number of results to include in a single
+ * response. |
+ * lastModifiedStartTime | OffsetDateTime | No | Start DateTime(RFC 3339 literal format)
+ * of the last updated time range to filter test profiles. |
+ * lastModifiedEndTime | OffsetDateTime | No | End DateTime(RFC 3339 literal format) of
+ * the last updated time range to filter test profiles. |
+ * testProfileIds | String | No | Comma separated list of IDs of the test profiles to
+ * filter. |
+ * testIds | String | No | Comma separated list IDs of the tests which should be
+ * associated with the test profiles to fetch. |
+ *
+ * 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)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * 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 TestProfile items along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listTestProfilesSinglePageAsync(RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listTestProfiles(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));
+ }
+
+ /**
+ * List test profiles.
+ *
+ * Get all test profiles for the given filters.
+ * Query Parameters
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * maxpagesize | Integer | No | Maximum number of results to include in a single
+ * response. |
+ * lastModifiedStartTime | OffsetDateTime | No | Start DateTime(RFC 3339 literal format)
+ * of the last updated time range to filter test profiles. |
+ * lastModifiedEndTime | OffsetDateTime | No | End DateTime(RFC 3339 literal format) of
+ * the last updated time range to filter test profiles. |
+ * testProfileIds | String | No | Comma separated list of IDs of the test profiles to
+ * filter. |
+ * testIds | String | No | Comma separated list IDs of the tests which should be
+ * associated with the test profiles to fetch. |
+ *
+ * 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)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * 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 TestProfile items as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestProfilesAsync(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 listTestProfilesSinglePageAsync(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 listTestProfilesNextSinglePageAsync(nextLink, requestOptionsLocal);
+ });
+ }
+
+ /**
+ * List test profiles.
+ *
+ * Get all test profiles for the given filters.
+ * Query Parameters
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * maxpagesize | Integer | No | Maximum number of results to include in a single
+ * response. |
+ * lastModifiedStartTime | OffsetDateTime | No | Start DateTime(RFC 3339 literal format)
+ * of the last updated time range to filter test profiles. |
+ * lastModifiedEndTime | OffsetDateTime | No | End DateTime(RFC 3339 literal format) of
+ * the last updated time range to filter test profiles. |
+ * testProfileIds | String | No | Comma separated list of IDs of the test profiles to
+ * filter. |
+ * testIds | String | No | Comma separated list IDs of the tests which should be
+ * associated with the test profiles to fetch. |
+ *
+ * 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)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * 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 TestProfile items as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTestProfiles(RequestOptions requestOptions) {
+ return new PagedIterable<>(listTestProfilesAsync(requestOptions));
+ }
+
+ /**
+ * List test profiles.
+ *
+ * Get the next page of items.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * 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)
+ * 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 TestProfile items along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listTestProfilesNextSinglePageAsync(String nextLink,
+ RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listTestProfilesNext(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));
+ }
+
+ private List getValues(BinaryData binaryData, String path) {
+ try {
+ Map, ?> obj = binaryData.toObject(Map.class);
+ List> values = (List>) obj.get(path);
+ return values.stream().map(BinaryData::fromObject).collect(Collectors.toList());
+ } catch (RuntimeException e) {
+ return null;
+ }
+ }
+
+ private String getNextLink(BinaryData binaryData, String path) {
+ try {
+ Map, ?> obj = binaryData.toObject(Map.class);
+ return (String) obj.get(path);
+ } catch (RuntimeException e) {
+ return null;
+ }
+ }
+}
diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationsImpl.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationsImpl.java
deleted file mode 100644
index 66fecbd197921..0000000000000
--- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationsImpl.java
+++ /dev/null
@@ -1,2509 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.developer.loadtesting.implementation;
-
-import com.azure.core.annotation.BodyParam;
-import com.azure.core.annotation.Delete;
-import com.azure.core.annotation.ExpectedResponses;
-import com.azure.core.annotation.Get;
-import com.azure.core.annotation.HeaderParam;
-import com.azure.core.annotation.Host;
-import com.azure.core.annotation.HostParam;
-import com.azure.core.annotation.Patch;
-import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.Put;
-import com.azure.core.annotation.QueryParam;
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceInterface;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.annotation.UnexpectedResponseExceptionType;
-import com.azure.core.exception.ClientAuthenticationException;
-import com.azure.core.exception.HttpResponseException;
-import com.azure.core.exception.ResourceModifiedException;
-import com.azure.core.exception.ResourceNotFoundException;
-import com.azure.core.http.rest.PagedFlux;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.PagedResponse;
-import com.azure.core.http.rest.PagedResponseBase;
-import com.azure.core.http.rest.RequestOptions;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.RestProxy;
-import com.azure.core.util.BinaryData;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.core.util.UrlBuilder;
-import com.azure.developer.loadtesting.LoadTestingServiceVersion;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-import reactor.core.publisher.Mono;
-
-/**
- * An instance of this class provides access to all the operations defined in LoadTestAdministrations.
- */
-public final class LoadTestAdministrationsImpl {
- /**
- * The proxy service used to perform REST calls.
- */
- private final LoadTestAdministrationsService service;
-
- /**
- * The service client containing this operation class.
- */
- private final LoadTestingClientImpl client;
-
- /**
- * Initializes an instance of LoadTestAdministrationsImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- LoadTestAdministrationsImpl(LoadTestingClientImpl client) {
- this.service = RestProxy.create(LoadTestAdministrationsService.class, client.getHttpPipeline(),
- client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * Gets Service version.
- *
- * @return the serviceVersion value.
- */
- public LoadTestingServiceVersion getServiceVersion() {
- return client.getServiceVersion();
- }
-
- /**
- * The interface defining all the services for LoadTestingClientLoadTestAdministrations to be used by the proxy
- * service to perform REST calls.
- */
- @Host("https://{Endpoint}")
- @ServiceInterface(name = "LoadTestingClientLoa")
- public interface LoadTestAdministrationsService {
- @Patch("/tests/{testId}")
- @ExpectedResponses({ 200, 201 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> createOrUpdateTest(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @QueryParam("api-version") String apiVersion,
- @BodyParam("application/merge-patch+json") BinaryData body, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
-
- @Patch("/tests/{testId}")
- @ExpectedResponses({ 200, 201 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Response createOrUpdateTestSync(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @QueryParam("api-version") String apiVersion,
- @BodyParam("application/merge-patch+json") BinaryData body, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
-
- @Delete("/tests/{testId}")
- @ExpectedResponses({ 204 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> deleteTest(@HostParam("Endpoint") String endpoint, @PathParam("testId") String testId,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
-
- @Delete("/tests/{testId}")
- @ExpectedResponses({ 204 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Response deleteTestSync(@HostParam("Endpoint") String endpoint, @PathParam("testId") String testId,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
-
- @Get("/tests/{testId}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> getTest(@HostParam("Endpoint") String endpoint, @PathParam("testId") String testId,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
-
- @Get("/tests/{testId}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Response getTestSync(@HostParam("Endpoint") String endpoint, @PathParam("testId") String testId,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
-
- @Get("/tests")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> listTests(@HostParam("Endpoint") String endpoint,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
-
- @Get("/tests")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Response listTestsSync(@HostParam("Endpoint") String endpoint,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
-
- @Put("/tests/{testId}/files/{fileName}")
- @ExpectedResponses({ 201 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> uploadTestFile(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @PathParam("fileName") String fileName,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/octet-stream") BinaryData body,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
-
- @Put("/tests/{testId}/files/{fileName}")
- @ExpectedResponses({ 201 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Response uploadTestFileSync(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @PathParam("fileName") String fileName,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/octet-stream") BinaryData body,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
-
- @Get("/tests/{testId}/files/{fileName}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> getTestFile(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @PathParam("fileName") String fileName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
-
- @Get("/tests/{testId}/files/{fileName}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Response getTestFileSync(@HostParam("Endpoint") String endpoint, @PathParam("testId") String testId,
- @PathParam("fileName") String fileName, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
-
- @Delete("/tests/{testId}/files/{fileName}")
- @ExpectedResponses({ 204 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> deleteTestFile(@HostParam("Endpoint") String endpoint, @PathParam("testId") String testId,
- @PathParam("fileName") String fileName, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
-
- @Delete("/tests/{testId}/files/{fileName}")
- @ExpectedResponses({ 204 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Response deleteTestFileSync(@HostParam("Endpoint") String endpoint, @PathParam("testId") String testId,
- @PathParam("fileName") String fileName, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
-
- @Get("/tests/{testId}/files")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> listTestFiles(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
-
- @Get("/tests/{testId}/files")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Response listTestFilesSync(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
-
- @Patch("/tests/{testId}/app-components")
- @ExpectedResponses({ 200, 201 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> createOrUpdateAppComponents(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @QueryParam("api-version") String apiVersion,
- @BodyParam("application/merge-patch+json") BinaryData body, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
-
- @Patch("/tests/{testId}/app-components")
- @ExpectedResponses({ 200, 201 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Response createOrUpdateAppComponentsSync(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @QueryParam("api-version") String apiVersion,
- @BodyParam("application/merge-patch+json") BinaryData body, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
-
- @Get("/tests/{testId}/app-components")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> getAppComponents(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
-
- @Get("/tests/{testId}/app-components")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Response getAppComponentsSync(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
-
- @Patch("/tests/{testId}/server-metrics-config")
- @ExpectedResponses({ 200, 201 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> createOrUpdateServerMetricsConfig(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @QueryParam("api-version") String apiVersion,
- @BodyParam("application/merge-patch+json") BinaryData body, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
-
- @Patch("/tests/{testId}/server-metrics-config")
- @ExpectedResponses({ 200, 201 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Response createOrUpdateServerMetricsConfigSync(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @QueryParam("api-version") String apiVersion,
- @BodyParam("application/merge-patch+json") BinaryData body, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
-
- @Get("/tests/{testId}/server-metrics-config")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> getServerMetricsConfig(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
-
- @Get("/tests/{testId}/server-metrics-config")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Response getServerMetricsConfigSync(@HostParam("Endpoint") String endpoint,
- @PathParam("testId") String testId, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
-
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> listTestsNext(@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 listTestsNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions,
- Context context);
-
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
- @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
- @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> listTestFilesNext(@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 listTestFilesNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions,
- Context context);
- }
-
- /**
- * Create a new test or update an existing test.
- * Request Body Schema
- *
- *
- * {@code
- * {
- * passFailCriteria (Optional): {
- * passFailMetrics (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)
- * 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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * Response Body Schema
- *
- *
- * {@code
- * {
- * passFailCriteria (Optional): {
- * passFailMetrics (Optional): {
- * String (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)
- * 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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param body Load test model.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return load test model along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> createOrUpdateTestWithResponseAsync(String testId, BinaryData body,
- RequestOptions requestOptions) {
- final String accept = "application/json";
- return FluxUtil.withContext(context -> service.createOrUpdateTest(this.client.getEndpoint(), testId,
- this.client.getServiceVersion().getVersion(), body, accept, requestOptions, context));
- }
-
- /**
- * Create a new test or update an existing test.
- * Request Body Schema
- *
- *
- * {@code
- * {
- * passFailCriteria (Optional): {
- * passFailMetrics (Optional): {
- * String (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)
- * 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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * Response Body Schema
- *
- *
- * {@code
- * {
- * passFailCriteria (Optional): {
- * passFailMetrics (Optional): {
- * String (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)
- * 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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param body Load test model.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return load test model along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateTestWithResponse(String testId, BinaryData body,
- RequestOptions requestOptions) {
- final String accept = "application/json";
- return service.createOrUpdateTestSync(this.client.getEndpoint(), testId,
- this.client.getServiceVersion().getVersion(), body, accept, requestOptions, Context.NONE);
- }
-
- /**
- * Delete a test by its name.
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> deleteTestWithResponseAsync(String testId, RequestOptions requestOptions) {
- final String accept = "application/json";
- return FluxUtil.withContext(context -> service.deleteTest(this.client.getEndpoint(), testId,
- this.client.getServiceVersion().getVersion(), accept, requestOptions, context));
- }
-
- /**
- * Delete a test by its name.
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteTestWithResponse(String testId, RequestOptions requestOptions) {
- final String accept = "application/json";
- return service.deleteTestSync(this.client.getEndpoint(), testId, this.client.getServiceVersion().getVersion(),
- accept, requestOptions, Context.NONE);
- }
-
- /**
- * Get load test details by test name.
- * 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return load test details by test name along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getTestWithResponseAsync(String testId, RequestOptions requestOptions) {
- final String accept = "application/json";
- return FluxUtil.withContext(context -> service.getTest(this.client.getEndpoint(), testId,
- this.client.getServiceVersion().getVersion(), accept, requestOptions, context));
- }
-
- /**
- * Get load test details by test name.
- * 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return load test details by test name along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getTestWithResponse(String testId, RequestOptions requestOptions) {
- final String accept = "application/json";
- return service.getTestSync(this.client.getEndpoint(), testId, this.client.getServiceVersion().getVersion(),
- accept, requestOptions, Context.NONE);
- }
-
- /**
- * Get all load tests by the fully qualified resource Id e.g
- * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.
- * Query Parameters
- *
- * Query Parameters
- * Name | Type | Required | Description |
- * orderby | String | No | Sort on the supported fields in (field asc/desc) format. eg:
- * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime |
- * search | String | No | 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. |
- * lastModifiedStartTime | OffsetDateTime | No | Start DateTime(ISO 8601 literal format)
- * of the last updated time range to filter tests. |
- * lastModifiedEndTime | OffsetDateTime | No | End DateTime(ISO 8601 literal format) of
- * the last updated time range to filter tests. |
- * maxpagesize | Integer | No | Number of results in response. |
- *
- * You can add these to a request with {@link RequestOptions#addQueryParam}
- * 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return all load tests by the fully qualified resource Id e.g
- * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} along with
- * {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listTestsSinglePageAsync(RequestOptions requestOptions) {
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.listTests(this.client.getEndpoint(),
- this.client.getServiceVersion().getVersion(), accept, requestOptions, context))
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null));
- }
-
- /**
- * Get all load tests by the fully qualified resource Id e.g
- * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.
- * Query Parameters
- *
- * Query Parameters
- * Name | Type | Required | Description |
- * orderby | String | No | Sort on the supported fields in (field asc/desc) format. eg:
- * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime |
- * search | String | No | 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. |
- * lastModifiedStartTime | OffsetDateTime | No | Start DateTime(ISO 8601 literal format)
- * of the last updated time range to filter tests. |
- * lastModifiedEndTime | OffsetDateTime | No | End DateTime(ISO 8601 literal format) of
- * the last updated time range to filter tests. |
- * maxpagesize | Integer | No | Number of results in response. |
- *
- * You can add these to a request with {@link RequestOptions#addQueryParam}
- * 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return all load tests by the fully qualified resource Id e.g
- * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} as paginated
- * response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux listTestsAsync(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 listTestsSinglePageAsync(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 listTestsNextSinglePageAsync(nextLink, requestOptionsLocal);
- });
- }
-
- /**
- * Get all load tests by the fully qualified resource Id e.g
- * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.
- * Query Parameters
- *
- * Query Parameters
- * Name | Type | Required | Description |
- * orderby | String | No | Sort on the supported fields in (field asc/desc) format. eg:
- * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime |
- * search | String | No | 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. |
- * lastModifiedStartTime | OffsetDateTime | No | Start DateTime(ISO 8601 literal format)
- * of the last updated time range to filter tests. |
- * lastModifiedEndTime | OffsetDateTime | No | End DateTime(ISO 8601 literal format) of
- * the last updated time range to filter tests. |
- * maxpagesize | Integer | No | Number of results in response. |
- *
- * You can add these to a request with {@link RequestOptions#addQueryParam}
- * 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return all load tests by the fully qualified resource Id e.g
- * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} along with
- * {@link PagedResponse}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PagedResponse listTestsSinglePage(RequestOptions requestOptions) {
- final String accept = "application/json";
- Response res = service.listTestsSync(this.client.getEndpoint(),
- this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE);
- return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null);
- }
-
- /**
- * Get all load tests by the fully qualified resource Id e.g
- * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.
- * Query Parameters
- *
- * Query Parameters
- * Name | Type | Required | Description |
- * orderby | String | No | Sort on the supported fields in (field asc/desc) format. eg:
- * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime |
- * search | String | No | 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. |
- * lastModifiedStartTime | OffsetDateTime | No | Start DateTime(ISO 8601 literal format)
- * of the last updated time range to filter tests. |
- * lastModifiedEndTime | OffsetDateTime | No | End DateTime(ISO 8601 literal format) of
- * the last updated time range to filter tests. |
- * maxpagesize | Integer | No | Number of results in response. |
- *
- * You can add these to a request with {@link RequestOptions#addQueryParam}
- * 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return all load tests by the fully qualified resource Id e.g
- * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} as paginated
- * response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listTests(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 listTestsSinglePage(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 listTestsNextSinglePage(nextLink, requestOptionsLocal);
- });
- }
-
- /**
- * Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the
- * given test will be overwritten. File should be provided in the request body as application/octet-stream.
- * Query Parameters
- *
- * Query Parameters
- * Name | Type | Required | Description |
- * fileType | String | No | File type. Allowed values: "JMX_FILE", "USER_PROPERTIES",
- * "ADDITIONAL_ARTIFACTS". |
- *
- * You can add these to a request with {@link RequestOptions#addQueryParam}
- * Request Body Schema
- *
- *
- * {@code
- * BinaryData
- * }
- *
- *
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param fileName Unique name for test file with file extension like : App.jmx.
- * @param body The file content as application/octet-stream.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return file info along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> uploadTestFileWithResponseAsync(String testId, String fileName, BinaryData body,
- RequestOptions requestOptions) {
- final String accept = "application/json";
- return FluxUtil.withContext(context -> service.uploadTestFile(this.client.getEndpoint(), testId, fileName,
- this.client.getServiceVersion().getVersion(), body, accept, requestOptions, context));
- }
-
- /**
- * Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the
- * given test will be overwritten. File should be provided in the request body as application/octet-stream.
- * Query Parameters
- *
- * Query Parameters
- * Name | Type | Required | Description |
- * fileType | String | No | File type. Allowed values: "JMX_FILE", "USER_PROPERTIES",
- * "ADDITIONAL_ARTIFACTS". |
- *
- * You can add these to a request with {@link RequestOptions#addQueryParam}
- * Request Body Schema
- *
- *
- * {@code
- * BinaryData
- * }
- *
- *
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param fileName Unique name for test file with file extension like : App.jmx.
- * @param body The file content as application/octet-stream.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return file info along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response uploadTestFileWithResponse(String testId, String fileName, BinaryData body,
- RequestOptions requestOptions) {
- final String accept = "application/json";
- return service.uploadTestFileSync(this.client.getEndpoint(), testId, fileName,
- this.client.getServiceVersion().getVersion(), body, accept, requestOptions, Context.NONE);
- }
-
- /**
- * Get test file by the file name.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param fileName File name with file extension like app.jmx.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test file by the file name along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getTestFileWithResponseAsync(String testId, String fileName,
- RequestOptions requestOptions) {
- final String accept = "application/json";
- return FluxUtil.withContext(context -> service.getTestFile(this.client.getEndpoint(), testId, fileName,
- this.client.getServiceVersion().getVersion(), accept, requestOptions, context));
- }
-
- /**
- * Get test file by the file name.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param fileName File name with file extension like app.jmx.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test file by the file name along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) {
- final String accept = "application/json";
- return service.getTestFileSync(this.client.getEndpoint(), testId, fileName,
- this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE);
- }
-
- /**
- * Delete file by the file name for a test.
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param fileName File name with file extension like app.jmx.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @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.client.getEndpoint(), testId, fileName,
- this.client.getServiceVersion().getVersion(), accept, requestOptions, context));
- }
-
- /**
- * Delete file by the file name for a test.
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param fileName File name with file extension like app.jmx.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) {
- final String accept = "application/json";
- return service.deleteTestFileSync(this.client.getEndpoint(), testId, fileName,
- this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE);
- }
-
- /**
- * Get all test files.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param 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)
- private Mono> listTestFilesSinglePageAsync(String testId, RequestOptions requestOptions) {
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.listTestFiles(this.client.getEndpoint(), testId,
- this.client.getServiceVersion().getVersion(), accept, requestOptions, context))
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null));
- }
-
- /**
- * Get all test files.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if 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}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux listTestFilesAsync(String testId, RequestOptions requestOptions) {
- RequestOptions requestOptionsForNextPage = new RequestOptions();
- requestOptionsForNextPage.setContext(
- requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE);
- return new PagedFlux<>(() -> listTestFilesSinglePageAsync(testId, requestOptions),
- nextLink -> listTestFilesNextSinglePageAsync(nextLink, requestOptionsForNextPage));
- }
-
- /**
- * Get all test files.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param 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}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PagedResponse listTestFilesSinglePage(String testId, RequestOptions requestOptions) {
- final String accept = "application/json";
- Response res = service.listTestFilesSync(this.client.getEndpoint(), testId,
- this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE);
- return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null);
- }
-
- /**
- * Get all test files.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param 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}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listTestFiles(String testId, RequestOptions requestOptions) {
- RequestOptions requestOptionsForNextPage = new RequestOptions();
- requestOptionsForNextPage.setContext(
- requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE);
- return new PagedIterable<>(() -> listTestFilesSinglePage(testId, requestOptions),
- nextLink -> listTestFilesNextSinglePage(nextLink, requestOptionsForNextPage));
- }
-
- /**
- * Associate an app component (collection of azure resources) to a test.
- * Request Body Schema
- *
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * Response Body Schema
- *
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param body App Component model.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test app component along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> createOrUpdateAppComponentsWithResponseAsync(String testId, BinaryData body,
- RequestOptions requestOptions) {
- final String accept = "application/json";
- return FluxUtil.withContext(context -> service.createOrUpdateAppComponents(this.client.getEndpoint(), testId,
- this.client.getServiceVersion().getVersion(), body, accept, requestOptions, context));
- }
-
- /**
- * Associate an app component (collection of azure resources) to a test.
- * Request Body Schema
- *
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * Response Body Schema
- *
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param body App Component model.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test app component along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateAppComponentsWithResponse(String testId, BinaryData body,
- RequestOptions requestOptions) {
- final String accept = "application/json";
- return service.createOrUpdateAppComponentsSync(this.client.getEndpoint(), testId,
- this.client.getServiceVersion().getVersion(), body, accept, requestOptions, Context.NONE);
- }
-
- /**
- * Get associated app component (collection of azure resources) for the given test.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return associated app component (collection of azure resources) for the given test along with {@link Response}
- * on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getAppComponentsWithResponseAsync(String testId, RequestOptions requestOptions) {
- final String accept = "application/json";
- return FluxUtil.withContext(context -> service.getAppComponents(this.client.getEndpoint(), testId,
- this.client.getServiceVersion().getVersion(), accept, requestOptions, context));
- }
-
- /**
- * Get associated app component (collection of azure resources) for the given test.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * components (Required): {
- * String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
- * displayName: String (Optional)
- * resourceGroup: String (Optional)
- * subscriptionId: String (Optional)
- * kind: String (Optional)
- * }
- * }
- * testId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return associated app component (collection of azure resources) for the given test along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getAppComponentsWithResponse(String testId, RequestOptions requestOptions) {
- final String accept = "application/json";
- return service.getAppComponentsSync(this.client.getEndpoint(), testId,
- this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE);
- }
-
- /**
- * Configure server metrics for a test.
- * Request Body Schema
- *
- *
- * {@code
- * {
- * testId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
- * }
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * Response Body Schema
- *
- *
- * {@code
- * {
- * testId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
- * }
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param body Server metric configuration model.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test server metrics configuration along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> createOrUpdateServerMetricsConfigWithResponseAsync(String testId, BinaryData body,
- RequestOptions requestOptions) {
- final String accept = "application/json";
- return FluxUtil.withContext(context -> service.createOrUpdateServerMetricsConfig(this.client.getEndpoint(),
- testId, this.client.getServiceVersion().getVersion(), body, accept, requestOptions, context));
- }
-
- /**
- * Configure server metrics for a test.
- * Request Body Schema
- *
- *
- * {@code
- * {
- * testId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
- * }
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * Response Body Schema
- *
- *
- * {@code
- * {
- * testId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
- * }
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param body Server metric configuration model.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test server metrics configuration along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateServerMetricsConfigWithResponse(String testId, BinaryData body,
- RequestOptions requestOptions) {
- final String accept = "application/json";
- return service.createOrUpdateServerMetricsConfigSync(this.client.getEndpoint(), testId,
- this.client.getServiceVersion().getVersion(), body, accept, requestOptions, Context.NONE);
- }
-
- /**
- * List server metrics configuration for the given test.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * testId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
- * }
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test server metrics configuration along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getServerMetricsConfigWithResponseAsync(String testId,
- RequestOptions requestOptions) {
- final String accept = "application/json";
- return FluxUtil.withContext(context -> service.getServerMetricsConfig(this.client.getEndpoint(), testId,
- this.client.getServiceVersion().getVersion(), accept, requestOptions, context));
- }
-
- /**
- * List server metrics configuration for the given test.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * testId: String (Optional)
- * metrics (Optional): {
- * String (Required): {
- * id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
- * displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
- * unit: String (Optional)
- * resourceType: String (Required)
- * }
- * }
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or
- * hyphen characters.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test server metrics configuration along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getServerMetricsConfigWithResponse(String testId, RequestOptions requestOptions) {
- final String accept = "application/json";
- return service.getServerMetricsConfigSync(this.client.getEndpoint(), testId,
- this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE);
- }
-
- /**
- * Get the next page of items.
- * 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param nextLink The 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 collection of tests along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listTestsNextSinglePageAsync(String nextLink,
- RequestOptions requestOptions) {
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.listTestsNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context))
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null));
- }
-
- /**
- * Get the next page of items.
- * 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/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 (Required): {
- * value: String (Optional)
- * type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
- * }
- * }
- * certificate (Optional): {
- * value: String (Optional)
- * type: String(AKV_CERT_URI) (Optional)
- * name: String (Optional)
- * }
- * environmentVariables (Optional): {
- * String: String (Required)
- * }
- * loadTestConfiguration (Optional): {
- * engineInstances: Integer (Optional)
- * splitAllCSVs: Boolean (Optional)
- * quickStartTest: Boolean (Optional)
- * optionalLoadTestConfig (Optional): {
- * endpointUrl: String (Optional)
- * virtualUsers: Integer (Optional)
- * rampUpTime: Integer (Optional)
- * duration: Integer (Optional)
- * }
- * }
- * inputArtifacts (Optional): {
- * configFileInfo (Optional): {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
- * userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
- * inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
- * additionalFileInfo (Optional): [
- * (recursive schema, see above)
- * ]
- * }
- * testId: String (Optional)
- * description: String (Optional)
- * displayName: String (Optional)
- * subnetId: String (Optional)
- * keyvaultReferenceIdentityType: String (Optional)
- * keyvaultReferenceIdentityId: String (Optional)
- * createdDateTime: OffsetDateTime (Optional)
- * createdBy: String (Optional)
- * lastModifiedDateTime: OffsetDateTime (Optional)
- * lastModifiedBy: String (Optional)
- * }
- * }
- *
- *
- * @param nextLink The 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 collection of tests along with {@link PagedResponse}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PagedResponse listTestsNextSinglePage(String nextLink, RequestOptions requestOptions) {
- final String accept = "application/json";
- Response res
- = service.listTestsNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE);
- return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null);
- }
-
- /**
- * Get the next page of items.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param 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 collection of files along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listTestFilesNextSinglePageAsync(String nextLink,
- RequestOptions requestOptions) {
- final String accept = "application/json";
- return FluxUtil.withContext(
- context -> service.listTestFilesNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context))
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null));
- }
-
- /**
- * Get the next page of items.
- * Response Body Schema
- *
- *
- * {@code
- * {
- * url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
- * expireDateTime: OffsetDateTime (Optional)
- * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
- * validationFailureDetails: String (Optional)
- * }
- * }
- *
- *
- * @param 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 collection of files along with {@link PagedResponse}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PagedResponse listTestFilesNextSinglePage(String nextLink, RequestOptions requestOptions) {
- final String accept = "application/json";
- Response res
- = service.listTestFilesNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE);
- return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null);
- }
-
- private List getValues(BinaryData binaryData, String path) {
- try {
- Map, ?> obj = binaryData.toObject(Map.class);
- List> values = (List>) obj.get(path);
- return values.stream().map(BinaryData::fromObject).collect(Collectors.toList());
- } catch (RuntimeException e) {
- return null;
- }
- }
-
- private String getNextLink(BinaryData binaryData, String path) {
- try {
- Map, ?> obj = binaryData.toObject(Map.class);
- return (String) obj.get(path);
- } catch (RuntimeException e) {
- return null;
- }
- }
-}
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
new file mode 100644
index 0000000000000..7ba3c2addc698
--- /dev/null
+++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunClientImpl.java
@@ -0,0 +1,1150 @@
+// 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;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Host;
+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.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.exception.ClientAuthenticationException;
+import com.azure.core.exception.HttpResponseException;
+import com.azure.core.exception.ResourceModifiedException;
+import com.azure.core.exception.ResourceNotFoundException;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.UrlBuilder;
+import com.azure.core.util.serializer.JacksonAdapter;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.developer.loadtesting.LoadTestingServiceVersion;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import reactor.core.publisher.Mono;
+
+/**
+ * Initializes a new instance of the LoadTestRunClient type.
+ */
+public final class LoadTestRunClientImpl {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final LoadTestRunClientService service;
+
+ /**
+ */
+ private final String endpoint;
+
+ /**
+ * Gets.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Service version.
+ */
+ private final LoadTestingServiceVersion serviceVersion;
+
+ /**
+ * Gets Service version.
+ *
+ * @return the serviceVersion value.
+ */
+ public LoadTestingServiceVersion getServiceVersion() {
+ return this.serviceVersion;
+ }
+
+ /**
+ * The HTTP pipeline to send requests through.
+ */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /**
+ * The serializer to serialize an object into a string.
+ */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ public SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /**
+ * Initializes an instance of LoadTestRunClient client.
+ *
+ * @param endpoint
+ * @param serviceVersion Service version.
+ */
+ public LoadTestRunClientImpl(String endpoint, LoadTestingServiceVersion serviceVersion) {
+ this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(),
+ JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion);
+ }
+
+ /**
+ * Initializes an instance of LoadTestRunClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param endpoint
+ * @param serviceVersion Service version.
+ */
+ public LoadTestRunClientImpl(HttpPipeline httpPipeline, String endpoint, LoadTestingServiceVersion serviceVersion) {
+ this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion);
+ }
+
+ /**
+ * Initializes an instance of LoadTestRunClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param endpoint
+ * @param serviceVersion Service version.
+ */
+ public LoadTestRunClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint,
+ LoadTestingServiceVersion serviceVersion) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.endpoint = endpoint;
+ this.serviceVersion = serviceVersion;
+ this.service = RestProxy.create(LoadTestRunClientService.class, this.httpPipeline, this.getSerializerAdapter());
+ }
+
+ /**
+ * The interface defining all the services for LoadTestRunClient to be used by the proxy service to perform REST
+ * calls.
+ */
+ @Host("https://{endpoint}")
+ @ServiceInterface(name = "LoadTestRunClient")
+ public interface LoadTestRunClientService {
+ @Patch("/test-profile-runs/{testProfileRunId}")
+ @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> createOrUpdateTestProfileRun(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("testProfileRunId") String testProfileRunId,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/merge-patch+json") BinaryData body, RequestOptions requestOptions, Context context);
+
+ @Delete("/test-profile-runs/{testProfileRunId}")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
+ @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);
+
+ @Get("/test-profile-runs/{testProfileRunId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> getTestProfileRun(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("testProfileRunId") String testProfileRunId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+
+ @Get("/test-profile-runs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> listTestProfileRuns(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions, Context context);
+
+ @Post("/test-profile-runs/{testProfileRunId}:stop")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> stopTestProfileRun(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("testProfileRunId") String testProfileRunId,
+ @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> listTestProfileRunsNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ }
+
+ /**
+ * Create and start a new test profile run.
+ *
+ * Create and start a new test profile run with the given test profile run Id.
+ *