Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-resourcemanager-containerservicefleet] fix the final-state-via options for PATCH LROs #9128

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.1.0-beta.1 (Unreleased)
## 1.0.0-beta.1 (2024-01-30)

- Azure Resource Manager ContainerServiceFleet client library for Java. This package contains Microsoft Azure SDK for ContainerServiceFleet Management SDK. Azure Kubernetes Fleet Manager Client. Package tag package-preview-2024-02. 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 @@ -2,7 +2,7 @@

Azure Resource Manager ContainerServiceFleet client library for Java.

This package contains Microsoft Azure SDK for ContainerServiceFleet Management SDK. Azure Kubernetes Fleet Manager Client. Package tag package-2023-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for ContainerServiceFleet Management SDK. Azure Kubernetes Fleet Manager Client. Package tag package-preview-2024-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-containerservicefleet</artifactId>
<version>1.0.0</version>
<version>1.1.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for ContainerServiceFleet Management</name>
<description>This package contains Microsoft Azure SDK for ContainerServiceFleet Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Kubernetes Fleet Manager Client. Package tag package-2023-10.</description>
<description>This package contains Microsoft Azure SDK for ContainerServiceFleet Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Kubernetes Fleet Manager Client. Package tag package-preview-2024-02.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand All @@ -45,6 +45,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -93,8 +94,6 @@
<version>4.11.0</version> <!-- {x-version-update;org.mockito:mockito-core;external_dependency} -->
<scope>test</scope>
</dependency>
<!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release -->
<!-- of Mockito supporting Java 8 as a baseline. -->
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
import java.util.Objects;
import java.util.stream.Collectors;

/** Entry point to ContainerServiceFleetManager. Azure Kubernetes Fleet Manager Client. */
/**
* Entry point to ContainerServiceFleetManager.
* Azure Kubernetes Fleet Manager Client.
*/
public final class ContainerServiceFleetManager {
private Operations operations;

Expand All @@ -56,22 +59,18 @@ public final class ContainerServiceFleetManager {

private final ContainerServiceFleetManagementClient clientObject;

private ContainerServiceFleetManager(
HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
private ContainerServiceFleetManager(HttpPipeline httpPipeline, AzureProfile profile,
Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
this.clientObject =
new ContainerServiceFleetManagementClientBuilder()
.pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
.buildClient();
this.clientObject = new ContainerServiceFleetManagementClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval).buildClient();
}

/**
* Creates an instance of ContainerServiceFleet service API entry point.
*
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
* @return the ContainerServiceFleet service API instance.
Expand All @@ -84,7 +83,7 @@ public static ContainerServiceFleetManager authenticate(TokenCredential credenti

/**
* Creates an instance of ContainerServiceFleet service API entry point.
*
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
* @return the ContainerServiceFleet service API instance.
Expand All @@ -97,14 +96,16 @@ public static ContainerServiceFleetManager authenticate(HttpPipeline httpPipelin

/**
* Gets a Configurable instance that can be used to create ContainerServiceFleetManager with optional configuration.
*
*
* @return the Configurable instance allowing configurations.
*/
public static Configurable configure() {
return new ContainerServiceFleetManager.Configurable();
}

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

Expand Down Expand Up @@ -176,8 +177,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {

/**
* Sets the retry options for the HTTP pipeline retry policy.
*
* <p>This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
* <p>
* This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
*
* @param retryOptions the retry options for the HTTP pipeline retry policy.
* @return the configurable object itself.
Expand All @@ -194,8 +195,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval =
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
this.defaultPollInterval
= Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
throw LOGGER
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
Expand All @@ -215,21 +216,12 @@ public ContainerServiceFleetManager authenticate(TokenCredential credential, Azu
Objects.requireNonNull(profile, "'profile' cannot be null.");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder
.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.containerservicefleet")
.append("/")
.append("1.0.0");
userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.containerservicefleet")
.append("/").append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.name"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.version"))
.append("; auto-generated)");
userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ")
.append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)");
} else {
userAgentBuilder.append(" (auto-generated)");
}
Expand All @@ -248,38 +240,25 @@ public ContainerServiceFleetManager authenticate(TokenCredential credential, Azu
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
this
.policies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.collect(Collectors.toList()));
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
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
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 =
new HttpPipelineBuilder()
.httpClient(httpClient)
.policies(policies.toArray(new HttpPipelinePolicy[0]))
.build();
HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
.policies(policies.toArray(new HttpPipelinePolicy[0])).build();
return new ContainerServiceFleetManager(httpPipeline, profile, defaultPollInterval);
}
}

/**
* Gets the resource collection API of Operations.
*
*
* @return Resource collection API of Operations.
*/
public Operations operations() {
Expand All @@ -291,7 +270,7 @@ public Operations operations() {

/**
* Gets the resource collection API of Fleets. It manages Fleet.
*
*
* @return Resource collection API of Fleets.
*/
public Fleets fleets() {
Expand All @@ -303,7 +282,7 @@ public Fleets fleets() {

/**
* Gets the resource collection API of FleetMembers. It manages FleetMember.
*
*
* @return Resource collection API of FleetMembers.
*/
public FleetMembers fleetMembers() {
Expand All @@ -315,7 +294,7 @@ public FleetMembers fleetMembers() {

/**
* Gets the resource collection API of UpdateRuns. It manages UpdateRun.
*
*
* @return Resource collection API of UpdateRuns.
*/
public UpdateRuns updateRuns() {
Expand All @@ -327,7 +306,7 @@ public UpdateRuns updateRuns() {

/**
* Gets the resource collection API of FleetUpdateStrategies. It manages FleetUpdateStrategy.
*
*
* @return Resource collection API of FleetUpdateStrategies.
*/
public FleetUpdateStrategies fleetUpdateStrategies() {
Expand All @@ -340,7 +319,7 @@ public FleetUpdateStrategies fleetUpdateStrategies() {
/**
* Gets wrapped service client ContainerServiceFleetManagementClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
*
*
* @return Wrapped service client ContainerServiceFleetManagementClient.
*/
public ContainerServiceFleetManagementClient serviceClient() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,74 +7,76 @@
import com.azure.core.http.HttpPipeline;
import java.time.Duration;

/** The interface for ContainerServiceFleetManagementClient class. */
/**
* The interface for ContainerServiceFleetManagementClient class.
*/
public interface ContainerServiceFleetManagementClient {
/**
* Gets The ID of the target subscription.
*
*
* @return the subscriptionId value.
*/
String getSubscriptionId();

/**
* Gets server parameter.
*
*
* @return the endpoint value.
*/
String getEndpoint();

/**
* Gets Api Version.
*
*
* @return the apiVersion value.
*/
String getApiVersion();

/**
* Gets The HTTP pipeline to send requests through.
*
*
* @return the httpPipeline value.
*/
HttpPipeline getHttpPipeline();

/**
* Gets The default poll interval for long-running operation.
*
*
* @return the defaultPollInterval value.
*/
Duration getDefaultPollInterval();

/**
* Gets the OperationsClient object to access its operations.
*
*
* @return the OperationsClient object.
*/
OperationsClient getOperations();

/**
* Gets the FleetsClient object to access its operations.
*
*
* @return the FleetsClient object.
*/
FleetsClient getFleets();

/**
* Gets the FleetMembersClient object to access its operations.
*
*
* @return the FleetMembersClient object.
*/
FleetMembersClient getFleetMembers();

/**
* Gets the UpdateRunsClient object to access its operations.
*
*
* @return the UpdateRunsClient object.
*/
UpdateRunsClient getUpdateRuns();

/**
* Gets the FleetUpdateStrategiesClient object to access its operations.
*
*
* @return the FleetUpdateStrategiesClient object.
*/
FleetUpdateStrategiesClient getFleetUpdateStrategies();
Expand Down
Loading
Loading