Skip to content

Commit

Permalink
CodeGen from PR 20693 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Move from preview to stable (Azure#20693)

* Move from preview to stable

* Adjust readme.md

package-preview-2022-07 -> package-2022-07
  • Loading branch information
SDKAuto committed Sep 14, 2022
1 parent 5090cf4 commit d44514f
Show file tree
Hide file tree
Showing 250 changed files with 1,916 additions and 1,559 deletions.
4 changes: 3 additions & 1 deletion sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.5 (Unreleased)
## 1.0.0-beta.1 (2022-09-14)

- Azure Resource Manager Kusto client library for Java. This package contains Microsoft Azure SDK for Kusto Management SDK. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2022-07. 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
4 changes: 2 additions & 2 deletions sdk/kusto/azure-resourcemanager-kusto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager Kusto client library for Java.

This package contains Microsoft Azure SDK for Kusto Management SDK. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2022-02. 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 Kusto Management SDK. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2022-07. 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-kusto</artifactId>
<version>1.0.0-beta.4</version>
<version>1.0.0-beta.5</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
155 changes: 80 additions & 75 deletions sdk/kusto/azure-resourcemanager-kusto/SAMPLE.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/kusto/azure-resourcemanager-kusto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for Kusto Management</name>
<description>This package contains Microsoft Azure SDK for Kusto Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2022-02.</description>
<description>This package contains Microsoft Azure SDK for Kusto Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2022-07.</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 @@ -10,11 +10,13 @@
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.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
Expand Down Expand Up @@ -115,6 +117,19 @@ public static KustoManager authenticate(TokenCredential credential, AzureProfile
return configure().authenticate(credential, profile);
}

/**
* Creates an instance of Kusto service API entry point.
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
* @return the Kusto service API instance.
*/
public static KustoManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
return new KustoManager(httpPipeline, profile, null);
}

/**
* Gets a Configurable instance that can be used to create KustoManager with optional configuration.
*
Expand All @@ -126,13 +141,14 @@ public static Configurable configure() {

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

private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
private final List<String> scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private RetryOptions retryOptions;
private Duration defaultPollInterval;

private Configurable() {
Expand Down Expand Up @@ -193,16 +209,31 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}

/**
* 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)}.
*
* @param retryOptions the retry options for the HTTP pipeline retry policy.
* @return the configurable object itself.
*/
public Configurable withRetryOptions(RetryOptions retryOptions) {
this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
return this;
}

/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
* @param defaultPollInterval the default poll interval.
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
this.defaultPollInterval =
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
throw LOGGER
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
Expand All @@ -224,7 +255,7 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil
.append("-")
.append("com.azure.resourcemanager.kusto")
.append("/")
.append("1.0.0-beta.4");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand All @@ -242,10 +273,15 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
if (retryOptions != null) {
retryPolicy = new RetryPolicy(retryOptions);
} else {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
}
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
Expand Down Expand Up @@ -276,15 +312,23 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil
}
}

/** @return Resource collection API of Clusters. */
/**
* Gets the resource collection API of Clusters. It manages Cluster.
*
* @return Resource collection API of Clusters.
*/
public Clusters clusters() {
if (this.clusters == null) {
this.clusters = new ClustersImpl(clientObject.getClusters(), this);
}
return clusters;
}

/** @return Resource collection API of ClusterPrincipalAssignments. */
/**
* Gets the resource collection API of ClusterPrincipalAssignments. It manages ClusterPrincipalAssignment.
*
* @return Resource collection API of ClusterPrincipalAssignments.
*/
public ClusterPrincipalAssignments clusterPrincipalAssignments() {
if (this.clusterPrincipalAssignments == null) {
this.clusterPrincipalAssignments =
Expand All @@ -293,15 +337,23 @@ public ClusterPrincipalAssignments clusterPrincipalAssignments() {
return clusterPrincipalAssignments;
}

/** @return Resource collection API of Databases. */
/**
* Gets the resource collection API of Databases.
*
* @return Resource collection API of Databases.
*/
public Databases databases() {
if (this.databases == null) {
this.databases = new DatabasesImpl(clientObject.getDatabases(), this);
}
return databases;
}

/** @return Resource collection API of AttachedDatabaseConfigurations. */
/**
* Gets the resource collection API of AttachedDatabaseConfigurations. It manages AttachedDatabaseConfiguration.
*
* @return Resource collection API of AttachedDatabaseConfigurations.
*/
public AttachedDatabaseConfigurations attachedDatabaseConfigurations() {
if (this.attachedDatabaseConfigurations == null) {
this.attachedDatabaseConfigurations =
Expand All @@ -310,7 +362,11 @@ public AttachedDatabaseConfigurations attachedDatabaseConfigurations() {
return attachedDatabaseConfigurations;
}

/** @return Resource collection API of ManagedPrivateEndpoints. */
/**
* Gets the resource collection API of ManagedPrivateEndpoints. It manages ManagedPrivateEndpoint.
*
* @return Resource collection API of ManagedPrivateEndpoints.
*/
public ManagedPrivateEndpoints managedPrivateEndpoints() {
if (this.managedPrivateEndpoints == null) {
this.managedPrivateEndpoints =
Expand All @@ -319,7 +375,11 @@ public ManagedPrivateEndpoints managedPrivateEndpoints() {
return managedPrivateEndpoints;
}

/** @return Resource collection API of DatabasePrincipalAssignments. */
/**
* Gets the resource collection API of DatabasePrincipalAssignments. It manages DatabasePrincipalAssignment.
*
* @return Resource collection API of DatabasePrincipalAssignments.
*/
public DatabasePrincipalAssignments databasePrincipalAssignments() {
if (this.databasePrincipalAssignments == null) {
this.databasePrincipalAssignments =
Expand All @@ -328,15 +388,23 @@ public DatabasePrincipalAssignments databasePrincipalAssignments() {
return databasePrincipalAssignments;
}

/** @return Resource collection API of Scripts. */
/**
* Gets the resource collection API of Scripts. It manages Script.
*
* @return Resource collection API of Scripts.
*/
public Scripts scripts() {
if (this.scripts == null) {
this.scripts = new ScriptsImpl(clientObject.getScripts(), this);
}
return scripts;
}

/** @return Resource collection API of PrivateEndpointConnections. */
/**
* Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection.
*
* @return Resource collection API of PrivateEndpointConnections.
*/
public PrivateEndpointConnections privateEndpointConnections() {
if (this.privateEndpointConnections == null) {
this.privateEndpointConnections =
Expand All @@ -345,39 +413,59 @@ public PrivateEndpointConnections privateEndpointConnections() {
return privateEndpointConnections;
}

/** @return Resource collection API of PrivateLinkResources. */
/**
* Gets the resource collection API of PrivateLinkResources.
*
* @return Resource collection API of PrivateLinkResources.
*/
public PrivateLinkResources privateLinkResources() {
if (this.privateLinkResources == null) {
this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
}
return privateLinkResources;
}

/** @return Resource collection API of DataConnections. */
/**
* Gets the resource collection API of DataConnections.
*
* @return Resource collection API of DataConnections.
*/
public DataConnections dataConnections() {
if (this.dataConnections == null) {
this.dataConnections = new DataConnectionsImpl(clientObject.getDataConnections(), this);
}
return dataConnections;
}

/** @return Resource collection API of Operations. */
/**
* Gets the resource collection API of Operations.
*
* @return Resource collection API of Operations.
*/
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
}
return operations;
}

/** @return Resource collection API of OperationsResults. */
/**
* Gets the resource collection API of OperationsResults.
*
* @return Resource collection API of OperationsResults.
*/
public OperationsResults operationsResults() {
if (this.operationsResults == null) {
this.operationsResults = new OperationsResultsImpl(clientObject.getOperationsResults(), this);
}
return operationsResults;
}

/** @return Resource collection API of OperationsResultsLocations. */
/**
* Gets the resource collection API of OperationsResultsLocations.
*
* @return Resource collection API of OperationsResultsLocations.
*/
public OperationsResultsLocations operationsResultsLocations() {
if (this.operationsResultsLocations == null) {
this.operationsResultsLocations =
Expand Down
Loading

0 comments on commit d44514f

Please sign in to comment.