Skip to content

Commit

Permalink
CodeGen from PR 16847 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Add Track2 release go tag (Azure#16847)

* Add Track2 release go tag

* recover
  • Loading branch information
SDKAuto committed Jan 5, 2022
1 parent 09a1a88 commit 9bdbe8f
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 12 deletions.
4 changes: 3 additions & 1 deletion sdk/billing/azure-resourcemanager-billing/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2022-01-05)

- 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).

### Features Added

Expand Down
2 changes: 1 addition & 1 deletion sdk/billing/azure-resourcemanager-billing/README.md
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-billing</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
Expand Down Expand Up @@ -69,6 +70,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

/** Entry point to BillingManager. Billing client provides access to billing resources for Azure subscriptions. */
public final class BillingManager {
Expand Down Expand Up @@ -250,7 +252,7 @@ public BillingManager authenticate(TokenCredential credential, AzureProfile prof
.append("-")
.append("com.azure.resourcemanager.billing")
.append("/")
.append("1.0.0-beta.2");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand All @@ -273,11 +275,24 @@ public BillingManager authenticate(TokenCredential credential, AzureProfile prof
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
policies
.addAll(
this
.policies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies);
policies
.addAll(
this
.policies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ private PollerFlux<PollResult<BillingAccountInner>, BillingAccountInner> beginUp
this.client.getHttpPipeline(),
BillingAccountInner.class,
BillingAccountInner.class,
Context.NONE);
this.client.getContext());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ private PollerFlux<PollResult<BillingProfileInner>, BillingProfileInner> beginCr
this.client.getHttpPipeline(),
BillingProfileInner.class,
BillingProfileInner.class,
Context.NONE);
this.client.getContext());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ private PollerFlux<PollResult<BillingSubscriptionInner>, BillingSubscriptionInne
this.client.getHttpPipeline(),
BillingSubscriptionInner.class,
BillingSubscriptionInner.class,
Context.NONE);
this.client.getContext());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ private PollerFlux<PollResult<InvoiceSectionInner>, InvoiceSectionInner> beginCr
this.client.getHttpPipeline(),
InvoiceSectionInner.class,
InvoiceSectionInner.class,
Context.NONE);
this.client.getContext());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,11 @@ private PollerFlux<PollResult<DownloadUrlInner>, DownloadUrlInner> beginDownload
return this
.client
.<DownloadUrlInner, DownloadUrlInner>getLroResult(
mono, this.client.getHttpPipeline(), DownloadUrlInner.class, DownloadUrlInner.class, Context.NONE);
mono,
this.client.getHttpPipeline(),
DownloadUrlInner.class,
DownloadUrlInner.class,
this.client.getContext());
}

/**
Expand Down Expand Up @@ -1234,7 +1238,11 @@ private PollerFlux<PollResult<DownloadUrlInner>, DownloadUrlInner> beginDownload
return this
.client
.<DownloadUrlInner, DownloadUrlInner>getLroResult(
mono, this.client.getHttpPipeline(), DownloadUrlInner.class, DownloadUrlInner.class, Context.NONE);
mono,
this.client.getHttpPipeline(),
DownloadUrlInner.class,
DownloadUrlInner.class,
this.client.getContext());
}

/**
Expand Down Expand Up @@ -1801,7 +1809,11 @@ private PollerFlux<PollResult<DownloadUrlInner>, DownloadUrlInner> beginDownload
return this
.client
.<DownloadUrlInner, DownloadUrlInner>getLroResult(
mono, this.client.getHttpPipeline(), DownloadUrlInner.class, DownloadUrlInner.class, Context.NONE);
mono,
this.client.getHttpPipeline(),
DownloadUrlInner.class,
DownloadUrlInner.class,
this.client.getContext());
}

/**
Expand Down Expand Up @@ -2024,7 +2036,11 @@ private Mono<Response<Flux<ByteBuffer>>> downloadMultipleBillingSubscriptionInvo
return this
.client
.<DownloadUrlInner, DownloadUrlInner>getLroResult(
mono, this.client.getHttpPipeline(), DownloadUrlInner.class, DownloadUrlInner.class, Context.NONE);
mono,
this.client.getHttpPipeline(),
DownloadUrlInner.class,
DownloadUrlInner.class,
this.client.getContext());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ public final class InvoiceListResult {
@JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;

/*
* Total number of records.
*/
@JsonProperty(value = "totalCount", access = JsonProperty.Access.WRITE_ONLY)
private Integer totalCount;

/**
* Get the value property: The list of invoices.
*
Expand All @@ -46,6 +52,15 @@ public String nextLink() {
return this.nextLink;
}

/**
* Get the totalCount property: Total number of records.
*
* @return the totalCount value.
*/
public Integer totalCount() {
return this.totalCount;
}

/**
* Validates the instance.
*
Expand Down

0 comments on commit 9bdbe8f

Please sign in to comment.