Skip to content

Commit eb10a06

Browse files
author
SDKAuto
committed
CodeGen from PR 16730 in Azure/azure-rest-api-specs
Merge b0cfbc97b8d31212753716c9c2d36fa6b87ad56f into 9903ac0d18bab43964f5c216b7638bd2964eaac5
1 parent 9f6cca2 commit eb10a06

File tree

5 files changed

+40
-13
lines changed

5 files changed

+40
-13
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 (2021-11-10)
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/pom.xml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@
3838
</developers>
3939
<properties>
4040
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41-
<legal><![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
41+
<jacoco.skip.coverage.check>true</jacoco.skip.coverage.check>
42+
<skipNewCodesnippetTooling>false</skipNewCodesnippetTooling>
43+
<javadocDoclet></javadocDoclet>
44+
<javadocDocletOptions></javadocDocletOptions>
4245
</properties>
4346
<dependencies>
4447
<dependency>
@@ -54,14 +57,6 @@
5457
</dependencies>
5558
<build>
5659
<plugins>
57-
<plugin>
58-
<groupId>org.jacoco</groupId>
59-
<artifactId>jacoco-maven-plugin</artifactId>
60-
<version>0.8.7</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
61-
<configuration>
62-
<skip>true</skip>
63-
</configuration>
64-
</plugin>
6560
<plugin>
6661
<groupId>org.revapi</groupId>
6762
<artifactId>revapi-maven-plugin</artifactId>

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/models/InvoiceListResult.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ public final class InvoiceListResult {
2828
@JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
2929
private String nextLink;
3030

31+
/*
32+
* Total number of records.
33+
*/
34+
@JsonProperty(value = "totalCount", access = JsonProperty.Access.WRITE_ONLY)
35+
private Integer totalCount;
36+
3137
/**
3238
* Get the value property: The list of invoices.
3339
*
@@ -46,6 +52,15 @@ public String nextLink() {
4652
return this.nextLink;
4753
}
4854

55+
/**
56+
* Get the totalCount property: Total number of records.
57+
*
58+
* @return the totalCount value.
59+
*/
60+
public Integer totalCount() {
61+
return this.totalCount;
62+
}
63+
4964
/**
5065
* Validates the instance.
5166
*

0 commit comments

Comments
 (0)