Skip to content

Commit

Permalink
CodeGen from PR 27306 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 83c582f04662f8e3661a8e100a2c6219eda17928 into d736c01be58a43b9297ed4f602c5018cd4fb8a5d
  • Loading branch information
SDKAuto committed Jan 9, 2024
1 parent d97e3e8 commit bfb01e9
Show file tree
Hide file tree
Showing 336 changed files with 11,685 additions and 9,403 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.1 (2024-01-09)

- Azure Resource Manager HDInsightContainers client library for Java. This package contains Microsoft Azure SDK for HDInsightContainers Management SDK. HDInsight Containers Management Client. Package tag package-preview-2023-11. 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 HDInsightContainers client library for Java.

This package contains Microsoft Azure SDK for HDInsightContainers Management SDK. HDInsight Containers Management Client. Package tag package-2023-06-preview. 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 HDInsightContainers Management SDK. HDInsight Containers Management Client. Package tag package-preview-2023-11. 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-hdinsight-containers</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen

### Authentication

By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
Expand Down Expand Up @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
Expand Down
789 changes: 362 additions & 427 deletions sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md

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 HDInsightContainers Management</name>
<description>This package contains Microsoft Azure SDK for HDInsightContainers Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. HDInsight Containers Management Client. Package tag package-2023-06-preview.</description>
<description>This package contains Microsoft Azure SDK for HDInsightContainers Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. HDInsight Containers Management Client. Package tag package-preview-2023-11.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,19 @@
import com.azure.resourcemanager.hdinsight.containers.fluent.HDInsightContainersManagementClient;
import com.azure.resourcemanager.hdinsight.containers.implementation.AvailableClusterPoolVersionsImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.AvailableClusterVersionsImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterAvailableUpgradesImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterJobsImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolAvailableUpgradesImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolsImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClustersImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.HDInsightContainersManagementClientBuilder;
import com.azure.resourcemanager.hdinsight.containers.implementation.LocationsImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.OperationsImpl;
import com.azure.resourcemanager.hdinsight.containers.models.AvailableClusterPoolVersions;
import com.azure.resourcemanager.hdinsight.containers.models.AvailableClusterVersions;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgrades;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobs;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgrades;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPools;
import com.azure.resourcemanager.hdinsight.containers.models.Clusters;
import com.azure.resourcemanager.hdinsight.containers.models.Locations;
Expand All @@ -46,12 +50,19 @@
import java.util.Objects;
import java.util.stream.Collectors;

/** Entry point to HDInsightContainersManager. HDInsight Containers Management Client. */
/**
* Entry point to HDInsightContainersManager.
* HDInsight Containers Management Client.
*/
public final class HDInsightContainersManager {
private ClusterPools clusterPools;

private ClusterPoolAvailableUpgrades clusterPoolAvailableUpgrades;

private Clusters clusters;

private ClusterAvailableUpgrades clusterAvailableUpgrades;

private ClusterJobs clusterJobs;

private Locations locations;
Expand All @@ -67,18 +78,14 @@ public final class HDInsightContainersManager {
private HDInsightContainersManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
this.clientObject =
new HDInsightContainersManagementClientBuilder()
.pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
.buildClient();
this.clientObject = new HDInsightContainersManagementClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval).buildClient();
}

/**
* Creates an instance of HDInsightContainers service API entry point.
*
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
* @return the HDInsightContainers service API instance.
Expand All @@ -91,7 +98,7 @@ public static HDInsightContainersManager authenticate(TokenCredential credential

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

/**
* Gets a Configurable instance that can be used to create HDInsightContainersManager with optional configuration.
*
*
* @return the Configurable instance allowing configurations.
*/
public static Configurable configure() {
return new HDInsightContainersManager.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 @@ -183,8 +192,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 @@ -201,8 +210,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 @@ -222,21 +231,12 @@ public HDInsightContainersManager authenticate(TokenCredential credential, Azure
Objects.requireNonNull(profile, "'profile' cannot be null.");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder
.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.hdinsight.containers")
.append("/")
.append("1.0.0-beta.1");
userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.hdinsight.containers")
.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 @@ -255,38 +255,25 @@ public HDInsightContainersManager authenticate(TokenCredential credential, Azure
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 HDInsightContainersManager(httpPipeline, profile, defaultPollInterval);
}
}

/**
* Gets the resource collection API of ClusterPools. It manages ClusterPool.
*
*
* @return Resource collection API of ClusterPools.
*/
public ClusterPools clusterPools() {
Expand All @@ -296,9 +283,22 @@ public ClusterPools clusterPools() {
return clusterPools;
}

/**
* Gets the resource collection API of ClusterPoolAvailableUpgrades.
*
* @return Resource collection API of ClusterPoolAvailableUpgrades.
*/
public ClusterPoolAvailableUpgrades clusterPoolAvailableUpgrades() {
if (this.clusterPoolAvailableUpgrades == null) {
this.clusterPoolAvailableUpgrades
= new ClusterPoolAvailableUpgradesImpl(clientObject.getClusterPoolAvailableUpgrades(), this);
}
return clusterPoolAvailableUpgrades;
}

/**
* Gets the resource collection API of Clusters. It manages Cluster.
*
*
* @return Resource collection API of Clusters.
*/
public Clusters clusters() {
Expand All @@ -308,9 +308,22 @@ public Clusters clusters() {
return clusters;
}

/**
* Gets the resource collection API of ClusterAvailableUpgrades.
*
* @return Resource collection API of ClusterAvailableUpgrades.
*/
public ClusterAvailableUpgrades clusterAvailableUpgrades() {
if (this.clusterAvailableUpgrades == null) {
this.clusterAvailableUpgrades
= new ClusterAvailableUpgradesImpl(clientObject.getClusterAvailableUpgrades(), this);
}
return clusterAvailableUpgrades;
}

/**
* Gets the resource collection API of ClusterJobs.
*
*
* @return Resource collection API of ClusterJobs.
*/
public ClusterJobs clusterJobs() {
Expand All @@ -322,7 +335,7 @@ public ClusterJobs clusterJobs() {

/**
* Gets the resource collection API of Locations.
*
*
* @return Resource collection API of Locations.
*/
public Locations locations() {
Expand All @@ -334,7 +347,7 @@ public Locations locations() {

/**
* Gets the resource collection API of Operations.
*
*
* @return Resource collection API of Operations.
*/
public Operations operations() {
Expand All @@ -346,34 +359,34 @@ public Operations operations() {

/**
* Gets the resource collection API of AvailableClusterPoolVersions.
*
*
* @return Resource collection API of AvailableClusterPoolVersions.
*/
public AvailableClusterPoolVersions availableClusterPoolVersions() {
if (this.availableClusterPoolVersions == null) {
this.availableClusterPoolVersions =
new AvailableClusterPoolVersionsImpl(clientObject.getAvailableClusterPoolVersions(), this);
this.availableClusterPoolVersions
= new AvailableClusterPoolVersionsImpl(clientObject.getAvailableClusterPoolVersions(), this);
}
return availableClusterPoolVersions;
}

/**
* Gets the resource collection API of AvailableClusterVersions.
*
*
* @return Resource collection API of AvailableClusterVersions.
*/
public AvailableClusterVersions availableClusterVersions() {
if (this.availableClusterVersions == null) {
this.availableClusterVersions =
new AvailableClusterVersionsImpl(clientObject.getAvailableClusterVersions(), this);
this.availableClusterVersions
= new AvailableClusterVersionsImpl(clientObject.getAvailableClusterVersions(), this);
}
return availableClusterVersions;
}

/**
* Gets wrapped service client HDInsightContainersManagementClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
*
*
* @return Wrapped service client HDInsightContainersManagementClient.
*/
public HDInsightContainersManagementClient serviceClient() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner;

/** An instance of this class provides access to all the operations defined in AvailableClusterPoolVersionsClient. */
/**
* An instance of this class provides access to all the operations defined in AvailableClusterPoolVersionsClient.
*/
public interface AvailableClusterPoolVersionsClient {
/**
* Returns a list of available cluster pool versions.
*
*
* @param location The name of the Azure region.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
Expand All @@ -26,7 +28,7 @@ public interface AvailableClusterPoolVersionsClient {

/**
* Returns a list of available cluster pool versions.
*
*
* @param location The name of the Azure region.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner;

/** An instance of this class provides access to all the operations defined in AvailableClusterVersionsClient. */
/**
* An instance of this class provides access to all the operations defined in AvailableClusterVersionsClient.
*/
public interface AvailableClusterVersionsClient {
/**
* Returns a list of available cluster versions.
*
*
* @param location The name of the Azure region.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
Expand All @@ -26,7 +28,7 @@ public interface AvailableClusterVersionsClient {

/**
* Returns a list of available cluster versions.
*
*
* @param location The name of the Azure region.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand Down
Loading

0 comments on commit bfb01e9

Please sign in to comment.