Skip to content

Commit fc94528

Browse files
author
SDKAuto
committed
CodeGen from PR 17715 in Azure/azure-rest-api-specs
Merge 4ebdac46110ec44a431a9ea2b6a9b98514939414 into 9673e2239f4f8257b2e916df2d15e1ef41c5bfd1
1 parent e421a6a commit fc94528

File tree

65 files changed

+769
-449
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+769
-449
lines changed

sdk/billing/azure-resourcemanager-billing/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.3 (Unreleased)
3+
## 1.0.0-beta.1 (2022-02-09)
4+
5+
- Azure Resource Manager Billing client library for Java. This package contains Microsoft Azure SDK for Billing Management SDK. Billing client provides access to billing resources for Azure subscriptions. Package tag package-2020-05. 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/billing/azure-resourcemanager-billing/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-billing</artifactId>
35-
<version>1.0.0-beta.2</version>
35+
<version>1.0.0-beta.3</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/BillingManager.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.azure.core.http.HttpClient;
99
import com.azure.core.http.HttpPipeline;
1010
import com.azure.core.http.HttpPipelineBuilder;
11+
import com.azure.core.http.HttpPipelinePosition;
1112
import com.azure.core.http.policy.AddDatePolicy;
1213
import com.azure.core.http.policy.HttpLogOptions;
1314
import com.azure.core.http.policy.HttpLoggingPolicy;
@@ -69,6 +70,7 @@
6970
import java.util.ArrayList;
7071
import java.util.List;
7172
import java.util.Objects;
73+
import java.util.stream.Collectors;
7274

7375
/** Entry point to BillingManager. Billing client provides access to billing resources for Azure subscriptions. */
7476
public final class BillingManager {
@@ -250,7 +252,7 @@ public BillingManager authenticate(TokenCredential credential, AzureProfile prof
250252
.append("-")
251253
.append("com.azure.resourcemanager.billing")
252254
.append("/")
253-
.append("1.0.0-beta.2");
255+
.append("1.0.0-beta.1");
254256
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
255257
userAgentBuilder
256258
.append(" (")
@@ -273,11 +275,24 @@ public BillingManager authenticate(TokenCredential credential, AzureProfile prof
273275
List<HttpPipelinePolicy> policies = new ArrayList<>();
274276
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
275277
policies.add(new RequestIdPolicy());
278+
policies
279+
.addAll(
280+
this
281+
.policies
282+
.stream()
283+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
284+
.collect(Collectors.toList()));
276285
HttpPolicyProviders.addBeforeRetryPolicies(policies);
277286
policies.add(retryPolicy);
278287
policies.add(new AddDatePolicy());
279288
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
280-
policies.addAll(this.policies);
289+
policies
290+
.addAll(
291+
this
292+
.policies
293+
.stream()
294+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
295+
.collect(Collectors.toList()));
281296
HttpPolicyProviders.addAfterRetryPolicies(policies);
282297
policies.add(new HttpLoggingPolicy(httpLogOptions));
283298
HttpPipeline httpPipeline =

sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AddressClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public interface AddressClient {
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 result of the address validation.
36+
* @return result of the address validation along with {@link Response}.
3737
*/
3838
@ServiceMethod(returns = ReturnType.SINGLE)
3939
Response<ValidateAddressResponseInner> validateWithResponse(AddressDetails address, Context context);

sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AgreementsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public interface AgreementsClient {
6262
* @throws IllegalArgumentException thrown if parameters fail the validation.
6363
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
6464
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
65-
* @return an agreement by ID.
65+
* @return an agreement by ID along with {@link Response}.
6666
*/
6767
@ServiceMethod(returns = ReturnType.SINGLE)
6868
Response<AgreementInner> getWithResponse(

sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AvailableBalancesClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public interface AvailableBalancesClient {
3838
* @throws IllegalArgumentException thrown if parameters fail the validation.
3939
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
4040
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
41-
* @return the latest Azure credit balance.
41+
* @return the latest Azure credit balance along with {@link Response}.
4242
*/
4343
@ServiceMethod(returns = ReturnType.SINGLE)
4444
Response<AvailableBalanceInner> getWithResponse(

sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingAccountsClient.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import com.azure.resourcemanager.billing.fluent.models.BillingAccountInner;
1515
import com.azure.resourcemanager.billing.fluent.models.InvoiceSectionWithCreateSubPermissionInner;
1616
import com.azure.resourcemanager.billing.models.BillingAccountUpdateRequest;
17+
import reactor.core.publisher.Mono;
1718

1819
/** An instance of this class provides access to all the operations defined in BillingAccountsClient. */
1920
public interface BillingAccountsClient {
@@ -61,7 +62,7 @@ public interface BillingAccountsClient {
6162
* @throws IllegalArgumentException thrown if parameters fail the validation.
6263
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
6364
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
64-
* @return a billing account by its ID.
65+
* @return a billing account by its ID along with {@link Response}.
6566
*/
6667
@ServiceMethod(returns = ReturnType.SINGLE)
6768
Response<BillingAccountInner> getWithResponse(String billingAccountName, String expand, Context context);
@@ -75,7 +76,7 @@ public interface BillingAccountsClient {
7576
* @throws IllegalArgumentException thrown if parameters fail the validation.
7677
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
7778
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
78-
* @return a billing account.
79+
* @return a billing account along with {@link Response} on successful completion of {@link Mono}.
7980
*/
8081
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
8182
SyncPoller<PollResult<BillingAccountInner>, BillingAccountInner> beginUpdate(
@@ -91,7 +92,7 @@ SyncPoller<PollResult<BillingAccountInner>, BillingAccountInner> beginUpdate(
9192
* @throws IllegalArgumentException thrown if parameters fail the validation.
9293
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
9394
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
94-
* @return a billing account.
95+
* @return a billing account along with {@link Response} on successful completion of {@link Mono}.
9596
*/
9697
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
9798
SyncPoller<PollResult<BillingAccountInner>, BillingAccountInner> beginUpdate(

sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPeriodsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public interface BillingPeriodsClient {
6767
* @throws IllegalArgumentException thrown if parameters fail the validation.
6868
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
6969
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
70-
* @return a named billing period.
70+
* @return a named billing period along with {@link Response}.
7171
*/
7272
@ServiceMethod(returns = ReturnType.SINGLE)
7373
Response<BillingPeriodInner> getWithResponse(String billingPeriodName, Context context);

sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingProfilesClient.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.azure.core.util.Context;
1313
import com.azure.core.util.polling.SyncPoller;
1414
import com.azure.resourcemanager.billing.fluent.models.BillingProfileInner;
15+
import reactor.core.publisher.Mono;
1516

1617
/** An instance of this class provides access to all the operations defined in BillingProfilesClient. */
1718
public interface BillingProfilesClient {
@@ -68,7 +69,7 @@ public interface BillingProfilesClient {
6869
* @throws IllegalArgumentException thrown if parameters fail the validation.
6970
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
7071
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
71-
* @return a billing profile by its ID.
72+
* @return a billing profile by its ID along with {@link Response}.
7273
*/
7374
@ServiceMethod(returns = ReturnType.SINGLE)
7475
Response<BillingProfileInner> getWithResponse(
@@ -84,7 +85,7 @@ Response<BillingProfileInner> getWithResponse(
8485
* @throws IllegalArgumentException thrown if parameters fail the validation.
8586
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
8687
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
87-
* @return a billing profile.
88+
* @return a billing profile along with {@link Response} on successful completion of {@link Mono}.
8889
*/
8990
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
9091
SyncPoller<PollResult<BillingProfileInner>, BillingProfileInner> beginCreateOrUpdate(
@@ -101,7 +102,7 @@ SyncPoller<PollResult<BillingProfileInner>, BillingProfileInner> beginCreateOrUp
101102
* @throws IllegalArgumentException thrown if parameters fail the validation.
102103
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
103104
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
104-
* @return a billing profile.
105+
* @return a billing profile along with {@link Response} on successful completion of {@link Mono}.
105106
*/
106107
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
107108
SyncPoller<PollResult<BillingProfileInner>, BillingProfileInner> beginCreateOrUpdate(

sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPropertiesClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public interface BillingPropertiesClient {
3131
* @throws IllegalArgumentException thrown if parameters fail the validation.
3232
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
3333
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
34-
* @return the billing properties for a subscription.
34+
* @return the billing properties for a subscription along with {@link Response}.
3535
*/
3636
@ServiceMethod(returns = ReturnType.SINGLE)
3737
Response<BillingPropertyInner> getWithResponse(Context context);
@@ -58,7 +58,7 @@ public interface BillingPropertiesClient {
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 a billing property.
61+
* @return a billing property along with {@link Response}.
6262
*/
6363
@ServiceMethod(returns = ReturnType.SINGLE)
6464
Response<BillingPropertyInner> updateWithResponse(BillingPropertyInner parameters, Context context);

0 commit comments

Comments
 (0)