Skip to content

Commit e4653d2

Browse files
author
SDKAuto
committed
CodeGen from PR 18193 in Azure/azure-rest-api-specs
Merge 65898c1c672899037eff6da141b5a18b5180853a into 9aff6fbac1975af94f6a3bc415be84f67d3311ee
1 parent 48cb91c commit e4653d2

21 files changed

+101
-126
lines changed

sdk/loadtestservice/azure-resourcemanager-loadtestservice/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

3-
## 1.0.0-beta.2 (Unreleased)
3+
## 1.0.0-beta.1 (2022-03-15)
4+
5+
- 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).
46

57
### Features Added
68

sdk/loadtestservice/azure-resourcemanager-loadtestservice/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-loadtestservice</artifactId>
35-
<version>1.0.0-beta.1</version>
35+
<version>1.0.0-beta.2</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/LoadTestManager.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static Configurable configure() {
7878

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

8383
private HttpClient httpClient;
8484
private HttpLogOptions httpLogOptions;
@@ -152,9 +152,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
152152
* @return the configurable object itself.
153153
*/
154154
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
155-
this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
155+
this.defaultPollInterval =
156+
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
156157
if (this.defaultPollInterval.isNegative()) {
157-
throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
158+
throw LOGGER
159+
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
158160
}
159161
return this;
160162
}

sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/LoadTestsClient.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public interface LoadTestsClient {
2121
*
2222
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2323
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
24-
* @return list of resources page result.
24+
* @return list of resources page result as paginated response with {@link PagedIterable}.
2525
*/
2626
@ServiceMethod(returns = ReturnType.COLLECTION)
2727
PagedIterable<LoadTestResourceInner> list();
@@ -33,7 +33,7 @@ public interface LoadTestsClient {
3333
* @throws IllegalArgumentException thrown if parameters fail the validation.
3434
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
3535
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
36-
* @return list of resources page result.
36+
* @return list of resources page result as paginated response with {@link PagedIterable}.
3737
*/
3838
@ServiceMethod(returns = ReturnType.COLLECTION)
3939
PagedIterable<LoadTestResourceInner> list(Context context);
@@ -45,7 +45,7 @@ public interface LoadTestsClient {
4545
* @throws IllegalArgumentException thrown if parameters fail the validation.
4646
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
4747
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
48-
* @return list of resources page result.
48+
* @return list of resources page result as paginated response with {@link PagedIterable}.
4949
*/
5050
@ServiceMethod(returns = ReturnType.COLLECTION)
5151
PagedIterable<LoadTestResourceInner> listByResourceGroup(String resourceGroupName);
@@ -58,7 +58,7 @@ public interface LoadTestsClient {
5858
* @throws IllegalArgumentException thrown if parameters fail the validation.
5959
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
6060
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
61-
* @return list of resources page result.
61+
* @return list of resources page result as paginated response with {@link PagedIterable}.
6262
*/
6363
@ServiceMethod(returns = ReturnType.COLLECTION)
6464
PagedIterable<LoadTestResourceInner> listByResourceGroup(String resourceGroupName, Context context);
@@ -85,7 +85,7 @@ public interface LoadTestsClient {
8585
* @throws IllegalArgumentException thrown if parameters fail the validation.
8686
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
8787
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
88-
* @return a LoadTest resource.
88+
* @return a LoadTest resource along with {@link Response}.
8989
*/
9090
@ServiceMethod(returns = ReturnType.SINGLE)
9191
Response<LoadTestResourceInner> getByResourceGroupWithResponse(
@@ -116,7 +116,7 @@ LoadTestResourceInner createOrUpdate(
116116
* @throws IllegalArgumentException thrown if parameters fail the validation.
117117
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
118118
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
119-
* @return loadTest details.
119+
* @return loadTest details along with {@link Response}.
120120
*/
121121
@ServiceMethod(returns = ReturnType.SINGLE)
122122
Response<LoadTestResourceInner> createOrUpdateWithResponse(
@@ -149,7 +149,7 @@ LoadTestResourceInner update(
149149
* @throws IllegalArgumentException thrown if parameters fail the validation.
150150
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
151151
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
152-
* @return loadTest details.
152+
* @return loadTest details along with {@link Response}.
153153
*/
154154
@ServiceMethod(returns = ReturnType.SINGLE)
155155
Response<LoadTestResourceInner> updateWithResponse(
@@ -166,7 +166,7 @@ Response<LoadTestResourceInner> updateWithResponse(
166166
* @throws IllegalArgumentException thrown if parameters fail the validation.
167167
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
168168
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
169-
* @return the completion.
169+
* @return the {@link SyncPoller} for polling of long-running operation.
170170
*/
171171
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
172172
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String loadTestName);
@@ -180,7 +180,7 @@ Response<LoadTestResourceInner> updateWithResponse(
180180
* @throws IllegalArgumentException thrown if parameters fail the validation.
181181
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
182182
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
183-
* @return the completion.
183+
* @return the {@link SyncPoller} for polling of long-running operation.
184184
*/
185185
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
186186
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String loadTestName, Context context);

sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/OperationsClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ public interface OperationsClient {
1717
*
1818
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
1919
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
20-
* @return a list of REST API operations supported by an Azure Resource Provider.
20+
* @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
21+
* PagedIterable}.
2122
*/
2223
@ServiceMethod(returns = ReturnType.COLLECTION)
2324
PagedIterable<OperationInner> list();
@@ -29,7 +30,8 @@ public interface OperationsClient {
2930
* @throws IllegalArgumentException thrown if parameters fail the validation.
3031
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
3132
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
32-
* @return a list of REST API operations supported by an Azure Resource Provider.
33+
* @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
34+
* PagedIterable}.
3335
*/
3436
@ServiceMethod(returns = ReturnType.COLLECTION)
3537
PagedIterable<OperationInner> list(Context context);

sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/LoadTestProperties.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@
55
package com.azure.resourcemanager.loadtestservice.fluent.models;
66

77
import com.azure.core.annotation.Fluent;
8-
import com.azure.core.util.logging.ClientLogger;
98
import com.azure.resourcemanager.loadtestservice.models.ResourceState;
10-
import com.fasterxml.jackson.annotation.JsonIgnore;
119
import com.fasterxml.jackson.annotation.JsonProperty;
1210

1311
/** LoadTest resource properties. */
1412
@Fluent
1513
public final class LoadTestProperties {
16-
@JsonIgnore private final ClientLogger logger = new ClientLogger(LoadTestProperties.class);
17-
1814
/*
1915
* Description of the resource.
2016
*/

sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/LoadTestResourceInner.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,14 @@
66

77
import com.azure.core.annotation.Fluent;
88
import com.azure.core.management.Resource;
9-
import com.azure.core.util.logging.ClientLogger;
109
import com.azure.resourcemanager.loadtestservice.models.ResourceState;
1110
import com.azure.resourcemanager.loadtestservice.models.SystemAssignedServiceIdentity;
12-
import com.fasterxml.jackson.annotation.JsonIgnore;
1311
import com.fasterxml.jackson.annotation.JsonProperty;
1412
import java.util.Map;
1513

1614
/** LoadTest details. */
1715
@Fluent
1816
public final class LoadTestResourceInner extends Resource {
19-
@JsonIgnore private final ClientLogger logger = new ClientLogger(LoadTestResourceInner.class);
20-
2117
/*
2218
* Load Test resource properties
2319
*/

sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/OperationInner.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,14 @@
55
package com.azure.resourcemanager.loadtestservice.fluent.models;
66

77
import com.azure.core.annotation.Fluent;
8-
import com.azure.core.util.logging.ClientLogger;
98
import com.azure.resourcemanager.loadtestservice.models.ActionType;
109
import com.azure.resourcemanager.loadtestservice.models.OperationDisplay;
1110
import com.azure.resourcemanager.loadtestservice.models.Origin;
12-
import com.fasterxml.jackson.annotation.JsonIgnore;
1311
import com.fasterxml.jackson.annotation.JsonProperty;
1412

1513
/** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */
1614
@Fluent
1715
public final class OperationInner {
18-
@JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
19-
2016
/*
2117
* The name of the operation, as per Resource-Based Access Control (RBAC).
2218
* Examples: "Microsoft.Compute/virtualMachines/write",

sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/implementation/LoadTestClientImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
/** Initializes a new instance of the LoadTestClientImpl type. */
3838
@ServiceClient(builder = LoadTestClientBuilder.class)
3939
public final class LoadTestClientImpl implements LoadTestClient {
40-
private final ClientLogger logger = new ClientLogger(LoadTestClientImpl.class);
41-
4240
/** The ID of the target subscription. */
4341
private final String subscriptionId;
4442

@@ -245,7 +243,7 @@ public <T, U> Mono<U> getLroFinalResultOrError(AsyncPollResponse<PollResult<T>,
245243
managementError = null;
246244
}
247245
} catch (IOException | RuntimeException ioe) {
248-
logger.logThrowableAsWarning(ioe);
246+
LOGGER.logThrowableAsWarning(ioe);
249247
}
250248
}
251249
} else {
@@ -304,4 +302,6 @@ public Mono<String> getBodyAsString(Charset charset) {
304302
return Mono.just(new String(responseBody, charset));
305303
}
306304
}
305+
306+
private static final ClientLogger LOGGER = new ClientLogger(LoadTestClientImpl.class);
307307
}

0 commit comments

Comments
 (0)