diff --git a/sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md b/sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md
index ff301aaadbdeb..8ed685c6d4f34 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md
+++ b/sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2021-04-11)
+- 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-2021-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2020-12-18)
diff --git a/sdk/kusto/azure-resourcemanager-kusto/README.md b/sdk/kusto/azure-resourcemanager-kusto/README.md
index 1c4f49078b3e2..056b63ea49d95 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/README.md
+++ b/sdk/kusto/azure-resourcemanager-kusto/README.md
@@ -2,7 +2,21 @@
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-2020-09-18. 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-2021-01. 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
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
## Getting started
@@ -18,7 +32,7 @@ This package contains Microsoft Azure SDK for Kusto Management SDK. The Azure Ku
com.azure.resourcemanager
azure-resourcemanager-kusto
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -75,6 +89,8 @@ For details on contributing to this repository, see the [contributing guide](htt
1. Create new Pull Request
+[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/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
diff --git a/sdk/kusto/azure-resourcemanager-kusto/pom.xml b/sdk/kusto/azure-resourcemanager-kusto/pom.xml
index 35c2cf1e1e1d0..eab300414289d 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/pom.xml
+++ b/sdk/kusto/azure-resourcemanager-kusto/pom.xml
@@ -13,7 +13,7 @@
jar
Microsoft Azure SDK for Kusto Management
- 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-2020-09-18. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
+ 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-2021-01.
https://github.com/Azure/azure-sdk-for-java
@@ -41,6 +41,11 @@
+
+ com.azure
+ azure-core
+ 1.15.0
+
com.azure
azure-core-management
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/KustoManager.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/KustoManager.java
index e35bcd166bdd6..eecc21bd5296d 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/KustoManager.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/KustoManager.java
@@ -29,6 +29,8 @@
import com.azure.resourcemanager.kusto.implementation.DatabasesImpl;
import com.azure.resourcemanager.kusto.implementation.KustoManagementClientBuilder;
import com.azure.resourcemanager.kusto.implementation.OperationsImpl;
+import com.azure.resourcemanager.kusto.implementation.OperationsResultsImpl;
+import com.azure.resourcemanager.kusto.implementation.ScriptsImpl;
import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfigurations;
import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignments;
import com.azure.resourcemanager.kusto.models.Clusters;
@@ -36,6 +38,8 @@
import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignments;
import com.azure.resourcemanager.kusto.models.Databases;
import com.azure.resourcemanager.kusto.models.Operations;
+import com.azure.resourcemanager.kusto.models.OperationsResults;
+import com.azure.resourcemanager.kusto.models.Scripts;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -56,12 +60,16 @@ public final class KustoManager {
private DatabasePrincipalAssignments databasePrincipalAssignments;
+ private Scripts scripts;
+
private AttachedDatabaseConfigurations attachedDatabaseConfigurations;
private DataConnections dataConnections;
private Operations operations;
+ private OperationsResults operationsResults;
+
private final KustoManagementClient clientObject;
private KustoManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -180,17 +188,31 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.kusto")
+ .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)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List policies = new ArrayList<>();
- policies
- .add(
- new UserAgentPolicy(
- null,
- "com.azure.resourcemanager.kusto",
- "1.0.0-beta.1",
- Configuration.getGlobalConfiguration()));
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
@@ -199,6 +221,7 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil
.add(
new BearerTokenAuthenticationPolicy(
credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ policies.addAll(this.policies);
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -244,6 +267,14 @@ public DatabasePrincipalAssignments databasePrincipalAssignments() {
return databasePrincipalAssignments;
}
+ /** @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 AttachedDatabaseConfigurations. */
public AttachedDatabaseConfigurations attachedDatabaseConfigurations() {
if (this.attachedDatabaseConfigurations == null) {
@@ -269,6 +300,14 @@ public Operations operations() {
return operations;
}
+ /** @return Resource collection API of OperationsResults. */
+ public OperationsResults operationsResults() {
+ if (this.operationsResults == null) {
+ this.operationsResults = new OperationsResultsImpl(clientObject.getOperationsResults(), this);
+ }
+ return operationsResults;
+ }
+
/**
* @return Wrapped service client KustoManagementClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/ClustersClient.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/ClustersClient.java
index 6546659cda967..0b7fa87ba3509 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/ClustersClient.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/ClustersClient.java
@@ -58,6 +58,10 @@ Response getByResourceGroupWithResponse(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -65,7 +69,7 @@ Response getByResourceGroupWithResponse(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller, ClusterInner> beginCreateOrUpdate(
- String resourceGroupName, String clusterName, ClusterInner parameters);
+ String resourceGroupName, String clusterName, ClusterInner parameters, String ifMatch, String ifNoneMatch);
/**
* Create or update a Kusto cluster.
@@ -73,6 +77,10 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -81,7 +89,31 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller, ClusterInner> beginCreateOrUpdate(
- String resourceGroupName, String clusterName, ClusterInner parameters, Context context);
+ String resourceGroupName,
+ String clusterName,
+ ClusterInner parameters,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context);
+
+ /**
+ * Create or update a Kusto cluster.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a Kusto cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterInner createOrUpdate(
+ String resourceGroupName, String clusterName, ClusterInner parameters, String ifMatch, String ifNoneMatch);
/**
* Create or update a Kusto cluster.
@@ -103,6 +135,10 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -110,7 +146,13 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(
* @return class representing a Kusto cluster.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters, Context context);
+ ClusterInner createOrUpdate(
+ String resourceGroupName,
+ String clusterName,
+ ClusterInner parameters,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context);
/**
* Update a Kusto cluster.
@@ -118,6 +160,8 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -125,7 +169,7 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller, ClusterInner> beginUpdate(
- String resourceGroupName, String clusterName, ClusterUpdate parameters);
+ String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch);
/**
* Update a Kusto cluster.
@@ -133,6 +177,8 @@ SyncPoller, ClusterInner> beginUpdate(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -141,7 +187,23 @@ SyncPoller, ClusterInner> beginUpdate(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller, ClusterInner> beginUpdate(
- String resourceGroupName, String clusterName, ClusterUpdate parameters, Context context);
+ String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch, Context context);
+
+ /**
+ * Update a Kusto cluster.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a Kusto cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterInner update(String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch);
/**
* Update a Kusto cluster.
@@ -163,6 +225,8 @@ SyncPoller, ClusterInner> beginUpdate(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -170,7 +234,8 @@ SyncPoller, ClusterInner> beginUpdate(
* @return class representing a Kusto cluster.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ClusterInner update(String resourceGroupName, String clusterName, ClusterUpdate parameters, Context context);
+ ClusterInner update(
+ String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch, Context context);
/**
* Deletes a Kusto cluster.
@@ -551,7 +616,7 @@ DiagnoseVirtualNetworkResultInner diagnoseVirtualNetwork(
/**
* Checks that the cluster name is valid and is not already in use.
*
- * @param location Azure location.
+ * @param location Azure location (region) name.
* @param clusterName The name of the cluster.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -564,7 +629,7 @@ DiagnoseVirtualNetworkResultInner diagnoseVirtualNetwork(
/**
* Checks that the cluster name is valid and is not already in use.
*
- * @param location Azure location.
+ * @param location Azure location (region) name.
* @param clusterName The name of the cluster.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/KustoManagementClient.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/KustoManagementClient.java
index ce174ba1d47f8..a663376015b26 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/KustoManagementClient.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/KustoManagementClient.java
@@ -73,6 +73,13 @@ public interface KustoManagementClient {
*/
DatabasePrincipalAssignmentsClient getDatabasePrincipalAssignments();
+ /**
+ * Gets the ScriptsClient object to access its operations.
+ *
+ * @return the ScriptsClient object.
+ */
+ ScriptsClient getScripts();
+
/**
* Gets the AttachedDatabaseConfigurationsClient object to access its operations.
*
@@ -93,4 +100,11 @@ public interface KustoManagementClient {
* @return the OperationsClient object.
*/
OperationsClient getOperations();
+
+ /**
+ * Gets the OperationsResultsClient object to access its operations.
+ *
+ * @return the OperationsResultsClient object.
+ */
+ OperationsResultsClient getOperationsResults();
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/OperationsResultsClient.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/OperationsResultsClient.java
new file mode 100644
index 0000000000000..185efb42adf10
--- /dev/null
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/OperationsResultsClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kusto.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.kusto.fluent.models.OperationResultInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsResultsClient. */
+public interface OperationsResultsClient {
+ /**
+ * Returns operation results.
+ *
+ * @param location Azure location (region) name.
+ * @param operationId The Guid of the operation ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation Result Entity.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationResultInner get(String location, String operationId);
+
+ /**
+ * Returns operation results.
+ *
+ * @param location Azure location (region) name.
+ * @param operationId The Guid of the operation ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation Result Entity.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String location, String operationId, Context context);
+}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/ScriptsClient.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/ScriptsClient.java
new file mode 100644
index 0000000000000..55f1080e0b578
--- /dev/null
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/ScriptsClient.java
@@ -0,0 +1,340 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kusto.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.kusto.fluent.models.CheckNameResultInner;
+import com.azure.resourcemanager.kusto.fluent.models.ScriptInner;
+import com.azure.resourcemanager.kusto.models.ScriptCheckNameRequest;
+
+/** An instance of this class provides access to all the operations defined in ScriptsClient. */
+public interface ScriptsClient {
+ /**
+ * Returns the list of database scripts for given database.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list Kusto database script operation response.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(String resourceGroupName, String clusterName, String databaseName);
+
+ /**
+ * Returns the list of database scripts for given database.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list Kusto database script operation response.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String clusterName, String databaseName, Context context);
+
+ /**
+ * Gets a Kusto cluster database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Kusto cluster database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ScriptInner get(String resourceGroupName, String clusterName, String databaseName, String scriptName);
+
+ /**
+ * Gets a Kusto cluster database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Kusto cluster database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, Context context);
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ScriptInner> beginCreateOrUpdate(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters);
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ScriptInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ String scriptName,
+ ScriptInner parameters,
+ Context context);
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ScriptInner createOrUpdate(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters);
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ScriptInner createOrUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ String scriptName,
+ ScriptInner parameters,
+ Context context);
+
+ /**
+ * Updates a database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains to the KQL to run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ScriptInner> beginUpdate(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters);
+
+ /**
+ * Updates a database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains to the KQL to run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ScriptInner> beginUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ String scriptName,
+ ScriptInner parameters,
+ Context context);
+
+ /**
+ * Updates a database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains to the KQL to run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ScriptInner update(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters);
+
+ /**
+ * Updates a database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains to the KQL to run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ScriptInner update(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ String scriptName,
+ ScriptInner parameters,
+ Context context);
+
+ /**
+ * Deletes a Kusto principalAssignment.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName);
+
+ /**
+ * Deletes a Kusto principalAssignment.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, Context context);
+
+ /**
+ * Deletes a Kusto principalAssignment.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String clusterName, String databaseName, String scriptName);
+
+ /**
+ * Deletes a Kusto principalAssignment.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String clusterName, String databaseName, String scriptName, Context context);
+
+ /**
+ * Checks that the script name is valid and is not already in use.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the script.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result returned from a check name availability request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CheckNameResultInner checkNameAvailability(
+ String resourceGroupName, String clusterName, String databaseName, ScriptCheckNameRequest scriptName);
+
+ /**
+ * Checks that the script name is valid and is not already in use.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the script.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result returned from a check name availability request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkNameAvailabilityWithResponse(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ScriptCheckNameRequest scriptName,
+ Context context);
+}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AttachedDatabaseConfigurationInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AttachedDatabaseConfigurationInner.java
index f807a5ad8e455..19fa9b07e1a5e 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AttachedDatabaseConfigurationInner.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AttachedDatabaseConfigurationInner.java
@@ -10,6 +10,7 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.kusto.models.DefaultPrincipalsModificationKind;
import com.azure.resourcemanager.kusto.models.ProvisioningState;
+import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
@@ -59,6 +60,12 @@ public class AttachedDatabaseConfigurationInner extends ProxyResource {
@JsonProperty(value = "properties.defaultPrincipalsModificationKind")
private DefaultPrincipalsModificationKind defaultPrincipalsModificationKind;
+ /*
+ * Table level sharing specifications
+ */
+ @JsonProperty(value = "properties.tableLevelSharingProperties")
+ private TableLevelSharingProperties tableLevelSharingProperties;
+
/**
* Get the location property: Resource location.
*
@@ -163,11 +170,35 @@ public AttachedDatabaseConfigurationInner withDefaultPrincipalsModificationKind(
return this;
}
+ /**
+ * Get the tableLevelSharingProperties property: Table level sharing specifications.
+ *
+ * @return the tableLevelSharingProperties value.
+ */
+ public TableLevelSharingProperties tableLevelSharingProperties() {
+ return this.tableLevelSharingProperties;
+ }
+
+ /**
+ * Set the tableLevelSharingProperties property: Table level sharing specifications.
+ *
+ * @param tableLevelSharingProperties the tableLevelSharingProperties value to set.
+ * @return the AttachedDatabaseConfigurationInner object itself.
+ */
+ public AttachedDatabaseConfigurationInner withTableLevelSharingProperties(
+ TableLevelSharingProperties tableLevelSharingProperties) {
+ this.tableLevelSharingProperties = tableLevelSharingProperties;
+ return this;
+ }
+
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (tableLevelSharingProperties() != null) {
+ tableLevelSharingProperties().validate();
+ }
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterInner.java
index 2268acf74e3a4..8419cb381560f 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterInner.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterInner.java
@@ -47,6 +47,12 @@ public class ClusterInner extends Resource {
@JsonProperty(value = "identity")
private Identity identity;
+ /*
+ * A unique read-only string that changes whenever the resource is updated.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
/*
* The state of the resource.
*/
@@ -197,6 +203,15 @@ public ClusterInner withIdentity(Identity identity) {
return this;
}
+ /**
+ * Get the etag property: A unique read-only string that changes whenever the resource is updated.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
/**
* Get the state property: The state of the resource.
*
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultInner.java
new file mode 100644
index 0000000000000..651f22a97e1f4
--- /dev/null
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultInner.java
@@ -0,0 +1,255 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kusto.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.kusto.models.Status;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Operation Result Entity. */
+@JsonFlatten
+@Fluent
+public class OperationResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultInner.class);
+
+ /*
+ * ID of the resource.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * Name of the resource.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * status of the Operation result.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private Status status;
+
+ /*
+ * The operation start time
+ */
+ @JsonProperty(value = "startTime")
+ private OffsetDateTime startTime;
+
+ /*
+ * The operation end time
+ */
+ @JsonProperty(value = "endTime")
+ private OffsetDateTime endTime;
+
+ /*
+ * Percentage completed.
+ */
+ @JsonProperty(value = "percentComplete")
+ private Double percentComplete;
+
+ /*
+ * The code of the error.
+ */
+ @JsonProperty(value = "error.code")
+ private String code;
+
+ /*
+ * The error message.
+ */
+ @JsonProperty(value = "error.message")
+ private String message;
+
+ /*
+ * The kind of the operation.
+ */
+ @JsonProperty(value = "properties.operationKind")
+ private String operationKind;
+
+ /*
+ * The state of the operation.
+ */
+ @JsonProperty(value = "properties.operationState")
+ private String operationState;
+
+ /**
+ * Get the id property: ID of the resource.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: Name of the resource.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the status property: status of the Operation result.
+ *
+ * @return the status value.
+ */
+ public Status status() {
+ return this.status;
+ }
+
+ /**
+ * Get the startTime property: The operation start time.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: The operation start time.
+ *
+ * @param startTime the startTime value to set.
+ * @return the OperationResultInner object itself.
+ */
+ public OperationResultInner withStartTime(OffsetDateTime startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the endTime property: The operation end time.
+ *
+ * @return the endTime value.
+ */
+ public OffsetDateTime endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Set the endTime property: The operation end time.
+ *
+ * @param endTime the endTime value to set.
+ * @return the OperationResultInner object itself.
+ */
+ public OperationResultInner withEndTime(OffsetDateTime endTime) {
+ this.endTime = endTime;
+ return this;
+ }
+
+ /**
+ * Get the percentComplete property: Percentage completed.
+ *
+ * @return the percentComplete value.
+ */
+ public Double percentComplete() {
+ return this.percentComplete;
+ }
+
+ /**
+ * Set the percentComplete property: Percentage completed.
+ *
+ * @param percentComplete the percentComplete value to set.
+ * @return the OperationResultInner object itself.
+ */
+ public OperationResultInner withPercentComplete(Double percentComplete) {
+ this.percentComplete = percentComplete;
+ return this;
+ }
+
+ /**
+ * Get the code property: The code of the error.
+ *
+ * @return the code value.
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Set the code property: The code of the error.
+ *
+ * @param code the code value to set.
+ * @return the OperationResultInner object itself.
+ */
+ public OperationResultInner withCode(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get the message property: The error message.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: The error message.
+ *
+ * @param message the message value to set.
+ * @return the OperationResultInner object itself.
+ */
+ public OperationResultInner withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get the operationKind property: The kind of the operation.
+ *
+ * @return the operationKind value.
+ */
+ public String operationKind() {
+ return this.operationKind;
+ }
+
+ /**
+ * Set the operationKind property: The kind of the operation.
+ *
+ * @param operationKind the operationKind value to set.
+ * @return the OperationResultInner object itself.
+ */
+ public OperationResultInner withOperationKind(String operationKind) {
+ this.operationKind = operationKind;
+ return this;
+ }
+
+ /**
+ * Get the operationState property: The state of the operation.
+ *
+ * @return the operationState value.
+ */
+ public String operationState() {
+ return this.operationState;
+ }
+
+ /**
+ * Set the operationState property: The state of the operation.
+ *
+ * @param operationState the operationState value to set.
+ * @return the OperationResultInner object itself.
+ */
+ public OperationResultInner withOperationState(String operationState) {
+ this.operationState = operationState;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ScriptInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ScriptInner.java
new file mode 100644
index 0000000000000..6e89262e9bce9
--- /dev/null
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ScriptInner.java
@@ -0,0 +1,163 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kusto.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.kusto.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Class representing a database script. */
+@JsonFlatten
+@Fluent
+public class ScriptInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptInner.class);
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * The url to the KQL script blob file.
+ */
+ @JsonProperty(value = "properties.scriptUrl")
+ private String scriptUrl;
+
+ /*
+ * The SaS token.
+ */
+ @JsonProperty(value = "properties.scriptUrlSasToken")
+ private String scriptUrlSasToken;
+
+ /*
+ * A unique string. If changed the script will be applied again.
+ */
+ @JsonProperty(value = "properties.forceUpdateTag")
+ private String forceUpdateTag;
+
+ /*
+ * Flag that indicates whether to continue if one of the command fails.
+ */
+ @JsonProperty(value = "properties.continueOnErrors")
+ private Boolean continueOnErrors;
+
+ /*
+ * The provisioned state of the resource.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the scriptUrl property: The url to the KQL script blob file.
+ *
+ * @return the scriptUrl value.
+ */
+ public String scriptUrl() {
+ return this.scriptUrl;
+ }
+
+ /**
+ * Set the scriptUrl property: The url to the KQL script blob file.
+ *
+ * @param scriptUrl the scriptUrl value to set.
+ * @return the ScriptInner object itself.
+ */
+ public ScriptInner withScriptUrl(String scriptUrl) {
+ this.scriptUrl = scriptUrl;
+ return this;
+ }
+
+ /**
+ * Get the scriptUrlSasToken property: The SaS token.
+ *
+ * @return the scriptUrlSasToken value.
+ */
+ public String scriptUrlSasToken() {
+ return this.scriptUrlSasToken;
+ }
+
+ /**
+ * Set the scriptUrlSasToken property: The SaS token.
+ *
+ * @param scriptUrlSasToken the scriptUrlSasToken value to set.
+ * @return the ScriptInner object itself.
+ */
+ public ScriptInner withScriptUrlSasToken(String scriptUrlSasToken) {
+ this.scriptUrlSasToken = scriptUrlSasToken;
+ return this;
+ }
+
+ /**
+ * Get the forceUpdateTag property: A unique string. If changed the script will be applied again.
+ *
+ * @return the forceUpdateTag value.
+ */
+ public String forceUpdateTag() {
+ return this.forceUpdateTag;
+ }
+
+ /**
+ * Set the forceUpdateTag property: A unique string. If changed the script will be applied again.
+ *
+ * @param forceUpdateTag the forceUpdateTag value to set.
+ * @return the ScriptInner object itself.
+ */
+ public ScriptInner withForceUpdateTag(String forceUpdateTag) {
+ this.forceUpdateTag = forceUpdateTag;
+ return this;
+ }
+
+ /**
+ * Get the continueOnErrors property: Flag that indicates whether to continue if one of the command fails.
+ *
+ * @return the continueOnErrors value.
+ */
+ public Boolean continueOnErrors() {
+ return this.continueOnErrors;
+ }
+
+ /**
+ * Set the continueOnErrors property: Flag that indicates whether to continue if one of the command fails.
+ *
+ * @param continueOnErrors the continueOnErrors value to set.
+ * @return the ScriptInner object itself.
+ */
+ public ScriptInner withContinueOnErrors(Boolean continueOnErrors) {
+ this.continueOnErrors = continueOnErrors;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioned state of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationImpl.java
index cfe56f98f7531..ef8c970221a03 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationImpl.java
@@ -6,11 +6,11 @@
import com.azure.core.management.Region;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.AttachedDatabaseConfigurationInner;
import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfiguration;
import com.azure.resourcemanager.kusto.models.DefaultPrincipalsModificationKind;
import com.azure.resourcemanager.kusto.models.ProvisioningState;
+import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties;
import java.util.Collections;
import java.util.List;
@@ -20,7 +20,7 @@ public final class AttachedDatabaseConfigurationImpl
AttachedDatabaseConfiguration.Update {
private AttachedDatabaseConfigurationInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -63,6 +63,10 @@ public DefaultPrincipalsModificationKind defaultPrincipalsModificationKind() {
return this.innerModel().defaultPrincipalsModificationKind();
}
+ public TableLevelSharingProperties tableLevelSharingProperties() {
+ return this.innerModel().tableLevelSharingProperties();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -75,7 +79,7 @@ public AttachedDatabaseConfigurationInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
@@ -111,7 +115,7 @@ public AttachedDatabaseConfiguration create(Context context) {
return this;
}
- AttachedDatabaseConfigurationImpl(String name, KustoManager serviceManager) {
+ AttachedDatabaseConfigurationImpl(String name, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = new AttachedDatabaseConfigurationInner();
this.serviceManager = serviceManager;
this.attachedDatabaseConfigurationName = name;
@@ -141,7 +145,8 @@ public AttachedDatabaseConfiguration apply(Context context) {
return this;
}
- AttachedDatabaseConfigurationImpl(AttachedDatabaseConfigurationInner innerObject, KustoManager serviceManager) {
+ AttachedDatabaseConfigurationImpl(
+ AttachedDatabaseConfigurationInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
@@ -195,4 +200,10 @@ public AttachedDatabaseConfigurationImpl withDefaultPrincipalsModificationKind(
this.innerModel().withDefaultPrincipalsModificationKind(defaultPrincipalsModificationKind);
return this;
}
+
+ public AttachedDatabaseConfigurationImpl withTableLevelSharingProperties(
+ TableLevelSharingProperties tableLevelSharingProperties) {
+ this.innerModel().withTableLevelSharingProperties(tableLevelSharingProperties);
+ return this;
+ }
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsClientImpl.java
index 5fafae3f7d3de..086f7f1cd11b7 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsClientImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsClientImpl.java
@@ -185,7 +185,7 @@ private Mono> listByClusterSin
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -357,7 +357,7 @@ private Mono> getWithResponseAsync(
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -537,7 +537,7 @@ private Mono>> createOrUpdateWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -870,7 +870,7 @@ private Mono>> deleteWithResponseAsync(
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsImpl.java
index 41909d2a27aa3..19bbfb50864b8 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsImpl.java
@@ -9,7 +9,6 @@
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.AttachedDatabaseConfigurationsClient;
import com.azure.resourcemanager.kusto.fluent.models.AttachedDatabaseConfigurationInner;
import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfiguration;
@@ -21,10 +20,10 @@ public final class AttachedDatabaseConfigurationsImpl implements AttachedDatabas
private final AttachedDatabaseConfigurationsClient innerClient;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
public AttachedDatabaseConfigurationsImpl(
- AttachedDatabaseConfigurationsClient innerClient, KustoManager serviceManager) {
+ AttachedDatabaseConfigurationsClient innerClient, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -32,14 +31,14 @@ public AttachedDatabaseConfigurationsImpl(
public PagedIterable listByCluster(String resourceGroupName, String clusterName) {
PagedIterable inner =
this.serviceClient().listByCluster(resourceGroupName, clusterName);
- return inner.mapPage(inner1 -> new AttachedDatabaseConfigurationImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new AttachedDatabaseConfigurationImpl(inner1, this.manager()));
}
public PagedIterable listByCluster(
String resourceGroupName, String clusterName, Context context) {
PagedIterable inner =
this.serviceClient().listByCluster(resourceGroupName, clusterName, context);
- return inner.mapPage(inner1 -> new AttachedDatabaseConfigurationImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new AttachedDatabaseConfigurationImpl(inner1, this.manager()));
}
public AttachedDatabaseConfiguration get(
@@ -205,7 +204,7 @@ private AttachedDatabaseConfigurationsClient serviceClient() {
return this.innerClient;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AzureResourceSkuImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AzureResourceSkuImpl.java
index 4c35b6f035caa..9ccf21840e7a6 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AzureResourceSkuImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AzureResourceSkuImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.kusto.implementation;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.AzureResourceSkuInner;
import com.azure.resourcemanager.kusto.models.AzureCapacity;
import com.azure.resourcemanager.kusto.models.AzureResourceSku;
@@ -13,9 +12,10 @@
public final class AzureResourceSkuImpl implements AzureResourceSku {
private AzureResourceSkuInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- AzureResourceSkuImpl(AzureResourceSkuInner innerObject, KustoManager serviceManager) {
+ AzureResourceSkuImpl(
+ AzureResourceSkuInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -36,7 +36,7 @@ public AzureResourceSkuInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/CheckNameResultImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/CheckNameResultImpl.java
index 08949b9e72d90..15d5dfc03d477 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/CheckNameResultImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/CheckNameResultImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.kusto.implementation;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.CheckNameResultInner;
import com.azure.resourcemanager.kusto.models.CheckNameResult;
import com.azure.resourcemanager.kusto.models.Reason;
@@ -12,9 +11,9 @@
public final class CheckNameResultImpl implements CheckNameResult {
private CheckNameResultInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- CheckNameResultImpl(CheckNameResultInner innerObject, KustoManager serviceManager) {
+ CheckNameResultImpl(CheckNameResultInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -39,7 +38,7 @@ public CheckNameResultInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterImpl.java
index ba154061dd4b7..2dcff23c77c55 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterImpl.java
@@ -4,16 +4,20 @@
package com.azure.resourcemanager.kusto.implementation;
+import com.azure.core.http.rest.PagedIterable;
import com.azure.core.management.Region;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.ClusterInner;
+import com.azure.resourcemanager.kusto.fluent.models.FollowerDatabaseDefinitionInner;
import com.azure.resourcemanager.kusto.models.AzureSku;
import com.azure.resourcemanager.kusto.models.Cluster;
import com.azure.resourcemanager.kusto.models.ClusterUpdate;
+import com.azure.resourcemanager.kusto.models.DiagnoseVirtualNetworkResult;
import com.azure.resourcemanager.kusto.models.EngineType;
+import com.azure.resourcemanager.kusto.models.FollowerDatabaseDefinition;
import com.azure.resourcemanager.kusto.models.Identity;
import com.azure.resourcemanager.kusto.models.KeyVaultProperties;
+import com.azure.resourcemanager.kusto.models.LanguageExtension;
import com.azure.resourcemanager.kusto.models.LanguageExtensionsList;
import com.azure.resourcemanager.kusto.models.OptimizedAutoscale;
import com.azure.resourcemanager.kusto.models.ProvisioningState;
@@ -27,7 +31,7 @@
public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update {
private ClusterInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -71,6 +75,10 @@ public Identity identity() {
return this.innerModel().identity();
}
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
public State state() {
return this.innerModel().state();
}
@@ -148,7 +156,7 @@ public ClusterInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
@@ -156,6 +164,12 @@ private KustoManager manager() {
private String clusterName;
+ private String createIfMatch;
+
+ private String createIfNoneMatch;
+
+ private String updateIfMatch;
+
private ClusterUpdate updateParameters;
public ClusterImpl withExistingResourceGroup(String resourceGroupName) {
@@ -168,7 +182,8 @@ public Cluster create() {
serviceManager
.serviceClient()
.getClusters()
- .createOrUpdate(resourceGroupName, clusterName, this.innerModel(), Context.NONE);
+ .createOrUpdate(
+ resourceGroupName, clusterName, this.innerModel(), createIfMatch, createIfNoneMatch, Context.NONE);
return this;
}
@@ -177,17 +192,21 @@ public Cluster create(Context context) {
serviceManager
.serviceClient()
.getClusters()
- .createOrUpdate(resourceGroupName, clusterName, this.innerModel(), context);
+ .createOrUpdate(
+ resourceGroupName, clusterName, this.innerModel(), createIfMatch, createIfNoneMatch, context);
return this;
}
- ClusterImpl(String name, KustoManager serviceManager) {
+ ClusterImpl(String name, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = new ClusterInner();
this.serviceManager = serviceManager;
this.clusterName = name;
+ this.createIfMatch = null;
+ this.createIfNoneMatch = null;
}
public ClusterImpl update() {
+ this.updateIfMatch = null;
this.updateParameters = new ClusterUpdate();
return this;
}
@@ -197,7 +216,7 @@ public Cluster apply() {
serviceManager
.serviceClient()
.getClusters()
- .update(resourceGroupName, clusterName, updateParameters, Context.NONE);
+ .update(resourceGroupName, clusterName, updateParameters, updateIfMatch, Context.NONE);
return this;
}
@@ -206,11 +225,11 @@ public Cluster apply(Context context) {
serviceManager
.serviceClient()
.getClusters()
- .update(resourceGroupName, clusterName, updateParameters, context);
+ .update(resourceGroupName, clusterName, updateParameters, updateIfMatch, context);
return this;
}
- ClusterImpl(ClusterInner innerObject, KustoManager serviceManager) {
+ ClusterImpl(ClusterInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
@@ -237,6 +256,76 @@ public Cluster refresh(Context context) {
return this;
}
+ public void stop() {
+ serviceManager.clusters().stop(resourceGroupName, clusterName);
+ }
+
+ public void stop(Context context) {
+ serviceManager.clusters().stop(resourceGroupName, clusterName, context);
+ }
+
+ public void start() {
+ serviceManager.clusters().start(resourceGroupName, clusterName);
+ }
+
+ public void start(Context context) {
+ serviceManager.clusters().start(resourceGroupName, clusterName, context);
+ }
+
+ public PagedIterable listFollowerDatabases() {
+ return serviceManager.clusters().listFollowerDatabases(resourceGroupName, clusterName);
+ }
+
+ public PagedIterable listFollowerDatabases(Context context) {
+ return serviceManager.clusters().listFollowerDatabases(resourceGroupName, clusterName, context);
+ }
+
+ public void detachFollowerDatabases(FollowerDatabaseDefinitionInner followerDatabaseToRemove) {
+ serviceManager.clusters().detachFollowerDatabases(resourceGroupName, clusterName, followerDatabaseToRemove);
+ }
+
+ public void detachFollowerDatabases(FollowerDatabaseDefinitionInner followerDatabaseToRemove, Context context) {
+ serviceManager
+ .clusters()
+ .detachFollowerDatabases(resourceGroupName, clusterName, followerDatabaseToRemove, context);
+ }
+
+ public DiagnoseVirtualNetworkResult diagnoseVirtualNetwork() {
+ return serviceManager.clusters().diagnoseVirtualNetwork(resourceGroupName, clusterName);
+ }
+
+ public DiagnoseVirtualNetworkResult diagnoseVirtualNetwork(Context context) {
+ return serviceManager.clusters().diagnoseVirtualNetwork(resourceGroupName, clusterName, context);
+ }
+
+ public PagedIterable listLanguageExtensions() {
+ return serviceManager.clusters().listLanguageExtensions(resourceGroupName, clusterName);
+ }
+
+ public PagedIterable listLanguageExtensions(Context context) {
+ return serviceManager.clusters().listLanguageExtensions(resourceGroupName, clusterName, context);
+ }
+
+ public void addLanguageExtensions(LanguageExtensionsList languageExtensionsToAdd) {
+ serviceManager.clusters().addLanguageExtensions(resourceGroupName, clusterName, languageExtensionsToAdd);
+ }
+
+ public void addLanguageExtensions(LanguageExtensionsList languageExtensionsToAdd, Context context) {
+ serviceManager
+ .clusters()
+ .addLanguageExtensions(resourceGroupName, clusterName, languageExtensionsToAdd, context);
+ }
+
+ public void removeLanguageExtensions(LanguageExtensionsList languageExtensionsToRemove) {
+ serviceManager.clusters().removeLanguageExtensions(resourceGroupName, clusterName, languageExtensionsToRemove);
+ }
+
+ public void removeLanguageExtensions(LanguageExtensionsList languageExtensionsToRemove, Context context) {
+ serviceManager
+ .clusters()
+ .removeLanguageExtensions(resourceGroupName, clusterName, languageExtensionsToRemove, context);
+ }
+
public ClusterImpl withRegion(Region location) {
this.innerModel().withLocation(location.toString());
return this;
@@ -372,6 +461,21 @@ public ClusterImpl withEngineType(EngineType engineType) {
}
}
+ public ClusterImpl withIfMatch(String ifMatch) {
+ if (isInCreateMode()) {
+ this.createIfMatch = ifMatch;
+ return this;
+ } else {
+ this.updateIfMatch = ifMatch;
+ return this;
+ }
+ }
+
+ public ClusterImpl withIfNoneMatch(String ifNoneMatch) {
+ this.createIfNoneMatch = ifNoneMatch;
+ return this;
+ }
+
private boolean isInCreateMode() {
return this.innerModel().id() == null;
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentImpl.java
index e62ad2143facd..8f09e17049931 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentImpl.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.kusto.implementation;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.ClusterPrincipalAssignmentInner;
import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignment;
import com.azure.resourcemanager.kusto.models.ClusterPrincipalRole;
@@ -16,7 +15,7 @@ public final class ClusterPrincipalAssignmentImpl
implements ClusterPrincipalAssignment, ClusterPrincipalAssignment.Definition, ClusterPrincipalAssignment.Update {
private ClusterPrincipalAssignmentInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -62,7 +61,7 @@ public ClusterPrincipalAssignmentInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
@@ -97,7 +96,7 @@ public ClusterPrincipalAssignment create(Context context) {
return this;
}
- ClusterPrincipalAssignmentImpl(String name, KustoManager serviceManager) {
+ ClusterPrincipalAssignmentImpl(String name, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = new ClusterPrincipalAssignmentInner();
this.serviceManager = serviceManager;
this.principalAssignmentName = name;
@@ -126,7 +125,8 @@ public ClusterPrincipalAssignment apply(Context context) {
return this;
}
- ClusterPrincipalAssignmentImpl(ClusterPrincipalAssignmentInner innerObject, KustoManager serviceManager) {
+ ClusterPrincipalAssignmentImpl(
+ ClusterPrincipalAssignmentInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsClientImpl.java
index d2b972bf5cdf0..51d0d74604402 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsClientImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsClientImpl.java
@@ -209,7 +209,7 @@ private Mono> checkNameAvailabilityWithResponseAs
principalAssignmentName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -390,7 +390,7 @@ private Mono> getWithResponseAsync(
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -568,7 +568,7 @@ private Mono>> createOrUpdateWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -892,7 +892,7 @@ private Mono>> deleteWithResponseAsync(
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1145,7 +1145,7 @@ private Mono> listSinglePageAsync
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsImpl.java
index 9074c340fdf24..dd5ed3c5e76a7 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsImpl.java
@@ -9,7 +9,6 @@
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.ClusterPrincipalAssignmentsClient;
import com.azure.resourcemanager.kusto.fluent.models.CheckNameResultInner;
import com.azure.resourcemanager.kusto.fluent.models.ClusterPrincipalAssignmentInner;
@@ -24,9 +23,10 @@ public final class ClusterPrincipalAssignmentsImpl implements ClusterPrincipalAs
private final ClusterPrincipalAssignmentsClient innerClient;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- public ClusterPrincipalAssignmentsImpl(ClusterPrincipalAssignmentsClient innerClient, KustoManager serviceManager) {
+ public ClusterPrincipalAssignmentsImpl(
+ ClusterPrincipalAssignmentsClient innerClient, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -101,14 +101,14 @@ public void delete(String resourceGroupName, String clusterName, String principa
public PagedIterable list(String resourceGroupName, String clusterName) {
PagedIterable inner =
this.serviceClient().list(resourceGroupName, clusterName);
- return inner.mapPage(inner1 -> new ClusterPrincipalAssignmentImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new ClusterPrincipalAssignmentImpl(inner1, this.manager()));
}
public PagedIterable list(
String resourceGroupName, String clusterName, Context context) {
PagedIterable inner =
this.serviceClient().list(resourceGroupName, clusterName, context);
- return inner.mapPage(inner1 -> new ClusterPrincipalAssignmentImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new ClusterPrincipalAssignmentImpl(inner1, this.manager()));
}
public ClusterPrincipalAssignment getById(String id) {
@@ -231,7 +231,7 @@ private ClusterPrincipalAssignmentsClient serviceClient() {
return this.innerClient;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersClientImpl.java
index 0f7e1cea17c31..102cf4cc06377 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersClientImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersClientImpl.java
@@ -105,6 +105,8 @@ Mono>> createOrUpdate(
@HostParam("$host") String endpoint,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("clusterName") String clusterName,
+ @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("If-None-Match") String ifNoneMatch,
@PathParam("subscriptionId") String subscriptionId,
@QueryParam("api-version") String apiVersion,
@BodyParam("application/json") ClusterInner parameters,
@@ -121,6 +123,7 @@ Mono>> update(
@HostParam("$host") String endpoint,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("clusterName") String clusterName,
+ @HeaderParam("If-Match") String ifMatch,
@PathParam("subscriptionId") String subscriptionId,
@QueryParam("api-version") String apiVersion,
@BodyParam("application/json") ClusterUpdate parameters,
@@ -373,7 +376,7 @@ private Mono> getByResourceGroupWithResponseAsync(
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -483,6 +486,10 @@ public Response getByResourceGroupWithResponse(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -490,7 +497,7 @@ public Response getByResourceGroupWithResponse(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
- String resourceGroupName, String clusterName, ClusterInner parameters) {
+ String resourceGroupName, String clusterName, ClusterInner parameters, String ifMatch, String ifNoneMatch) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -524,12 +531,14 @@ private Mono>> createOrUpdateWithResponseAsync(
this.client.getEndpoint(),
resourceGroupName,
clusterName,
+ ifMatch,
+ ifNoneMatch,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -538,6 +547,10 @@ private Mono>> createOrUpdateWithResponseAsync(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -546,7 +559,12 @@ private Mono>> createOrUpdateWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
- String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
+ String resourceGroupName,
+ String clusterName,
+ ClusterInner parameters,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -578,6 +596,8 @@ private Mono>> createOrUpdateWithResponseAsync(
this.client.getEndpoint(),
resourceGroupName,
clusterName,
+ ifMatch,
+ ifNoneMatch,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
parameters,
@@ -591,6 +611,10 @@ private Mono>> createOrUpdateWithResponseAsync(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -598,9 +622,9 @@ private Mono>> createOrUpdateWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(
- String resourceGroupName, String clusterName, ClusterInner parameters) {
+ String resourceGroupName, String clusterName, ClusterInner parameters, String ifMatch, String ifNoneMatch) {
Mono>> mono =
- createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters);
+ createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters, ifMatch, ifNoneMatch);
return this
.client
.getLroResult(
@@ -613,6 +637,10 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -621,10 +649,15 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(
- String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
+ String resourceGroupName,
+ String clusterName,
+ ClusterInner parameters,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
context = this.client.mergeContext(context);
Mono>> mono =
- createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters, context);
+ createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters, ifMatch, ifNoneMatch, context);
return this
.client
.getLroResult(
@@ -637,6 +670,10 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -644,8 +681,9 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller, ClusterInner> beginCreateOrUpdate(
- String resourceGroupName, String clusterName, ClusterInner parameters) {
- return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller();
+ String resourceGroupName, String clusterName, ClusterInner parameters, String ifMatch, String ifNoneMatch) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, ifMatch, ifNoneMatch)
+ .getSyncPoller();
}
/**
@@ -654,6 +692,10 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -662,8 +704,37 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller, ClusterInner> beginCreateOrUpdate(
- String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
- return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller();
+ String resourceGroupName,
+ String clusterName,
+ ClusterInner parameters,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, ifMatch, ifNoneMatch, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create or update a Kusto cluster.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a Kusto cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String clusterName, ClusterInner parameters, String ifMatch, String ifNoneMatch) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, ifMatch, ifNoneMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -680,7 +751,9 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
String resourceGroupName, String clusterName, ClusterInner parameters) {
- return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters)
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, ifMatch, ifNoneMatch)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
@@ -691,6 +764,10 @@ private Mono createOrUpdateAsync(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -699,12 +776,38 @@ private Mono createOrUpdateAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
- String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
- return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context)
+ String resourceGroupName,
+ String clusterName,
+ ClusterInner parameters,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, ifMatch, ifNoneMatch, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
+ /**
+ * Create or update a Kusto cluster.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a Kusto cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterInner createOrUpdate(
+ String resourceGroupName, String clusterName, ClusterInner parameters, String ifMatch, String ifNoneMatch) {
+ return createOrUpdateAsync(resourceGroupName, clusterName, parameters, ifMatch, ifNoneMatch).block();
+ }
+
/**
* Create or update a Kusto cluster.
*
@@ -718,7 +821,9 @@ private Mono createOrUpdateAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) {
- return createOrUpdateAsync(resourceGroupName, clusterName, parameters).block();
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return createOrUpdateAsync(resourceGroupName, clusterName, parameters, ifMatch, ifNoneMatch).block();
}
/**
@@ -727,6 +832,10 @@ public ClusterInner createOrUpdate(String resourceGroupName, String clusterName,
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster.
+ * Other values will result in a 412 Pre-condition Failed response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -735,8 +844,13 @@ public ClusterInner createOrUpdate(String resourceGroupName, String clusterName,
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ClusterInner createOrUpdate(
- String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
- return createOrUpdateAsync(resourceGroupName, clusterName, parameters, context).block();
+ String resourceGroupName,
+ String clusterName,
+ ClusterInner parameters,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, clusterName, parameters, ifMatch, ifNoneMatch, context).block();
}
/**
@@ -745,6 +859,8 @@ public ClusterInner createOrUpdate(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -752,7 +868,7 @@ public ClusterInner createOrUpdate(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
- String resourceGroupName, String clusterName, ClusterUpdate parameters) {
+ String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -786,12 +902,13 @@ private Mono>> updateWithResponseAsync(
this.client.getEndpoint(),
resourceGroupName,
clusterName,
+ ifMatch,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -800,6 +917,8 @@ private Mono>> updateWithResponseAsync(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -808,7 +927,7 @@ private Mono>> updateWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
- String resourceGroupName, String clusterName, ClusterUpdate parameters, Context context) {
+ String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -840,6 +959,7 @@ private Mono>> updateWithResponseAsync(
this.client.getEndpoint(),
resourceGroupName,
clusterName,
+ ifMatch,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
parameters,
@@ -853,6 +973,8 @@ private Mono>> updateWithResponseAsync(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -860,8 +982,9 @@ private Mono>> updateWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PollerFlux, ClusterInner> beginUpdateAsync(
- String resourceGroupName, String clusterName, ClusterUpdate parameters) {
- Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, parameters);
+ String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch) {
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, clusterName, parameters, ifMatch);
return this
.client
.getLroResult(
@@ -874,6 +997,8 @@ private PollerFlux, ClusterInner> beginUpdateAsync(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -882,10 +1007,10 @@ private PollerFlux, ClusterInner> beginUpdateAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PollerFlux, ClusterInner> beginUpdateAsync(
- String resourceGroupName, String clusterName, ClusterUpdate parameters, Context context) {
+ String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch, Context context) {
context = this.client.mergeContext(context);
Mono>> mono =
- updateWithResponseAsync(resourceGroupName, clusterName, parameters, context);
+ updateWithResponseAsync(resourceGroupName, clusterName, parameters, ifMatch, context);
return this
.client
.getLroResult(
@@ -898,6 +1023,8 @@ private PollerFlux, ClusterInner> beginUpdateAsync(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -905,8 +1032,8 @@ private PollerFlux, ClusterInner> beginUpdateAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller, ClusterInner> beginUpdate(
- String resourceGroupName, String clusterName, ClusterUpdate parameters) {
- return beginUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller();
+ String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch) {
+ return beginUpdateAsync(resourceGroupName, clusterName, parameters, ifMatch).getSyncPoller();
}
/**
@@ -915,6 +1042,8 @@ public SyncPoller, ClusterInner> beginUpdate(
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -923,8 +1052,29 @@ public SyncPoller, ClusterInner> beginUpdate(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller, ClusterInner> beginUpdate(
- String resourceGroupName, String clusterName, ClusterUpdate parameters, Context context) {
- return beginUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller();
+ String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch, Context context) {
+ return beginUpdateAsync(resourceGroupName, clusterName, parameters, ifMatch, context).getSyncPoller();
+ }
+
+ /**
+ * Update a Kusto cluster.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a Kusto cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch) {
+ return beginUpdateAsync(resourceGroupName, clusterName, parameters, ifMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -940,7 +1090,8 @@ public SyncPoller, ClusterInner> beginUpdate(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(String resourceGroupName, String clusterName, ClusterUpdate parameters) {
- return beginUpdateAsync(resourceGroupName, clusterName, parameters)
+ final String ifMatch = null;
+ return beginUpdateAsync(resourceGroupName, clusterName, parameters, ifMatch)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
@@ -951,6 +1102,8 @@ private Mono updateAsync(String resourceGroupName, String clusterN
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -959,12 +1112,30 @@ private Mono updateAsync(String resourceGroupName, String clusterN
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
- String resourceGroupName, String clusterName, ClusterUpdate parameters, Context context) {
- return beginUpdateAsync(resourceGroupName, clusterName, parameters, context)
+ String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch, Context context) {
+ return beginUpdateAsync(resourceGroupName, clusterName, parameters, ifMatch, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
+ /**
+ * Update a Kusto cluster.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a Kusto cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterInner update(String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch) {
+ return updateAsync(resourceGroupName, clusterName, parameters, ifMatch).block();
+ }
+
/**
* Update a Kusto cluster.
*
@@ -978,7 +1149,8 @@ private Mono updateAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ClusterInner update(String resourceGroupName, String clusterName, ClusterUpdate parameters) {
- return updateAsync(resourceGroupName, clusterName, parameters).block();
+ final String ifMatch = null;
+ return updateAsync(resourceGroupName, clusterName, parameters, ifMatch).block();
}
/**
@@ -987,6 +1159,8 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param parameters The Kusto cluster parameters supplied to the Update operation.
+ * @param ifMatch The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the
+ * last-seen ETag value to prevent accidentally overwriting concurrent changes.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -995,8 +1169,8 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ClusterInner update(
- String resourceGroupName, String clusterName, ClusterUpdate parameters, Context context) {
- return updateAsync(resourceGroupName, clusterName, parameters, context).block();
+ String resourceGroupName, String clusterName, ClusterUpdate parameters, String ifMatch, Context context) {
+ return updateAsync(resourceGroupName, clusterName, parameters, ifMatch, context).block();
}
/**
@@ -1043,7 +1217,7 @@ private Mono>> deleteWithResponseAsync(String resource
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1269,7 +1443,7 @@ private Mono>> stopWithResponseAsync(String resourceGr
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1494,7 +1668,7 @@ private Mono>> startWithResponseAsync(String resourceG
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1725,7 +1899,7 @@ private Mono> listFollowerDatabas
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1898,7 +2072,7 @@ private Mono>> detachFollowerDatabasesWithResponseAsyn
followerDatabaseToRemove,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -2169,7 +2343,7 @@ private Mono>> diagnoseVirtualNetworkWithResponseAsync
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -2414,7 +2588,7 @@ private Mono> listByResourceGroupSinglePageAsync(Str
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -2556,7 +2730,7 @@ private Mono> listSinglePageAsync() {
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -2685,7 +2859,7 @@ private Mono> listSkusSinglePageAsync() {
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -2781,7 +2955,7 @@ public PagedIterable listSkus(Context context) {
/**
* Checks that the cluster name is valid and is not already in use.
*
- * @param location Azure location.
+ * @param location Azure location (region) name.
* @param clusterName The name of the cluster.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -2824,13 +2998,13 @@ private Mono> checkNameAvailabilityWithResponseAs
clusterName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Checks that the cluster name is valid and is not already in use.
*
- * @param location Azure location.
+ * @param location Azure location (region) name.
* @param clusterName The name of the cluster.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -2877,7 +3051,7 @@ private Mono> checkNameAvailabilityWithResponseAs
/**
* Checks that the cluster name is valid and is not already in use.
*
- * @param location Azure location.
+ * @param location Azure location (region) name.
* @param clusterName The name of the cluster.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -2901,7 +3075,7 @@ private Mono checkNameAvailabilityAsync(
/**
* Checks that the cluster name is valid and is not already in use.
*
- * @param location Azure location.
+ * @param location Azure location (region) name.
* @param clusterName The name of the cluster.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -2916,7 +3090,7 @@ public CheckNameResultInner checkNameAvailability(String location, ClusterCheckN
/**
* Checks that the cluster name is valid and is not already in use.
*
- * @param location Azure location.
+ * @param location Azure location (region) name.
* @param clusterName The name of the cluster.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -2979,7 +3153,7 @@ private Mono> listSkusByResourceSinglePageA
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -3145,7 +3319,7 @@ private Mono> listLanguageExtensionsSingle
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -3317,7 +3491,7 @@ private Mono>> addLanguageExtensionsWithResponseAsync(
languageExtensionsToAdd,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -3582,7 +3756,7 @@ private Mono>> removeLanguageExtensionsWithResponseAsy
languageExtensionsToRemove,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersImpl.java
index 150184605c9e4..4c21e8b4fe0a0 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersImpl.java
@@ -9,7 +9,6 @@
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.ClustersClient;
import com.azure.resourcemanager.kusto.fluent.models.AzureResourceSkuInner;
import com.azure.resourcemanager.kusto.fluent.models.CheckNameResultInner;
@@ -35,9 +34,9 @@ public final class ClustersImpl implements Clusters {
private final ClustersClient innerClient;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- public ClustersImpl(ClustersClient innerClient, KustoManager serviceManager) {
+ public ClustersImpl(ClustersClient innerClient, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -94,14 +93,14 @@ public PagedIterable listFollowerDatabases(
String resourceGroupName, String clusterName) {
PagedIterable inner =
this.serviceClient().listFollowerDatabases(resourceGroupName, clusterName);
- return inner.mapPage(inner1 -> new FollowerDatabaseDefinitionImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new FollowerDatabaseDefinitionImpl(inner1, this.manager()));
}
public PagedIterable listFollowerDatabases(
String resourceGroupName, String clusterName, Context context) {
PagedIterable inner =
this.serviceClient().listFollowerDatabases(resourceGroupName, clusterName, context);
- return inner.mapPage(inner1 -> new FollowerDatabaseDefinitionImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new FollowerDatabaseDefinitionImpl(inner1, this.manager()));
}
public void detachFollowerDatabases(
@@ -140,32 +139,32 @@ public DiagnoseVirtualNetworkResult diagnoseVirtualNetwork(
public PagedIterable listByResourceGroup(String resourceGroupName) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return inner.mapPage(inner1 -> new ClusterImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
- return inner.mapPage(inner1 -> new ClusterImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
}
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return inner.mapPage(inner1 -> new ClusterImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return inner.mapPage(inner1 -> new ClusterImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
}
public PagedIterable listSkus() {
PagedIterable inner = this.serviceClient().listSkus();
- return inner.mapPage(inner1 -> new SkuDescriptionImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new SkuDescriptionImpl(inner1, this.manager()));
}
public PagedIterable listSkus(Context context) {
PagedIterable inner = this.serviceClient().listSkus(context);
- return inner.mapPage(inner1 -> new SkuDescriptionImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new SkuDescriptionImpl(inner1, this.manager()));
}
public CheckNameResult checkNameAvailability(String location, ClusterCheckNameRequest clusterName) {
@@ -195,27 +194,27 @@ public Response checkNameAvailabilityWithResponse(
public PagedIterable listSkusByResource(String resourceGroupName, String clusterName) {
PagedIterable inner =
this.serviceClient().listSkusByResource(resourceGroupName, clusterName);
- return inner.mapPage(inner1 -> new AzureResourceSkuImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new AzureResourceSkuImpl(inner1, this.manager()));
}
public PagedIterable listSkusByResource(
String resourceGroupName, String clusterName, Context context) {
PagedIterable inner =
this.serviceClient().listSkusByResource(resourceGroupName, clusterName, context);
- return inner.mapPage(inner1 -> new AzureResourceSkuImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new AzureResourceSkuImpl(inner1, this.manager()));
}
public PagedIterable listLanguageExtensions(String resourceGroupName, String clusterName) {
PagedIterable inner =
this.serviceClient().listLanguageExtensions(resourceGroupName, clusterName);
- return inner.mapPage(inner1 -> new LanguageExtensionImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new LanguageExtensionImpl(inner1, this.manager()));
}
public PagedIterable listLanguageExtensions(
String resourceGroupName, String clusterName, Context context) {
PagedIterable inner =
this.serviceClient().listLanguageExtensions(resourceGroupName, clusterName, context);
- return inner.mapPage(inner1 -> new LanguageExtensionImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new LanguageExtensionImpl(inner1, this.manager()));
}
public void addLanguageExtensions(
@@ -323,7 +322,7 @@ private ClustersClient serviceClient() {
return this.innerClient;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionImpl.java
index 480e8b65eeb0b..ac17b26317def 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionImpl.java
@@ -4,16 +4,15 @@
package com.azure.resourcemanager.kusto.implementation;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.DataConnectionInner;
import com.azure.resourcemanager.kusto.models.DataConnection;
public final class DataConnectionImpl implements DataConnection {
private DataConnectionInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- DataConnectionImpl(DataConnectionInner innerObject, KustoManager serviceManager) {
+ DataConnectionImpl(DataConnectionInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -38,7 +37,7 @@ public DataConnectionInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionValidationImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionValidationImpl.java
index 624271ff9fd10..e0f1709fcf3de 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionValidationImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionValidationImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.kusto.implementation;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.DataConnectionInner;
import com.azure.resourcemanager.kusto.fluent.models.DataConnectionValidationInner;
import com.azure.resourcemanager.kusto.models.DataConnection;
@@ -13,9 +12,10 @@
public final class DataConnectionValidationImpl implements DataConnectionValidation {
private DataConnectionValidationInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- DataConnectionValidationImpl(DataConnectionValidationInner innerObject, KustoManager serviceManager) {
+ DataConnectionValidationImpl(
+ DataConnectionValidationInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -37,7 +37,7 @@ public DataConnectionValidationInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionValidationListResultImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionValidationListResultImpl.java
index 8d0c20844a8fc..4280d18ffb39d 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionValidationListResultImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionValidationListResultImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.kusto.implementation;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.DataConnectionValidationListResultInner;
import com.azure.resourcemanager.kusto.models.DataConnectionValidationListResult;
import com.azure.resourcemanager.kusto.models.DataConnectionValidationResult;
@@ -14,10 +13,11 @@
public final class DataConnectionValidationListResultImpl implements DataConnectionValidationListResult {
private DataConnectionValidationListResultInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
DataConnectionValidationListResultImpl(
- DataConnectionValidationListResultInner innerObject, KustoManager serviceManager) {
+ DataConnectionValidationListResultInner innerObject,
+ com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -35,7 +35,7 @@ public DataConnectionValidationListResultInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsClientImpl.java
index 2869f30c5d4f7..a75c93d33a5a9 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsClientImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsClientImpl.java
@@ -248,7 +248,7 @@ private Mono> listByDatabaseSinglePageAsync(
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -434,7 +434,7 @@ private Mono>> dataConnectionValidationWithResponseAsy
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -760,7 +760,7 @@ private Mono> checkNameAvailabilityWithResponseAs
dataConnectionName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -957,7 +957,7 @@ private Mono> getWithResponseAsync(
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1147,7 +1147,7 @@ private Mono>> createOrUpdateWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1506,7 +1506,7 @@ private Mono>> updateWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1849,7 +1849,7 @@ private Mono>> deleteWithResponseAsync(
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsImpl.java
index 15d6b180da3b0..91905324bfbee 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsImpl.java
@@ -9,7 +9,6 @@
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.DataConnectionsClient;
import com.azure.resourcemanager.kusto.fluent.models.CheckNameResultInner;
import com.azure.resourcemanager.kusto.fluent.models.DataConnectionInner;
@@ -27,9 +26,10 @@ public final class DataConnectionsImpl implements DataConnections {
private final DataConnectionsClient innerClient;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- public DataConnectionsImpl(DataConnectionsClient innerClient, KustoManager serviceManager) {
+ public DataConnectionsImpl(
+ DataConnectionsClient innerClient, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -38,14 +38,14 @@ public PagedIterable listByDatabase(
String resourceGroupName, String clusterName, String databaseName) {
PagedIterable inner =
this.serviceClient().listByDatabase(resourceGroupName, clusterName, databaseName);
- return inner.mapPage(inner1 -> new DataConnectionImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new DataConnectionImpl(inner1, this.manager()));
}
public PagedIterable listByDatabase(
String resourceGroupName, String clusterName, String databaseName, Context context) {
PagedIterable inner =
this.serviceClient().listByDatabase(resourceGroupName, clusterName, databaseName, context);
- return inner.mapPage(inner1 -> new DataConnectionImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new DataConnectionImpl(inner1, this.manager()));
}
public DataConnectionValidationListResult dataConnectionValidation(
@@ -223,7 +223,7 @@ private DataConnectionsClient serviceClient() {
return this.innerClient;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabaseImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabaseImpl.java
index 76c9ac8d32ad7..aecd2b85752cb 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabaseImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabaseImpl.java
@@ -4,16 +4,15 @@
package com.azure.resourcemanager.kusto.implementation;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.DatabaseInner;
import com.azure.resourcemanager.kusto.models.Database;
public final class DatabaseImpl implements Database {
private DatabaseInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- DatabaseImpl(DatabaseInner innerObject, KustoManager serviceManager) {
+ DatabaseImpl(DatabaseInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -38,7 +37,7 @@ public DatabaseInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentImpl.java
index 3365536b85364..aceaa300d0c7a 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentImpl.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.kusto.implementation;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalAssignmentInner;
import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignment;
import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole;
@@ -16,7 +15,7 @@ public final class DatabasePrincipalAssignmentImpl
implements DatabasePrincipalAssignment, DatabasePrincipalAssignment.Definition, DatabasePrincipalAssignment.Update {
private DatabasePrincipalAssignmentInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -62,7 +61,7 @@ public DatabasePrincipalAssignmentInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
@@ -107,7 +106,7 @@ public DatabasePrincipalAssignment create(Context context) {
return this;
}
- DatabasePrincipalAssignmentImpl(String name, KustoManager serviceManager) {
+ DatabasePrincipalAssignmentImpl(String name, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = new DatabasePrincipalAssignmentInner();
this.serviceManager = serviceManager;
this.principalAssignmentName = name;
@@ -142,7 +141,8 @@ public DatabasePrincipalAssignment apply(Context context) {
return this;
}
- DatabasePrincipalAssignmentImpl(DatabasePrincipalAssignmentInner innerObject, KustoManager serviceManager) {
+ DatabasePrincipalAssignmentImpl(
+ DatabasePrincipalAssignmentInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsClientImpl.java
index 597959ce08af6..5c947acc4666b 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsClientImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsClientImpl.java
@@ -220,7 +220,7 @@ private Mono> checkNameAvailabilityWithResponseAs
principalAssignmentName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -421,7 +421,7 @@ private Mono> getWithResponseAsync(
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -622,7 +622,7 @@ private Mono>> createOrUpdateWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -982,7 +982,7 @@ private Mono>> deleteWithResponseAsync(
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1277,7 +1277,7 @@ private Mono> listSinglePageAsyn
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsImpl.java
index 55c5c04c735c4..4933c6081113c 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsImpl.java
@@ -9,7 +9,6 @@
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.DatabasePrincipalAssignmentsClient;
import com.azure.resourcemanager.kusto.fluent.models.CheckNameResultInner;
import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalAssignmentInner;
@@ -24,10 +23,10 @@ public final class DatabasePrincipalAssignmentsImpl implements DatabasePrincipal
private final DatabasePrincipalAssignmentsClient innerClient;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
public DatabasePrincipalAssignmentsImpl(
- DatabasePrincipalAssignmentsClient innerClient, KustoManager serviceManager) {
+ DatabasePrincipalAssignmentsClient innerClient, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -120,14 +119,14 @@ public PagedIterable list(
String resourceGroupName, String clusterName, String databaseName) {
PagedIterable inner =
this.serviceClient().list(resourceGroupName, clusterName, databaseName);
- return inner.mapPage(inner1 -> new DatabasePrincipalAssignmentImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new DatabasePrincipalAssignmentImpl(inner1, this.manager()));
}
public PagedIterable list(
String resourceGroupName, String clusterName, String databaseName, Context context) {
PagedIterable inner =
this.serviceClient().list(resourceGroupName, clusterName, databaseName, context);
- return inner.mapPage(inner1 -> new DatabasePrincipalAssignmentImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new DatabasePrincipalAssignmentImpl(inner1, this.manager()));
}
public DatabasePrincipalAssignment getById(String id) {
@@ -280,7 +279,7 @@ private DatabasePrincipalAssignmentsClient serviceClient() {
return this.innerClient;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalImpl.java
index 1f30837f5ec7c..a5bf76f912979 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.kusto.implementation;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalInner;
import com.azure.resourcemanager.kusto.models.DatabasePrincipal;
import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole;
@@ -13,9 +12,10 @@
public final class DatabasePrincipalImpl implements DatabasePrincipal {
private DatabasePrincipalInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- DatabasePrincipalImpl(DatabasePrincipalInner innerObject, KustoManager serviceManager) {
+ DatabasePrincipalImpl(
+ DatabasePrincipalInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -52,7 +52,7 @@ public DatabasePrincipalInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalListResultImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalListResultImpl.java
index f0f95d5ed0f58..ae8657b2a69d1 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalListResultImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalListResultImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.kusto.implementation;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalInner;
import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalListResultInner;
import com.azure.resourcemanager.kusto.models.DatabasePrincipal;
@@ -16,9 +15,10 @@
public final class DatabasePrincipalListResultImpl implements DatabasePrincipalListResult {
private DatabasePrincipalListResultInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- DatabasePrincipalListResultImpl(DatabasePrincipalListResultInner innerObject, KustoManager serviceManager) {
+ DatabasePrincipalListResultImpl(
+ DatabasePrincipalListResultInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -41,7 +41,7 @@ public DatabasePrincipalListResultInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesClientImpl.java
index 625c9557e04b6..9ca7c4ed0dbdb 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesClientImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesClientImpl.java
@@ -274,7 +274,7 @@ private Mono> checkNameAvailabilityWithResponseAs
resourceName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -439,7 +439,7 @@ private Mono> listByClusterSinglePageAsync(
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -604,7 +604,7 @@ private Mono> getWithResponseAsync(
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -773,7 +773,7 @@ private Mono>> createOrUpdateWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1055,7 +1055,7 @@ private Mono>> updateWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1329,7 +1329,7 @@ private Mono>> deleteWithResponseAsync(
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1583,7 +1583,7 @@ private Mono> listPrincipalsSinglePageAsyn
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1774,7 +1774,7 @@ private Mono> addPrincipalsWithRespon
databasePrincipalsToAdd,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1979,7 +1979,7 @@ private Mono> removePrincipalsWithRes
databasePrincipalsToRemove,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesImpl.java
index b961c2ace1b64..5cf62ad97ab60 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesImpl.java
@@ -9,7 +9,6 @@
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.DatabasesClient;
import com.azure.resourcemanager.kusto.fluent.models.CheckNameResultInner;
import com.azure.resourcemanager.kusto.fluent.models.DatabaseInner;
@@ -29,9 +28,9 @@ public final class DatabasesImpl implements Databases {
private final DatabasesClient innerClient;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- public DatabasesImpl(DatabasesClient innerClient, KustoManager serviceManager) {
+ public DatabasesImpl(DatabasesClient innerClient, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -66,13 +65,13 @@ public Response checkNameAvailabilityWithResponse(
public PagedIterable listByCluster(String resourceGroupName, String clusterName) {
PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName);
- return inner.mapPage(inner1 -> new DatabaseImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new DatabaseImpl(inner1, this.manager()));
}
public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) {
PagedIterable inner =
this.serviceClient().listByCluster(resourceGroupName, clusterName, context);
- return inner.mapPage(inner1 -> new DatabaseImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new DatabaseImpl(inner1, this.manager()));
}
public Database get(String resourceGroupName, String clusterName, String databaseName) {
@@ -154,14 +153,14 @@ public PagedIterable listPrincipals(
String resourceGroupName, String clusterName, String databaseName) {
PagedIterable inner =
this.serviceClient().listPrincipals(resourceGroupName, clusterName, databaseName);
- return inner.mapPage(inner1 -> new DatabasePrincipalImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new DatabasePrincipalImpl(inner1, this.manager()));
}
public PagedIterable listPrincipals(
String resourceGroupName, String clusterName, String databaseName, Context context) {
PagedIterable inner =
this.serviceClient().listPrincipals(resourceGroupName, clusterName, databaseName, context);
- return inner.mapPage(inner1 -> new DatabasePrincipalImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new DatabasePrincipalImpl(inner1, this.manager()));
}
public DatabasePrincipalListResult addPrincipals(
@@ -242,7 +241,7 @@ private DatabasesClient serviceClient() {
return this.innerClient;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DiagnoseVirtualNetworkResultImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DiagnoseVirtualNetworkResultImpl.java
index 4891224b7a8b4..2d92fa656d716 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DiagnoseVirtualNetworkResultImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DiagnoseVirtualNetworkResultImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.kusto.implementation;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.DiagnoseVirtualNetworkResultInner;
import com.azure.resourcemanager.kusto.models.DiagnoseVirtualNetworkResult;
import java.util.Collections;
@@ -13,9 +12,10 @@
public final class DiagnoseVirtualNetworkResultImpl implements DiagnoseVirtualNetworkResult {
private DiagnoseVirtualNetworkResultInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- DiagnoseVirtualNetworkResultImpl(DiagnoseVirtualNetworkResultInner innerObject, KustoManager serviceManager) {
+ DiagnoseVirtualNetworkResultImpl(
+ DiagnoseVirtualNetworkResultInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -33,7 +33,7 @@ public DiagnoseVirtualNetworkResultInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/FollowerDatabaseDefinitionImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/FollowerDatabaseDefinitionImpl.java
index e70e2b26dbaee..55a00656dfdc7 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/FollowerDatabaseDefinitionImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/FollowerDatabaseDefinitionImpl.java
@@ -4,16 +4,16 @@
package com.azure.resourcemanager.kusto.implementation;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.FollowerDatabaseDefinitionInner;
import com.azure.resourcemanager.kusto.models.FollowerDatabaseDefinition;
public final class FollowerDatabaseDefinitionImpl implements FollowerDatabaseDefinition {
private FollowerDatabaseDefinitionInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- FollowerDatabaseDefinitionImpl(FollowerDatabaseDefinitionInner innerObject, KustoManager serviceManager) {
+ FollowerDatabaseDefinitionImpl(
+ FollowerDatabaseDefinitionInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -34,7 +34,7 @@ public FollowerDatabaseDefinitionInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientImpl.java
index cf1e8404ad1e6..80d68878097d9 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientImpl.java
@@ -29,6 +29,8 @@
import com.azure.resourcemanager.kusto.fluent.DatabasesClient;
import com.azure.resourcemanager.kusto.fluent.KustoManagementClient;
import com.azure.resourcemanager.kusto.fluent.OperationsClient;
+import com.azure.resourcemanager.kusto.fluent.OperationsResultsClient;
+import com.azure.resourcemanager.kusto.fluent.ScriptsClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -168,6 +170,18 @@ public DatabasePrincipalAssignmentsClient getDatabasePrincipalAssignments() {
return this.databasePrincipalAssignments;
}
+ /** The ScriptsClient object to access its operations. */
+ private final ScriptsClient scripts;
+
+ /**
+ * Gets the ScriptsClient object to access its operations.
+ *
+ * @return the ScriptsClient object.
+ */
+ public ScriptsClient getScripts() {
+ return this.scripts;
+ }
+
/** The AttachedDatabaseConfigurationsClient object to access its operations. */
private final AttachedDatabaseConfigurationsClient attachedDatabaseConfigurations;
@@ -204,6 +218,18 @@ public OperationsClient getOperations() {
return this.operations;
}
+ /** The OperationsResultsClient object to access its operations. */
+ private final OperationsResultsClient operationsResults;
+
+ /**
+ * Gets the OperationsResultsClient object to access its operations.
+ *
+ * @return the OperationsResultsClient object.
+ */
+ public OperationsResultsClient getOperationsResults() {
+ return this.operationsResults;
+ }
+
/**
* Initializes an instance of KustoManagementClient client.
*
@@ -227,14 +253,16 @@ public OperationsClient getOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2020-09-18";
+ this.apiVersion = "2021-01-01";
this.clusters = new ClustersClientImpl(this);
this.clusterPrincipalAssignments = new ClusterPrincipalAssignmentsClientImpl(this);
this.databases = new DatabasesClientImpl(this);
this.databasePrincipalAssignments = new DatabasePrincipalAssignmentsClientImpl(this);
+ this.scripts = new ScriptsClientImpl(this);
this.attachedDatabaseConfigurations = new AttachedDatabaseConfigurationsClientImpl(this);
this.dataConnections = new DataConnectionsClientImpl(this);
this.operations = new OperationsClientImpl(this);
+ this.operationsResults = new OperationsResultsClientImpl(this);
}
/**
@@ -319,7 +347,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
if (managementError.getCode() == null || managementError.getMessage() == null) {
managementError = null;
}
- } catch (IOException ioe) {
+ } catch (IOException | RuntimeException ioe) {
logger.logThrowableAsWarning(ioe);
}
}
@@ -348,7 +376,7 @@ private static final class HttpResponseImpl extends HttpResponse {
super(null);
this.statusCode = statusCode;
this.httpHeaders = httpHeaders;
- this.responseBody = responseBody.getBytes(StandardCharsets.UTF_8);
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
}
public int getStatusCode() {
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/LanguageExtensionImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/LanguageExtensionImpl.java
index 31a79066a63ad..0152375feb02a 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/LanguageExtensionImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/LanguageExtensionImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.kusto.implementation;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.LanguageExtensionInner;
import com.azure.resourcemanager.kusto.models.LanguageExtension;
import com.azure.resourcemanager.kusto.models.LanguageExtensionName;
@@ -12,9 +11,10 @@
public final class LanguageExtensionImpl implements LanguageExtension {
private LanguageExtensionInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- LanguageExtensionImpl(LanguageExtensionInner innerObject, KustoManager serviceManager) {
+ LanguageExtensionImpl(
+ LanguageExtensionInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -27,7 +27,7 @@ public LanguageExtensionInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationImpl.java
index 42d795a8d158c..c5ad4e7f8ceeb 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.kusto.implementation;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.models.OperationInner;
import com.azure.resourcemanager.kusto.models.Operation;
import com.azure.resourcemanager.kusto.models.OperationDisplay;
@@ -12,9 +11,9 @@
public final class OperationImpl implements Operation {
private OperationInner innerObject;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- OperationImpl(OperationInner innerObject, KustoManager serviceManager) {
+ OperationImpl(OperationInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -39,7 +38,7 @@ public OperationInner innerModel() {
return this.innerObject;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationResultImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationResultImpl.java
new file mode 100644
index 0000000000000..1bb67ab493d86
--- /dev/null
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationResultImpl.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kusto.implementation;
+
+import com.azure.resourcemanager.kusto.fluent.models.OperationResultInner;
+import com.azure.resourcemanager.kusto.models.OperationResult;
+import com.azure.resourcemanager.kusto.models.Status;
+import java.time.OffsetDateTime;
+
+public final class OperationResultImpl implements OperationResult {
+ private OperationResultInner innerObject;
+
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
+
+ OperationResultImpl(OperationResultInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public Status status() {
+ return this.innerModel().status();
+ }
+
+ public OffsetDateTime startTime() {
+ return this.innerModel().startTime();
+ }
+
+ public OffsetDateTime endTime() {
+ return this.innerModel().endTime();
+ }
+
+ public Double percentComplete() {
+ return this.innerModel().percentComplete();
+ }
+
+ public String code() {
+ return this.innerModel().code();
+ }
+
+ public String message() {
+ return this.innerModel().message();
+ }
+
+ public String operationKind() {
+ return this.innerModel().operationKind();
+ }
+
+ public String operationState() {
+ return this.innerModel().operationState();
+ }
+
+ public OperationResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsClientImpl.java
index 501c3fd04e83e..a4612efa9e9fc 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsClientImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsClientImpl.java
@@ -108,7 +108,7 @@ private Mono> listSinglePageAsync() {
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -228,7 +228,7 @@ private Mono> listNextSinglePageAsync(String nextL
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsImpl.java
index b51bd4a31330e..eeb99e1a3c5be 100644
--- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsImpl.java
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsImpl.java
@@ -7,7 +7,6 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.kusto.KustoManager;
import com.azure.resourcemanager.kusto.fluent.OperationsClient;
import com.azure.resourcemanager.kusto.fluent.models.OperationInner;
import com.azure.resourcemanager.kusto.models.Operation;
@@ -19,28 +18,28 @@ public final class OperationsImpl implements Operations {
private final OperationsClient innerClient;
- private final KustoManager serviceManager;
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
- public OperationsImpl(OperationsClient innerClient, KustoManager serviceManager) {
+ public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return inner.mapPage(inner1 -> new OperationImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return inner.mapPage(inner1 -> new OperationImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
}
private OperationsClient serviceClient() {
return this.innerClient;
}
- private KustoManager manager() {
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsClientImpl.java
new file mode 100644
index 0000000000000..289be070dd072
--- /dev/null
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsClientImpl.java
@@ -0,0 +1,217 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kusto.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.kusto.fluent.OperationsResultsClient;
+import com.azure.resourcemanager.kusto.fluent.models.OperationResultInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationsResultsClient. */
+public final class OperationsResultsClientImpl implements OperationsResultsClient {
+ private final ClientLogger logger = new ClientLogger(OperationsResultsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final OperationsResultsService service;
+
+ /** The service client containing this operation class. */
+ private final KustoManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsResultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsResultsClientImpl(KustoManagementClientImpl client) {
+ this.service =
+ RestProxy.create(OperationsResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for KustoManagementClientOperationsResults to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "KustoManagementClien")
+ private interface OperationsResultsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/operationresults"
+ + "/{operationId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("location") String location,
+ @PathParam("operationId") String operationId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Returns operation results.
+ *
+ * @param location Azure location (region) name.
+ * @param operationId The Guid of the operation ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation Result Entity.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String location, String operationId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ location,
+ operationId,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Returns operation results.
+ *
+ * @param location Azure location (region) name.
+ * @param operationId The Guid of the operation ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation Result Entity.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String location, String operationId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ location,
+ operationId,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Returns operation results.
+ *
+ * @param location Azure location (region) name.
+ * @param operationId The Guid of the operation ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation Result Entity.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String location, String operationId) {
+ return getWithResponseAsync(location, operationId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Returns operation results.
+ *
+ * @param location Azure location (region) name.
+ * @param operationId The Guid of the operation ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation Result Entity.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationResultInner get(String location, String operationId) {
+ return getAsync(location, operationId).block();
+ }
+
+ /**
+ * Returns operation results.
+ *
+ * @param location Azure location (region) name.
+ * @param operationId The Guid of the operation ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation Result Entity.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String location, String operationId, Context context) {
+ return getWithResponseAsync(location, operationId, context).block();
+ }
+}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsImpl.java
new file mode 100644
index 0000000000000..537c06e36a313
--- /dev/null
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsImpl.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kusto.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.kusto.fluent.OperationsResultsClient;
+import com.azure.resourcemanager.kusto.fluent.models.OperationResultInner;
+import com.azure.resourcemanager.kusto.models.OperationResult;
+import com.azure.resourcemanager.kusto.models.OperationsResults;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class OperationsResultsImpl implements OperationsResults {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsResultsImpl.class);
+
+ private final OperationsResultsClient innerClient;
+
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
+
+ public OperationsResultsImpl(
+ OperationsResultsClient innerClient, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public OperationResult get(String location, String operationId) {
+ OperationResultInner inner = this.serviceClient().get(location, operationId);
+ if (inner != null) {
+ return new OperationResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(String location, String operationId, Context context) {
+ Response inner = this.serviceClient().getWithResponse(location, operationId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new OperationResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private OperationsResultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptImpl.java
new file mode 100644
index 0000000000000..a99bc764887a0
--- /dev/null
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptImpl.java
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kusto.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.kusto.fluent.models.ScriptInner;
+import com.azure.resourcemanager.kusto.models.ProvisioningState;
+import com.azure.resourcemanager.kusto.models.Script;
+
+public final class ScriptImpl implements Script, Script.Definition, Script.Update {
+ private ScriptInner innerObject;
+
+ private final com.azure.resourcemanager.kusto.KustoManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String scriptUrl() {
+ return this.innerModel().scriptUrl();
+ }
+
+ public String scriptUrlSasToken() {
+ return this.innerModel().scriptUrlSasToken();
+ }
+
+ public String forceUpdateTag() {
+ return this.innerModel().forceUpdateTag();
+ }
+
+ public Boolean continueOnErrors() {
+ return this.innerModel().continueOnErrors();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public ScriptInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.kusto.KustoManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String clusterName;
+
+ private String databaseName;
+
+ private String scriptName;
+
+ public ScriptImpl withExistingDatabase(String resourceGroupName, String clusterName, String databaseName) {
+ this.resourceGroupName = resourceGroupName;
+ this.clusterName = clusterName;
+ this.databaseName = databaseName;
+ return this;
+ }
+
+ public Script create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getScripts()
+ .createOrUpdate(
+ resourceGroupName, clusterName, databaseName, scriptName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Script create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getScripts()
+ .createOrUpdate(resourceGroupName, clusterName, databaseName, scriptName, this.innerModel(), context);
+ return this;
+ }
+
+ ScriptImpl(String name, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
+ this.innerObject = new ScriptInner();
+ this.serviceManager = serviceManager;
+ this.scriptName = name;
+ }
+
+ public ScriptImpl update() {
+ return this;
+ }
+
+ public Script apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getScripts()
+ .update(resourceGroupName, clusterName, databaseName, scriptName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Script apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getScripts()
+ .update(resourceGroupName, clusterName, databaseName, scriptName, this.innerModel(), context);
+ return this;
+ }
+
+ ScriptImpl(ScriptInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters");
+ this.databaseName = Utils.getValueFromIdByName(innerObject.id(), "databases");
+ this.scriptName = Utils.getValueFromIdByName(innerObject.id(), "scripts");
+ }
+
+ public Script refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getScripts()
+ .getWithResponse(resourceGroupName, clusterName, databaseName, scriptName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Script refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getScripts()
+ .getWithResponse(resourceGroupName, clusterName, databaseName, scriptName, context)
+ .getValue();
+ return this;
+ }
+
+ public ScriptImpl withScriptUrl(String scriptUrl) {
+ this.innerModel().withScriptUrl(scriptUrl);
+ return this;
+ }
+
+ public ScriptImpl withScriptUrlSasToken(String scriptUrlSasToken) {
+ this.innerModel().withScriptUrlSasToken(scriptUrlSasToken);
+ return this;
+ }
+
+ public ScriptImpl withForceUpdateTag(String forceUpdateTag) {
+ this.innerModel().withForceUpdateTag(forceUpdateTag);
+ return this;
+ }
+
+ public ScriptImpl withContinueOnErrors(Boolean continueOnErrors) {
+ this.innerModel().withContinueOnErrors(continueOnErrors);
+ return this;
+ }
+}
diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptsClientImpl.java
new file mode 100644
index 0000000000000..9887fde4305f2
--- /dev/null
+++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptsClientImpl.java
@@ -0,0 +1,1650 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kusto.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.kusto.fluent.ScriptsClient;
+import com.azure.resourcemanager.kusto.fluent.models.CheckNameResultInner;
+import com.azure.resourcemanager.kusto.fluent.models.ScriptInner;
+import com.azure.resourcemanager.kusto.models.ScriptCheckNameRequest;
+import com.azure.resourcemanager.kusto.models.ScriptListResult;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ScriptsClient. */
+public final class ScriptsClientImpl implements ScriptsClient {
+ private final ClientLogger logger = new ClientLogger(ScriptsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final ScriptsService service;
+
+ /** The service client containing this operation class. */
+ private final KustoManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ScriptsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ScriptsClientImpl(KustoManagementClientImpl client) {
+ this.service = RestProxy.create(ScriptsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for KustoManagementClientScripts to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "KustoManagementClien")
+ private interface ScriptsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters"
+ + "/{clusterName}/databases/{databaseName}/scripts")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByDatabase(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters"
+ + "/{clusterName}/databases/{databaseName}/scripts/{scriptName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @PathParam("scriptName") String scriptName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters"
+ + "/{clusterName}/databases/{databaseName}/scripts/{scriptName}")
+ @ExpectedResponses({200, 201, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @PathParam("scriptName") String scriptName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ScriptInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters"
+ + "/{clusterName}/databases/{databaseName}/scripts/{scriptName}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @PathParam("scriptName") String scriptName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ScriptInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters"
+ + "/{clusterName}/databases/{databaseName}/scripts/{scriptName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @PathParam("scriptName") String scriptName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters"
+ + "/{clusterName}/databases/{databaseName}/scriptsCheckNameAvailability")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> checkNameAvailability(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") ScriptCheckNameRequest scriptName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Returns the list of database scripts for given database.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list Kusto database script operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByDatabaseSinglePageAsync(
+ String resourceGroupName, String clusterName, String databaseName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByDatabase(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Returns the list of database scripts for given database.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list Kusto database script operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByDatabaseSinglePageAsync(
+ String resourceGroupName, String clusterName, String databaseName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByDatabase(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
+ }
+
+ /**
+ * Returns the list of database scripts for given database.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list Kusto database script operation response.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByDatabaseAsync(
+ String resourceGroupName, String clusterName, String databaseName) {
+ return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, clusterName, databaseName));
+ }
+
+ /**
+ * Returns the list of database scripts for given database.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list Kusto database script operation response.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByDatabaseAsync(
+ String resourceGroupName, String clusterName, String databaseName, Context context) {
+ return new PagedFlux<>(
+ () -> listByDatabaseSinglePageAsync(resourceGroupName, clusterName, databaseName, context));
+ }
+
+ /**
+ * Returns the list of database scripts for given database.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list Kusto database script operation response.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByDatabase(
+ String resourceGroupName, String clusterName, String databaseName) {
+ return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, clusterName, databaseName));
+ }
+
+ /**
+ * Returns the list of database scripts for given database.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list Kusto database script operation response.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByDatabase(
+ String resourceGroupName, String clusterName, String databaseName, Context context) {
+ return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, clusterName, databaseName, context));
+ }
+
+ /**
+ * Gets a Kusto cluster database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Kusto cluster database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (scriptName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scriptName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ scriptName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a Kusto cluster database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Kusto cluster database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (scriptName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scriptName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ scriptName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets a Kusto cluster database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Kusto cluster database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName) {
+ return getWithResponseAsync(resourceGroupName, clusterName, databaseName, scriptName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets a Kusto cluster database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Kusto cluster database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ScriptInner get(String resourceGroupName, String clusterName, String databaseName, String scriptName) {
+ return getAsync(resourceGroupName, clusterName, databaseName, scriptName).block();
+ }
+
+ /**
+ * Gets a Kusto cluster database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Kusto cluster database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, Context context) {
+ return getWithResponseAsync(resourceGroupName, clusterName, databaseName, scriptName, context).block();
+ }
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (scriptName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scriptName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ scriptName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ String scriptName,
+ ScriptInner parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (scriptName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scriptName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ scriptName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, ScriptInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ScriptInner.class, ScriptInner.class, Context.NONE);
+ }
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, ScriptInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ String scriptName,
+ ScriptInner parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(
+ resourceGroupName, clusterName, databaseName, scriptName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ScriptInner.class, ScriptInner.class, context);
+ }
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, ScriptInner> beginCreateOrUpdate(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, ScriptInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ String scriptName,
+ ScriptInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ String scriptName,
+ ScriptInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ScriptInner createOrUpdate(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters).block();
+ }
+
+ /**
+ * Creates a Kusto database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains the KQL to run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ScriptInner createOrUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ String scriptName,
+ ScriptInner parameters,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters, context)
+ .block();
+ }
+
+ /**
+ * Updates a database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains to the KQL to run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (scriptName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scriptName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ scriptName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates a database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains to the KQL to run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ String scriptName,
+ ScriptInner parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (scriptName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scriptName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ scriptName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates a database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains to the KQL to run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, ScriptInner> beginUpdateAsync(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters) {
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ScriptInner.class, ScriptInner.class, Context.NONE);
+ }
+
+ /**
+ * Updates a database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains to the KQL to run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, ScriptInner> beginUpdateAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ String scriptName,
+ ScriptInner parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ScriptInner.class, ScriptInner.class, context);
+ }
+
+ /**
+ * Updates a database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains to the KQL to run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, ScriptInner> beginUpdate(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters) {
+ return beginUpdateAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Updates a database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains to the KQL to run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, ScriptInner> beginUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ String scriptName,
+ ScriptInner parameters,
+ Context context) {
+ return beginUpdateAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Updates a database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains to the KQL to run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters) {
+ return beginUpdateAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a database script.
+ *
+ * @param resourceGroupName The name of the resource group containing the Kusto cluster.
+ * @param clusterName The name of the Kusto cluster.
+ * @param databaseName The name of the database in the Kusto cluster.
+ * @param scriptName The name of the Kusto database script.
+ * @param parameters The Kusto Script parameters contains to the KQL to run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return class representing a database script.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono