Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.1 (2022-03-15)

- Azure Resource Manager LoadTest client library for Java. This package contains Microsoft Azure SDK for LoadTest Management SDK. LoadTest client provides access to LoadTest Resource and it's status operations. Package tag package-2021-12-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-loadtestservice</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static Configurable configure() {

/** The Configurable allowing configurations to be set. */
public static final class Configurable {
private final ClientLogger logger = new ClientLogger(Configurable.class);
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);

private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
Expand Down Expand Up @@ -152,9 +152,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
this.defaultPollInterval =
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
throw LOGGER
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface LoadTestsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return list of resources page result.
* @return list of resources page result as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<LoadTestResourceInner> list();
Expand All @@ -33,7 +33,7 @@ public interface LoadTestsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return list of resources page result.
* @return list of resources page result as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<LoadTestResourceInner> list(Context context);
Expand All @@ -45,7 +45,7 @@ public interface LoadTestsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return list of resources page result.
* @return list of resources page result as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<LoadTestResourceInner> listByResourceGroup(String resourceGroupName);
Expand All @@ -58,7 +58,7 @@ public interface LoadTestsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return list of resources page result.
* @return list of resources page result as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<LoadTestResourceInner> listByResourceGroup(String resourceGroupName, Context context);
Expand All @@ -85,7 +85,7 @@ public interface LoadTestsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a LoadTest resource.
* @return a LoadTest resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<LoadTestResourceInner> getByResourceGroupWithResponse(
Expand Down Expand Up @@ -116,7 +116,7 @@ LoadTestResourceInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return loadTest details.
* @return loadTest details along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<LoadTestResourceInner> createOrUpdateWithResponse(
Expand Down Expand Up @@ -149,7 +149,7 @@ LoadTestResourceInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return loadTest details.
* @return loadTest details along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<LoadTestResourceInner> updateWithResponse(
Expand All @@ -166,7 +166,7 @@ Response<LoadTestResourceInner> updateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String loadTestName);
Expand All @@ -180,7 +180,7 @@ Response<LoadTestResourceInner> updateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String loadTestName, Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public interface OperationsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of REST API operations supported by an Azure Resource Provider.
* @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
* PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OperationInner> list();
Expand All @@ -29,7 +30,8 @@ public interface OperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of REST API operations supported by an Azure Resource Provider.
* @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
* PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OperationInner> list(Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
package com.azure.resourcemanager.loadtestservice.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.loadtestservice.models.ResourceState;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** LoadTest resource properties. */
@Fluent
public final class LoadTestProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(LoadTestProperties.class);

/*
* Description of the resource.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.loadtestservice.models.ResourceState;
import com.azure.resourcemanager.loadtestservice.models.SystemAssignedServiceIdentity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** LoadTest details. */
@Fluent
public final class LoadTestResourceInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(LoadTestResourceInner.class);

/*
* Load Test resource properties
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@
package com.azure.resourcemanager.loadtestservice.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.loadtestservice.models.ActionType;
import com.azure.resourcemanager.loadtestservice.models.OperationDisplay;
import com.azure.resourcemanager.loadtestservice.models.Origin;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */
@Fluent
public final class OperationInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);

/*
* The name of the operation, as per Resource-Based Access Control (RBAC).
* Examples: "Microsoft.Compute/virtualMachines/write",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
/** Initializes a new instance of the LoadTestClientImpl type. */
@ServiceClient(builder = LoadTestClientBuilder.class)
public final class LoadTestClientImpl implements LoadTestClient {
private final ClientLogger logger = new ClientLogger(LoadTestClientImpl.class);

/** The ID of the target subscription. */
private final String subscriptionId;

Expand Down Expand Up @@ -245,7 +243,7 @@ public <T, U> Mono<U> getLroFinalResultOrError(AsyncPollResponse<PollResult<T>,
managementError = null;
}
} catch (IOException | RuntimeException ioe) {
logger.logThrowableAsWarning(ioe);
LOGGER.logThrowableAsWarning(ioe);
}
}
} else {
Expand Down Expand Up @@ -304,4 +302,6 @@ public Mono<String> getBodyAsString(Charset charset) {
return Mono.just(new String(responseBody, charset));
}
}

private static final ClientLogger LOGGER = new ClientLogger(LoadTestClientImpl.class);
}
Loading