scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -154,6 +180,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -161,9 +200,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -185,7 +226,7 @@ public AzureArcDataManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.azurearcdata")
.append("/")
- .append("1.0.0-beta.2");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -203,16 +244,34 @@ public AzureArcDataManager authenticate(TokenCredential credential, AzureProfile
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
- policies.addAll(this.policies);
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -256,6 +315,23 @@ public DataControllers dataControllers() {
return dataControllers;
}
+ /** @return Resource collection API of ActiveDirectoryConnectors. */
+ public ActiveDirectoryConnectors activeDirectoryConnectors() {
+ if (this.activeDirectoryConnectors == null) {
+ this.activeDirectoryConnectors =
+ new ActiveDirectoryConnectorsImpl(clientObject.getActiveDirectoryConnectors(), this);
+ }
+ return activeDirectoryConnectors;
+ }
+
+ /** @return Resource collection API of PostgresInstances. */
+ public PostgresInstances postgresInstances() {
+ if (this.postgresInstances == null) {
+ this.postgresInstances = new PostgresInstancesImpl(clientObject.getPostgresInstances(), this);
+ }
+ return postgresInstances;
+ }
+
/**
* @return Wrapped service client AzureArcDataManagementClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/ActiveDirectoryConnectorsClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/ActiveDirectoryConnectorsClient.java
new file mode 100644
index 000000000000..4d2f2df3f4fc
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/ActiveDirectoryConnectorsClient.java
@@ -0,0 +1,215 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurearcdata.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.azurearcdata.fluent.models.ActiveDirectoryConnectorResourceInner;
+
+/** An instance of this class provides access to all the operations defined in ActiveDirectoryConnectorsClient. */
+public interface ActiveDirectoryConnectorsClient {
+ /**
+ * List the active directory connectors associated with the given data controller.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @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 list of active directory connectors as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String dataControllerName);
+
+ /**
+ * List the active directory connectors associated with the given data controller.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @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 list of active directory connectors as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String resourceGroupName, String dataControllerName, Context context);
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 {@link SyncPoller} for polling of active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ActiveDirectoryConnectorResourceInner> beginCreate(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource);
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 {@link SyncPoller} for polling of active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ActiveDirectoryConnectorResourceInner> beginCreate(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ Context context);
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ActiveDirectoryConnectorResourceInner create(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource);
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ActiveDirectoryConnectorResourceInner create(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ Context context);
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName);
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context);
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 dataControllerName, String activeDirectoryConnectorName);
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 dataControllerName, String activeDirectoryConnectorName, Context context);
+
+ /**
+ * Retrieves an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ActiveDirectoryConnectorResourceInner get(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName);
+
+ /**
+ * Retrieves an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 active directory connector resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context);
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/AzureArcDataManagementClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/AzureArcDataManagementClient.java
index da11f09fe2a9..6c1fb44f4cd6 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/AzureArcDataManagementClient.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/AzureArcDataManagementClient.java
@@ -71,4 +71,18 @@ public interface AzureArcDataManagementClient {
* @return the DataControllersClient object.
*/
DataControllersClient getDataControllers();
+
+ /**
+ * Gets the ActiveDirectoryConnectorsClient object to access its operations.
+ *
+ * @return the ActiveDirectoryConnectorsClient object.
+ */
+ ActiveDirectoryConnectorsClient getActiveDirectoryConnectors();
+
+ /**
+ * Gets the PostgresInstancesClient object to access its operations.
+ *
+ * @return the PostgresInstancesClient object.
+ */
+ PostgresInstancesClient getPostgresInstances();
}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/DataControllersClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/DataControllersClient.java
index d8c03b698926..65792fe1d4c8 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/DataControllersClient.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/DataControllersClient.java
@@ -21,7 +21,7 @@ public interface DataControllersClient {
*
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -33,7 +33,7 @@ public interface DataControllersClient {
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -45,7 +45,7 @@ public interface DataControllersClient {
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -58,7 +58,7 @@ public interface DataControllersClient {
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -67,14 +67,14 @@ public interface DataControllersClient {
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @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 data controller resource.
+ * @return the {@link SyncPoller} for polling of data controller resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DataControllerResourceInner> beginPutDataController(
String resourceGroupName, String dataControllerName, DataControllerResourceInner dataControllerResource);
@@ -82,15 +82,15 @@ SyncPoller, DataControllerResourceInner>
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @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 data controller resource.
+ * @return the {@link SyncPoller} for polling of data controller resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DataControllerResourceInner> beginPutDataController(
String resourceGroupName,
String dataControllerName,
@@ -101,7 +101,7 @@ SyncPoller, DataControllerResourceInner>
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -116,7 +116,7 @@ DataControllerResourceInner putDataController(
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -135,27 +135,27 @@ DataControllerResourceInner putDataController(
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String dataControllerName);
/**
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String dataControllerName, Context context);
@@ -163,7 +163,7 @@ SyncPoller, Void> beginDelete(
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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.
@@ -175,7 +175,7 @@ SyncPoller, Void> beginDelete(
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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.
@@ -188,7 +188,7 @@ SyncPoller, Void> beginDelete(
* Retrieves a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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.
@@ -201,12 +201,12 @@ SyncPoller, Void> beginDelete(
* Retrieves a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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 data controller resource.
+ * @return data controller resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -216,7 +216,7 @@ Response getByResourceGroupWithResponse(
* Updates a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource The update data controller resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -231,13 +231,13 @@ DataControllerResourceInner patchDataController(
* Updates a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource The update data controller resource.
* @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 data controller resource.
+ * @return data controller resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response patchDataControllerWithResponse(
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/OperationsClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/OperationsClient.java
index 41bea71529e2..532d935f2205 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/OperationsClient.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/OperationsClient.java
@@ -17,7 +17,8 @@ public interface OperationsClient {
*
* @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 result of the request to list Azure Data Services on Azure Arc operations.
+ * @return result of the request to list Azure Data Services on Azure Arc operations as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +30,8 @@ public interface OperationsClient {
* @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 result of the request to list Azure Data Services on Azure Arc operations.
+ * @return result of the request to list Azure Data Services on Azure Arc operations as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/PostgresInstancesClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/PostgresInstancesClient.java
new file mode 100644
index 000000000000..0f3e21a1e4e6
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/PostgresInstancesClient.java
@@ -0,0 +1,238 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurearcdata.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.azurearcdata.fluent.models.PostgresInstanceInner;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceUpdate;
+
+/** An instance of this class provides access to all the operations defined in PostgresInstancesClient. */
+public interface PostgresInstancesClient {
+ /**
+ * List postgres Instance resources in the subscription.
+ *
+ * @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 list of PostgresInstance as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List postgres Instance resources in the subscription.
+ *
+ * @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 list of PostgresInstance as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Get a postgres Instances list by Resource group name.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @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 postgres Instances list by Resource group name as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Get a postgres Instances list by Resource group name.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @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 postgres Instances list by Resource group name as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Retrieves a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @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 Postgres Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PostgresInstanceInner getByResourceGroup(String resourceGroupName, String postgresInstanceName);
+
+ /**
+ * Retrieves a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @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 Postgres Instance along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String postgresInstanceName, Context context);
+
+ /**
+ * Creates or replaces a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @param resource The postgres instance.
+ * @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 {@link SyncPoller} for polling of a Postgres Instance.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PostgresInstanceInner> beginCreate(
+ String resourceGroupName, String postgresInstanceName, PostgresInstanceInner resource);
+
+ /**
+ * Creates or replaces a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @param resource The postgres instance.
+ * @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 {@link SyncPoller} for polling of a Postgres Instance.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PostgresInstanceInner> beginCreate(
+ String resourceGroupName, String postgresInstanceName, PostgresInstanceInner resource, Context context);
+
+ /**
+ * Creates or replaces a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @param resource The postgres instance.
+ * @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 Postgres Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PostgresInstanceInner create(String resourceGroupName, String postgresInstanceName, PostgresInstanceInner resource);
+
+ /**
+ * Creates or replaces a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @param resource The postgres instance.
+ * @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 Postgres Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PostgresInstanceInner create(
+ String resourceGroupName, String postgresInstanceName, PostgresInstanceInner resource, Context context);
+
+ /**
+ * Deletes a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String postgresInstanceName);
+
+ /**
+ * Deletes a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String postgresInstanceName, Context context);
+
+ /**
+ * Deletes a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @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 postgresInstanceName);
+
+ /**
+ * Deletes a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @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 postgresInstanceName, Context context);
+
+ /**
+ * Updates a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @param parameters The Postgres Instance.
+ * @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 Postgres Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PostgresInstanceInner update(
+ String resourceGroupName, String postgresInstanceName, PostgresInstanceUpdate parameters);
+
+ /**
+ * Updates a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @param parameters The Postgres Instance.
+ * @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 Postgres Instance along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String postgresInstanceName, PostgresInstanceUpdate parameters, Context context);
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlManagedInstancesClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlManagedInstancesClient.java
index 6cb84258c3bb..ab55b20c5b6a 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlManagedInstancesClient.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlManagedInstancesClient.java
@@ -21,7 +21,7 @@ public interface SqlManagedInstancesClient {
*
* @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 list of SqlManagedInstance.
+ * @return a list of SqlManagedInstance as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -33,7 +33,7 @@ public interface SqlManagedInstancesClient {
* @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 list of SqlManagedInstance.
+ * @return a list of SqlManagedInstance as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -45,7 +45,7 @@ public interface SqlManagedInstancesClient {
* @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 all sqlManagedInstances in a resource group.
+ * @return all sqlManagedInstances in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -58,7 +58,7 @@ public interface SqlManagedInstancesClient {
* @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 all sqlManagedInstances in a resource group.
+ * @return all sqlManagedInstances in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -85,7 +85,7 @@ public interface SqlManagedInstancesClient {
* @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 SqlManagedInstance.
+ * @return a SqlManagedInstance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -95,14 +95,14 @@ Response getByResourceGroupWithResponse(
* Creates or replaces a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of SQL Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @param sqlManagedInstance The SQL Managed Instance to be created or updated.
* @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 SqlManagedInstance.
+ * @return the {@link SyncPoller} for polling of a SqlManagedInstance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlManagedInstanceInner> beginCreate(
String resourceGroupName, String sqlManagedInstanceName, SqlManagedInstanceInner sqlManagedInstance);
@@ -110,15 +110,15 @@ SyncPoller, SqlManagedInstanceInner> beginCr
* Creates or replaces a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of SQL Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @param sqlManagedInstance The SQL Managed Instance to be created or updated.
* @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 SqlManagedInstance.
+ * @return the {@link SyncPoller} for polling of a SqlManagedInstance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlManagedInstanceInner> beginCreate(
String resourceGroupName,
String sqlManagedInstanceName,
@@ -129,7 +129,7 @@ SyncPoller, SqlManagedInstanceInner> beginCr
* Creates or replaces a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of SQL Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @param sqlManagedInstance The SQL Managed Instance to be created or updated.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -144,7 +144,7 @@ SqlManagedInstanceInner create(
* Creates or replaces a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of SQL Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @param sqlManagedInstance The SQL Managed Instance to be created or updated.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -163,27 +163,27 @@ SqlManagedInstanceInner create(
* Deletes a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of Sql Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String sqlManagedInstanceName);
/**
* Deletes a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of Sql Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String sqlManagedInstanceName, Context context);
@@ -191,7 +191,7 @@ SyncPoller, Void> beginDelete(
* Deletes a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of Sql Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @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.
@@ -203,7 +203,7 @@ SyncPoller, Void> beginDelete(
* Deletes a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of Sql Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @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.
@@ -216,7 +216,7 @@ SyncPoller, Void> beginDelete(
* Updates a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName Name of sqlManagedInstance.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @param parameters The SQL Managed Instance.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -231,13 +231,13 @@ SqlManagedInstanceInner update(
* Updates a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName Name of sqlManagedInstance.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @param parameters The SQL Managed Instance.
* @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 SqlManagedInstance.
+ * @return a SqlManagedInstance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlServerInstancesClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlServerInstancesClient.java
index 6e362cf1ec4a..5a7466268a51 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlServerInstancesClient.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlServerInstancesClient.java
@@ -21,7 +21,7 @@ public interface SqlServerInstancesClient {
*
* @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 list of SqlServerInstance.
+ * @return a list of SqlServerInstance as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -33,7 +33,7 @@ public interface SqlServerInstancesClient {
* @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 list of SqlServerInstance.
+ * @return a list of SqlServerInstance as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -45,7 +45,7 @@ public interface SqlServerInstancesClient {
* @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 all sqlServerInstances in a resource group.
+ * @return all sqlServerInstances in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -58,7 +58,7 @@ public interface SqlServerInstancesClient {
* @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 all sqlServerInstances in a resource group.
+ * @return all sqlServerInstances in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -85,7 +85,7 @@ public interface SqlServerInstancesClient {
* @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 SqlServerInstance.
+ * @return a SqlServerInstance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -95,14 +95,14 @@ Response getByResourceGroupWithResponse(
* Creates or replaces a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @param sqlServerInstance The SQL Server Instance to be created or updated.
* @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 SqlServerInstance.
+ * @return the {@link SyncPoller} for polling of a SqlServerInstance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlServerInstanceInner> beginCreate(
String resourceGroupName, String sqlServerInstanceName, SqlServerInstanceInner sqlServerInstance);
@@ -110,15 +110,15 @@ SyncPoller, SqlServerInstanceInner> beginCrea
* Creates or replaces a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @param sqlServerInstance The SQL Server Instance to be created or updated.
* @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 SqlServerInstance.
+ * @return the {@link SyncPoller} for polling of a SqlServerInstance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlServerInstanceInner> beginCreate(
String resourceGroupName,
String sqlServerInstanceName,
@@ -129,7 +129,7 @@ SyncPoller, SqlServerInstanceInner> beginCrea
* Creates or replaces a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @param sqlServerInstance The SQL Server Instance to be created or updated.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -144,7 +144,7 @@ SqlServerInstanceInner create(
* Creates or replaces a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @param sqlServerInstance The SQL Server Instance to be created or updated.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -163,27 +163,27 @@ SqlServerInstanceInner create(
* Deletes a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String sqlServerInstanceName);
/**
* Deletes a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String sqlServerInstanceName, Context context);
@@ -191,7 +191,7 @@ SyncPoller, Void> beginDelete(
* Deletes a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @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.
@@ -203,7 +203,7 @@ SyncPoller, Void> beginDelete(
* Deletes a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @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.
@@ -216,7 +216,7 @@ SyncPoller, Void> beginDelete(
* Updates a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName Name of sqlServerInstance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @param parameters The SQL Server Instance.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -231,13 +231,13 @@ SqlServerInstanceInner update(
* Updates a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName Name of sqlServerInstance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @param parameters The SQL Server Instance.
* @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 SqlServerInstance.
+ * @return a SqlServerInstance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/ActiveDirectoryConnectorResourceInner.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/ActiveDirectoryConnectorResourceInner.java
new file mode 100644
index 000000000000..8f13ea908c09
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/ActiveDirectoryConnectorResourceInner.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.azurearcdata.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Active directory connector resource. */
+@Fluent
+public final class ActiveDirectoryConnectorResourceInner extends ProxyResource {
+ /*
+ * null
+ */
+ @JsonProperty(value = "properties", required = true)
+ private ActiveDirectoryConnectorProperties properties;
+
+ /**
+ * Get the properties property: null.
+ *
+ * @return the properties value.
+ */
+ public ActiveDirectoryConnectorProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: null.
+ *
+ * @param properties the properties value to set.
+ * @return the ActiveDirectoryConnectorResourceInner object itself.
+ */
+ public ActiveDirectoryConnectorResourceInner withProperties(ActiveDirectoryConnectorProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property properties in model ActiveDirectoryConnectorResourceInner"));
+ } else {
+ properties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConnectorResourceInner.class);
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/DataControllerResourceInner.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/DataControllerResourceInner.java
index e3519feb731f..861d6c31d79f 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/DataControllerResourceInner.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/DataControllerResourceInner.java
@@ -10,15 +10,12 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.azurearcdata.models.DataControllerProperties;
import com.azure.resourcemanager.azurearcdata.models.ExtendedLocation;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** Data controller resource. */
@Fluent
public final class DataControllerResourceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DataControllerResourceInner.class);
-
/*
* The extendedLocation of the resource.
*/
@@ -32,7 +29,8 @@ public final class DataControllerResourceInner extends Resource {
private DataControllerProperties properties;
/*
- * Read only system data
+ * Azure Resource Manager metadata containing createdBy and modifiedBy
+ * information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
@@ -78,7 +76,7 @@ public DataControllerResourceInner withProperties(DataControllerProperties prope
}
/**
- * Get the systemData property: Read only system data.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
@@ -110,7 +108,7 @@ public void validate() {
extendedLocation().validate();
}
if (properties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property properties in model DataControllerResourceInner"));
@@ -118,4 +116,6 @@ public void validate() {
properties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(DataControllerResourceInner.class);
}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/OperationInner.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/OperationInner.java
index b57633882bc6..bb9c0089c34d 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/OperationInner.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/OperationInner.java
@@ -8,7 +8,6 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.azurearcdata.models.OperationDisplay;
import com.azure.resourcemanager.azurearcdata.models.OperationOrigin;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -16,8 +15,6 @@
/** Azure Data Services on Azure Arc operation definition. */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* The name of the operation being performed on this particular object.
*/
@@ -135,16 +132,18 @@ public Map properties() {
*/
public void validate() {
if (name() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property name in model OperationInner"));
}
if (display() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property display in model OperationInner"));
} else {
display().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(OperationInner.class);
}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/PostgresInstanceInner.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/PostgresInstanceInner.java
new file mode 100644
index 000000000000..e08979ed0233
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/PostgresInstanceInner.java
@@ -0,0 +1,151 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurearcdata.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurearcdata.models.ExtendedLocation;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceProperties;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceSku;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** A Postgres Instance. */
+@Fluent
+public final class PostgresInstanceInner extends Resource {
+ /*
+ * The extendedLocation of the resource.
+ */
+ @JsonProperty(value = "extendedLocation")
+ private ExtendedLocation extendedLocation;
+
+ /*
+ * null
+ */
+ @JsonProperty(value = "properties", required = true)
+ private PostgresInstanceProperties properties;
+
+ /*
+ * Resource sku.
+ */
+ @JsonProperty(value = "sku")
+ private PostgresInstanceSku sku;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy
+ * information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the extendedLocation property: The extendedLocation of the resource.
+ *
+ * @return the extendedLocation value.
+ */
+ public ExtendedLocation extendedLocation() {
+ return this.extendedLocation;
+ }
+
+ /**
+ * Set the extendedLocation property: The extendedLocation of the resource.
+ *
+ * @param extendedLocation the extendedLocation value to set.
+ * @return the PostgresInstanceInner object itself.
+ */
+ public PostgresInstanceInner withExtendedLocation(ExtendedLocation extendedLocation) {
+ this.extendedLocation = extendedLocation;
+ return this;
+ }
+
+ /**
+ * Get the properties property: null.
+ *
+ * @return the properties value.
+ */
+ public PostgresInstanceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: null.
+ *
+ * @param properties the properties value to set.
+ * @return the PostgresInstanceInner object itself.
+ */
+ public PostgresInstanceInner withProperties(PostgresInstanceProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the sku property: Resource sku.
+ *
+ * @return the sku value.
+ */
+ public PostgresInstanceSku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: Resource sku.
+ *
+ * @param sku the sku value to set.
+ * @return the PostgresInstanceInner object itself.
+ */
+ public PostgresInstanceInner withSku(PostgresInstanceSku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public PostgresInstanceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public PostgresInstanceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (extendedLocation() != null) {
+ extendedLocation().validate();
+ }
+ if (properties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property properties in model PostgresInstanceInner"));
+ } else {
+ properties().validate();
+ }
+ if (sku() != null) {
+ sku().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(PostgresInstanceInner.class);
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlManagedInstanceInner.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlManagedInstanceInner.java
index 4a4b565009b3..36116af3e4f5 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlManagedInstanceInner.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlManagedInstanceInner.java
@@ -6,20 +6,16 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
-import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.azurearcdata.models.ExtendedLocation;
import com.azure.resourcemanager.azurearcdata.models.SqlManagedInstanceProperties;
import com.azure.resourcemanager.azurearcdata.models.SqlManagedInstanceSku;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** A SqlManagedInstance. */
@Fluent
public final class SqlManagedInstanceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlManagedInstanceInner.class);
-
/*
* null
*/
@@ -38,12 +34,6 @@ public final class SqlManagedInstanceInner extends Resource {
@JsonProperty(value = "sku")
private SqlManagedInstanceSku sku;
- /*
- * Read only system data
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/**
* Get the properties property: null.
*
@@ -104,15 +94,6 @@ public SqlManagedInstanceInner withSku(SqlManagedInstanceSku sku) {
return this;
}
- /**
- * Get the systemData property: Read only system data.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/** {@inheritDoc} */
@Override
public SqlManagedInstanceInner withLocation(String location) {
@@ -134,7 +115,7 @@ public SqlManagedInstanceInner withTags(Map tags) {
*/
public void validate() {
if (properties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property properties in model SqlManagedInstanceInner"));
@@ -148,4 +129,6 @@ public void validate() {
sku().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(SqlManagedInstanceInner.class);
}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlServerInstanceInner.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlServerInstanceInner.java
index 81543824dc99..afce48f8bdbc 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlServerInstanceInner.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlServerInstanceInner.java
@@ -7,17 +7,13 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.azurearcdata.models.SqlServerInstanceProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** A SqlServerInstance. */
@Fluent
public final class SqlServerInstanceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlServerInstanceInner.class);
-
/*
* null
*/
@@ -25,7 +21,8 @@ public final class SqlServerInstanceInner extends Resource {
private SqlServerInstanceProperties properties;
/*
- * Read only system data
+ * Azure Resource Manager metadata containing createdBy and modifiedBy
+ * information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
@@ -51,7 +48,7 @@ public SqlServerInstanceInner withProperties(SqlServerInstanceProperties propert
}
/**
- * Get the systemData property: Read only system data.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorResourceImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorResourceImpl.java
new file mode 100644
index 000000000000..b926119fa898
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorResourceImpl.java
@@ -0,0 +1,117 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurearcdata.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurearcdata.fluent.models.ActiveDirectoryConnectorResourceInner;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorProperties;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorResource;
+
+public final class ActiveDirectoryConnectorResourceImpl
+ implements ActiveDirectoryConnectorResource, ActiveDirectoryConnectorResource.Definition {
+ private ActiveDirectoryConnectorResourceInner innerObject;
+
+ private final com.azure.resourcemanager.azurearcdata.AzureArcDataManager serviceManager;
+
+ ActiveDirectoryConnectorResourceImpl(
+ ActiveDirectoryConnectorResourceInner innerObject,
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public ActiveDirectoryConnectorProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public ActiveDirectoryConnectorResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String dataControllerName;
+
+ private String activeDirectoryConnectorName;
+
+ public ActiveDirectoryConnectorResourceImpl withExistingDataController(
+ String resourceGroupName, String dataControllerName) {
+ this.resourceGroupName = resourceGroupName;
+ this.dataControllerName = dataControllerName;
+ return this;
+ }
+
+ public ActiveDirectoryConnectorResource create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActiveDirectoryConnectors()
+ .create(
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.innerModel(),
+ Context.NONE);
+ return this;
+ }
+
+ public ActiveDirectoryConnectorResource create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActiveDirectoryConnectors()
+ .create(
+ resourceGroupName, dataControllerName, activeDirectoryConnectorName, this.innerModel(), context);
+ return this;
+ }
+
+ ActiveDirectoryConnectorResourceImpl(
+ String name, com.azure.resourcemanager.azurearcdata.AzureArcDataManager serviceManager) {
+ this.innerObject = new ActiveDirectoryConnectorResourceInner();
+ this.serviceManager = serviceManager;
+ this.activeDirectoryConnectorName = name;
+ }
+
+ public ActiveDirectoryConnectorResource refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActiveDirectoryConnectors()
+ .getWithResponse(resourceGroupName, dataControllerName, activeDirectoryConnectorName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ActiveDirectoryConnectorResource refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActiveDirectoryConnectors()
+ .getWithResponse(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context)
+ .getValue();
+ return this;
+ }
+
+ public ActiveDirectoryConnectorResourceImpl withProperties(ActiveDirectoryConnectorProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorsClientImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorsClientImpl.java
new file mode 100644
index 000000000000..6d0ce57e8b8b
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorsClientImpl.java
@@ -0,0 +1,1210 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurearcdata.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.PathParam;
+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.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurearcdata.fluent.ActiveDirectoryConnectorsClient;
+import com.azure.resourcemanager.azurearcdata.fluent.models.ActiveDirectoryConnectorResourceInner;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorListResult;
+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 ActiveDirectoryConnectorsClient. */
+public final class ActiveDirectoryConnectorsClientImpl implements ActiveDirectoryConnectorsClient {
+ /** The proxy service used to perform REST calls. */
+ private final ActiveDirectoryConnectorsService service;
+
+ /** The service client containing this operation class. */
+ private final AzureArcDataManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ActiveDirectoryConnectorsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ActiveDirectoryConnectorsClientImpl(AzureArcDataManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ ActiveDirectoryConnectorsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureArcDataManagementClientActiveDirectoryConnectors to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureArcDataManageme")
+ private interface ActiveDirectoryConnectorsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ + "/dataControllers/{dataControllerName}/activeDirectoryConnectors")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataControllerName") String dataControllerName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ + "/dataControllers/{dataControllerName}/activeDirectoryConnectors/{activeDirectoryConnectorName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataControllerName") String dataControllerName,
+ @PathParam("activeDirectoryConnectorName") String activeDirectoryConnectorName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ + "/dataControllers/{dataControllerName}/activeDirectoryConnectors/{activeDirectoryConnectorName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataControllerName") String dataControllerName,
+ @PathParam("activeDirectoryConnectorName") String activeDirectoryConnectorName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ + "/dataControllers/{dataControllerName}/activeDirectoryConnectors/{activeDirectoryConnectorName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataControllerName") String dataControllerName,
+ @PathParam("activeDirectoryConnectorName") String activeDirectoryConnectorName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List the active directory connectors associated with the given data controller.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @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 list of active directory connectors along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String dataControllerName) {
+ 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 (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List the active directory connectors associated with the given data controller.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @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 list of active directory connectors along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String dataControllerName, 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 (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List the active directory connectors associated with the given data controller.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @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 list of active directory connectors as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String dataControllerName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, dataControllerName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the active directory connectors associated with the given data controller.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @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 list of active directory connectors as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String dataControllerName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, dataControllerName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the active directory connectors associated with the given data controller.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @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 list of active directory connectors as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName, String dataControllerName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, dataControllerName));
+ }
+
+ /**
+ * List the active directory connectors associated with the given data controller.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @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 list of active directory connectors as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName, String dataControllerName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, dataControllerName, context));
+ }
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 active directory connector resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource) {
+ 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 (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorResource == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorResource is required and cannot be null."));
+ } else {
+ activeDirectoryConnectorResource.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.client.getApiVersion(),
+ activeDirectoryConnectorResource,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 active directory connector resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ 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 (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorResource == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorResource is required and cannot be null."));
+ } else {
+ activeDirectoryConnectorResource.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.client.getApiVersion(),
+ activeDirectoryConnectorResource,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 {@link PollerFlux} for polling of active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ActiveDirectoryConnectorResourceInner>
+ beginCreateAsync(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource) {
+ Mono>> mono =
+ createWithResponseAsync(
+ resourceGroupName, dataControllerName, activeDirectoryConnectorName, activeDirectoryConnectorResource);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ActiveDirectoryConnectorResourceInner.class,
+ ActiveDirectoryConnectorResourceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 {@link PollerFlux} for polling of active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ActiveDirectoryConnectorResourceInner>
+ beginCreateAsync(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ activeDirectoryConnectorResource,
+ context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ActiveDirectoryConnectorResourceInner.class,
+ ActiveDirectoryConnectorResourceInner.class,
+ context);
+ }
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 {@link SyncPoller} for polling of active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ActiveDirectoryConnectorResourceInner>
+ beginCreate(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource) {
+ return beginCreateAsync(
+ resourceGroupName, dataControllerName, activeDirectoryConnectorName, activeDirectoryConnectorResource)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 {@link SyncPoller} for polling of active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ActiveDirectoryConnectorResourceInner>
+ beginCreate(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ Context context) {
+ return beginCreateAsync(
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ activeDirectoryConnectorResource,
+ context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 active directory connector resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource) {
+ return beginCreateAsync(
+ resourceGroupName, dataControllerName, activeDirectoryConnectorName, activeDirectoryConnectorResource)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 active directory connector resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ Context context) {
+ return beginCreateAsync(
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ activeDirectoryConnectorResource,
+ context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ActiveDirectoryConnectorResourceInner create(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource) {
+ return createAsync(
+ resourceGroupName, dataControllerName, activeDirectoryConnectorName, activeDirectoryConnectorResource)
+ .block();
+ }
+
+ /**
+ * Creates or replaces an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @param activeDirectoryConnectorResource desc.
+ * @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 active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ActiveDirectoryConnectorResourceInner create(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ Context context) {
+ return createAsync(
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ activeDirectoryConnectorResource,
+ context)
+ .block();
+ }
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ 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 (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, 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 (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ return beginDeleteAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName).getSyncPoller();
+ }
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ return beginDeleteAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ return beginDeleteAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ return beginDeleteAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ deleteAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName).block();
+ }
+
+ /**
+ * Deletes an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ deleteAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context).block();
+ }
+
+ /**
+ * Retrieves an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 active directory connector resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ 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 (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Retrieves an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 active directory connector resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, 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 (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorName 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,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Retrieves an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 active directory connector resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ return getWithResponseAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Retrieves an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ActiveDirectoryConnectorResourceInner get(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ return getAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName).block();
+ }
+
+ /**
+ * Retrieves an Active Directory connector resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param activeDirectoryConnectorName The name of the Active Directory connector instance.
+ * @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 active directory connector resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ return getWithResponseAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context)
+ .block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @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 list of active directory connectors along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @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 list of active directory connectors along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorsImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorsImpl.java
new file mode 100644
index 000000000000..d626c520835a
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorsImpl.java
@@ -0,0 +1,214 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurearcdata.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+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.azurearcdata.fluent.ActiveDirectoryConnectorsClient;
+import com.azure.resourcemanager.azurearcdata.fluent.models.ActiveDirectoryConnectorResourceInner;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorResource;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectors;
+
+public final class ActiveDirectoryConnectorsImpl implements ActiveDirectoryConnectors {
+ private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConnectorsImpl.class);
+
+ private final ActiveDirectoryConnectorsClient innerClient;
+
+ private final com.azure.resourcemanager.azurearcdata.AzureArcDataManager serviceManager;
+
+ public ActiveDirectoryConnectorsImpl(
+ ActiveDirectoryConnectorsClient innerClient,
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String dataControllerName) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, dataControllerName);
+ return Utils.mapPage(inner, inner1 -> new ActiveDirectoryConnectorResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ String resourceGroupName, String dataControllerName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, dataControllerName, context);
+ return Utils.mapPage(inner, inner1 -> new ActiveDirectoryConnectorResourceImpl(inner1, this.manager()));
+ }
+
+ public void delete(String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ this.serviceClient().delete(resourceGroupName, dataControllerName, activeDirectoryConnectorName);
+ }
+
+ public void delete(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ this.serviceClient().delete(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context);
+ }
+
+ public ActiveDirectoryConnectorResource get(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ ActiveDirectoryConnectorResourceInner inner =
+ this.serviceClient().get(resourceGroupName, dataControllerName, activeDirectoryConnectorName);
+ if (inner != null) {
+ return new ActiveDirectoryConnectorResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ActiveDirectoryConnectorResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ActiveDirectoryConnectorResource getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String dataControllerName = Utils.getValueFromIdByName(id, "dataControllers");
+ if (dataControllerName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'dataControllers'.", id)));
+ }
+ String activeDirectoryConnectorName = Utils.getValueFromIdByName(id, "activeDirectoryConnectors");
+ if (activeDirectoryConnectorName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConnectors'.",
+ id)));
+ }
+ return this
+ .getWithResponse(resourceGroupName, dataControllerName, activeDirectoryConnectorName, Context.NONE)
+ .getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String dataControllerName = Utils.getValueFromIdByName(id, "dataControllers");
+ if (dataControllerName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'dataControllers'.", id)));
+ }
+ String activeDirectoryConnectorName = Utils.getValueFromIdByName(id, "activeDirectoryConnectors");
+ if (activeDirectoryConnectorName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConnectors'.",
+ id)));
+ }
+ return this.getWithResponse(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String dataControllerName = Utils.getValueFromIdByName(id, "dataControllers");
+ if (dataControllerName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'dataControllers'.", id)));
+ }
+ String activeDirectoryConnectorName = Utils.getValueFromIdByName(id, "activeDirectoryConnectors");
+ if (activeDirectoryConnectorName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConnectors'.",
+ id)));
+ }
+ this.delete(resourceGroupName, dataControllerName, activeDirectoryConnectorName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String dataControllerName = Utils.getValueFromIdByName(id, "dataControllers");
+ if (dataControllerName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'dataControllers'.", id)));
+ }
+ String activeDirectoryConnectorName = Utils.getValueFromIdByName(id, "activeDirectoryConnectors");
+ if (activeDirectoryConnectorName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConnectors'.",
+ id)));
+ }
+ this.delete(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context);
+ }
+
+ private ActiveDirectoryConnectorsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager() {
+ return this.serviceManager;
+ }
+
+ public ActiveDirectoryConnectorResourceImpl define(String name) {
+ return new ActiveDirectoryConnectorResourceImpl(name, this.manager());
+ }
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientBuilder.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientBuilder.java
index 142dec68b8ef..8d63eda2415d 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientBuilder.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -67,34 +66,34 @@ public AzureArcDataManagementClientBuilder environment(AzureEnvironment environm
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the AzureArcDataManagementClientBuilder.
*/
- public AzureArcDataManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public AzureArcDataManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the AzureArcDataManagementClientBuilder.
*/
- public AzureArcDataManagementClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public AzureArcDataManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -120,21 +119,21 @@ public AzureArcDataManagementClientBuilder serializerAdapter(SerializerAdapter s
* @return an instance of AzureArcDataManagementClientImpl.
*/
public AzureArcDataManagementClientImpl buildClient() {
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (endpoint == null) {
this.endpoint = "https://management.azure.com";
}
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientImpl.java
index 257e747d16b1..ffd07d49ca74 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientImpl.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientImpl.java
@@ -21,9 +21,11 @@
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.azurearcdata.fluent.ActiveDirectoryConnectorsClient;
import com.azure.resourcemanager.azurearcdata.fluent.AzureArcDataManagementClient;
import com.azure.resourcemanager.azurearcdata.fluent.DataControllersClient;
import com.azure.resourcemanager.azurearcdata.fluent.OperationsClient;
+import com.azure.resourcemanager.azurearcdata.fluent.PostgresInstancesClient;
import com.azure.resourcemanager.azurearcdata.fluent.SqlManagedInstancesClient;
import com.azure.resourcemanager.azurearcdata.fluent.SqlServerInstancesClient;
import java.io.IOException;
@@ -39,8 +41,6 @@
/** Initializes a new instance of the AzureArcDataManagementClientImpl type. */
@ServiceClient(builder = AzureArcDataManagementClientBuilder.class)
public final class AzureArcDataManagementClientImpl implements AzureArcDataManagementClient {
- private final ClientLogger logger = new ClientLogger(AzureArcDataManagementClientImpl.class);
-
/** The ID of the Azure subscription. */
private final String subscriptionId;
@@ -161,6 +161,30 @@ public DataControllersClient getDataControllers() {
return this.dataControllers;
}
+ /** The ActiveDirectoryConnectorsClient object to access its operations. */
+ private final ActiveDirectoryConnectorsClient activeDirectoryConnectors;
+
+ /**
+ * Gets the ActiveDirectoryConnectorsClient object to access its operations.
+ *
+ * @return the ActiveDirectoryConnectorsClient object.
+ */
+ public ActiveDirectoryConnectorsClient getActiveDirectoryConnectors() {
+ return this.activeDirectoryConnectors;
+ }
+
+ /** The PostgresInstancesClient object to access its operations. */
+ private final PostgresInstancesClient postgresInstances;
+
+ /**
+ * Gets the PostgresInstancesClient object to access its operations.
+ *
+ * @return the PostgresInstancesClient object.
+ */
+ public PostgresInstancesClient getPostgresInstances() {
+ return this.postgresInstances;
+ }
+
/**
* Initializes an instance of AzureArcDataManagementClient client.
*
@@ -183,11 +207,13 @@ public DataControllersClient getDataControllers() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-08-01";
+ this.apiVersion = "2022-03-01-preview";
this.operations = new OperationsClientImpl(this);
this.sqlManagedInstances = new SqlManagedInstancesClientImpl(this);
this.sqlServerInstances = new SqlServerInstancesClientImpl(this);
this.dataControllers = new DataControllersClientImpl(this);
+ this.activeDirectoryConnectors = new ActiveDirectoryConnectorsClientImpl(this);
+ this.postgresInstances = new PostgresInstancesClientImpl(this);
}
/**
@@ -273,7 +299,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
managementError = null;
}
} catch (IOException | RuntimeException ioe) {
- logger.logThrowableAsWarning(ioe);
+ LOGGER.logThrowableAsWarning(ioe);
}
}
} else {
@@ -332,4 +358,6 @@ public Mono getBodyAsString(Charset charset) {
return Mono.just(new String(responseBody, charset));
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(AzureArcDataManagementClientImpl.class);
}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/DataControllerResourceImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/DataControllerResourceImpl.java
index 03d9e156dc60..bd6e995b8da9 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/DataControllerResourceImpl.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/DataControllerResourceImpl.java
@@ -176,8 +176,13 @@ public DataControllerResourceImpl withRegion(String location) {
}
public DataControllerResourceImpl withProperties(DataControllerProperties properties) {
- this.innerModel().withProperties(properties);
- return this;
+ if (isInCreateMode()) {
+ this.innerModel().withProperties(properties);
+ return this;
+ } else {
+ this.updateDataControllerResource.withProperties(properties);
+ return this;
+ }
}
public DataControllerResourceImpl withTags(Map tags) {
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/DataControllersClientImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/DataControllersClientImpl.java
index 05c80f047beb..816b2e9cc892 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/DataControllersClientImpl.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/DataControllersClientImpl.java
@@ -30,7 +30,6 @@
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.azurearcdata.fluent.DataControllersClient;
@@ -43,8 +42,6 @@
/** An instance of this class provides access to all the operations defined in DataControllersClient. */
public final class DataControllersClientImpl implements DataControllersClient {
- private final ClientLogger logger = new ClientLogger(DataControllersClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final DataControllersService service;
@@ -144,7 +141,7 @@ Mono> getByResourceGroup(
@Patch(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ "/dataControllers/{dataControllerName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> patchDataController(
@HostParam("$host") String endpoint,
@@ -182,7 +179,7 @@ Mono> listInGroupNext(
*
* @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 response.
+ * @return a list of data controllers along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -228,7 +225,7 @@ private Mono> listSinglePageAsync() {
* @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 response.
+ * @return a list of data controllers along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -269,7 +266,7 @@ private Mono> listSinglePageAsync(Con
*
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -284,7 +281,7 @@ private PagedFlux listAsync() {
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -297,7 +294,7 @@ private PagedFlux listAsync(Context context) {
*
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -311,7 +308,7 @@ public PagedIterable list() {
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -325,7 +322,7 @@ public PagedIterable list(Context context) {
* @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 response.
+ * @return a list of data controllers along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -378,7 +375,7 @@ private Mono> listByResourceGroupSing
* @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 response.
+ * @return a list of data controllers along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -427,7 +424,7 @@ private Mono> listByResourceGroupSing
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
@@ -444,7 +441,7 @@ private PagedFlux listByResourceGroupAsync(String r
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
@@ -460,7 +457,7 @@ private PagedFlux listByResourceGroupAsync(String r
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
@@ -475,7 +472,7 @@ public PagedIterable listByResourceGroup(String res
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
@@ -486,12 +483,12 @@ public PagedIterable listByResourceGroup(String res
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @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 data controller resource.
+ * @return data controller resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> putDataControllerWithResponseAsync(
@@ -544,13 +541,13 @@ private Mono>> putDataControllerWithResponseAsync(
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @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 data controller resource.
+ * @return data controller resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> putDataControllerWithResponseAsync(
@@ -603,14 +600,14 @@ private Mono>> putDataControllerWithResponseAsync(
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @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 data controller resource.
+ * @return the {@link PollerFlux} for polling of data controller resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DataControllerResourceInner>
beginPutDataControllerAsync(
String resourceGroupName, String dataControllerName, DataControllerResourceInner dataControllerResource) {
@@ -623,22 +620,22 @@ private Mono>> putDataControllerWithResponseAsync(
this.client.getHttpPipeline(),
DataControllerResourceInner.class,
DataControllerResourceInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @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 data controller resource.
+ * @return the {@link PollerFlux} for polling of data controller resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DataControllerResourceInner>
beginPutDataControllerAsync(
String resourceGroupName,
@@ -662,14 +659,14 @@ private Mono>> putDataControllerWithResponseAsync(
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @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 data controller resource.
+ * @return the {@link SyncPoller} for polling of data controller resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DataControllerResourceInner> beginPutDataController(
String resourceGroupName, String dataControllerName, DataControllerResourceInner dataControllerResource) {
return beginPutDataControllerAsync(resourceGroupName, dataControllerName, dataControllerResource)
@@ -680,15 +677,15 @@ public SyncPoller, DataControllerResourc
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @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 data controller resource.
+ * @return the {@link SyncPoller} for polling of data controller resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DataControllerResourceInner> beginPutDataController(
String resourceGroupName,
String dataControllerName,
@@ -702,12 +699,12 @@ public SyncPoller, DataControllerResourc
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @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 data controller resource.
+ * @return data controller resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono putDataControllerAsync(
@@ -721,13 +718,13 @@ private Mono putDataControllerAsync(
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @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 data controller resource.
+ * @return data controller resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono putDataControllerAsync(
@@ -744,7 +741,7 @@ private Mono putDataControllerAsync(
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -761,7 +758,7 @@ public DataControllerResourceInner putDataController(
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -782,11 +779,11 @@ public DataControllerResourceInner putDataController(
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -831,12 +828,12 @@ private Mono>> deleteWithResponseAsync(
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -878,32 +875,33 @@ private Mono>> deleteWithResponseAsync(
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dataControllerName) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, dataControllerName);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String dataControllerName, Context context) {
context = this.client.mergeContext(context);
@@ -917,13 +915,13 @@ private PollerFlux, Void> beginDeleteAsync(
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String dataControllerName) {
return beginDeleteAsync(resourceGroupName, dataControllerName).getSyncPoller();
}
@@ -932,14 +930,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String dataControllerName, Context context) {
return beginDeleteAsync(resourceGroupName, dataControllerName, context).getSyncPoller();
@@ -949,11 +947,11 @@ public SyncPoller, Void> beginDelete(
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String dataControllerName) {
@@ -966,12 +964,12 @@ private Mono deleteAsync(String resourceGroupName, String dataControllerNa
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String dataControllerName, Context context) {
@@ -984,7 +982,7 @@ private Mono deleteAsync(String resourceGroupName, String dataControllerNa
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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.
@@ -998,7 +996,7 @@ public void delete(String resourceGroupName, String dataControllerName) {
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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.
@@ -1013,11 +1011,11 @@ public void delete(String resourceGroupName, String dataControllerName, Context
* Retrieves a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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 data controller resource.
+ * @return data controller resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -1062,12 +1060,12 @@ private Mono> getByResourceGroupWithRespon
* Retrieves a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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 data controller resource.
+ * @return data controller resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -1109,11 +1107,11 @@ private Mono> getByResourceGroupWithRespon
* Retrieves a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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 data controller resource.
+ * @return data controller resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(
@@ -1133,7 +1131,7 @@ private Mono getByResourceGroupAsync(
* Retrieves a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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.
@@ -1148,12 +1146,12 @@ public DataControllerResourceInner getByResourceGroup(String resourceGroupName,
* Retrieves a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @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 data controller resource.
+ * @return data controller resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByResourceGroupWithResponse(
@@ -1165,12 +1163,12 @@ public Response getByResourceGroupWithResponse(
* Updates a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource The update data controller resource.
* @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 data controller resource.
+ * @return data controller resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> patchDataControllerWithResponseAsync(
@@ -1223,13 +1221,13 @@ private Mono> patchDataControllerWithRespo
* Updates a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource The update data controller resource.
* @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 data controller resource.
+ * @return data controller resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> patchDataControllerWithResponseAsync(
@@ -1282,12 +1280,12 @@ private Mono> patchDataControllerWithRespo
* Updates a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource The update data controller resource.
* @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 data controller resource.
+ * @return data controller resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono patchDataControllerAsync(
@@ -1307,7 +1305,7 @@ private Mono patchDataControllerAsync(
* Updates a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource The update data controller resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -1324,13 +1322,13 @@ public DataControllerResourceInner patchDataController(
* Updates a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource The update data controller resource.
* @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 data controller resource.
+ * @return data controller resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response patchDataControllerWithResponse(
@@ -1350,7 +1348,7 @@ public Response patchDataControllerWithResponse(
* @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 response.
+ * @return a list of data controllers along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listInSubscriptionNextSinglePageAsync(String nextLink) {
@@ -1387,7 +1385,7 @@ private Mono> listInSubscriptionNextS
* @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 response.
+ * @return a list of data controllers along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listInSubscriptionNextSinglePageAsync(
@@ -1423,7 +1421,7 @@ private Mono> listInSubscriptionNextS
* @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 response.
+ * @return a list of data controllers along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listInGroupNextSinglePageAsync(String nextLink) {
@@ -1459,7 +1457,7 @@ private Mono> listInGroupNextSinglePa
* @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 response.
+ * @return a list of data controllers along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listInGroupNextSinglePageAsync(
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/DataControllersImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/DataControllersImpl.java
index b184f2339c9c..0632ec747297 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/DataControllersImpl.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/DataControllersImpl.java
@@ -13,10 +13,9 @@
import com.azure.resourcemanager.azurearcdata.fluent.models.DataControllerResourceInner;
import com.azure.resourcemanager.azurearcdata.models.DataControllerResource;
import com.azure.resourcemanager.azurearcdata.models.DataControllers;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class DataControllersImpl implements DataControllers {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DataControllersImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(DataControllersImpl.class);
private final DataControllersClient innerClient;
@@ -85,7 +84,7 @@ public Response getByResourceGroupWithResponse(
public DataControllerResource getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -93,7 +92,7 @@ public DataControllerResource getById(String id) {
}
String dataControllerName = Utils.getValueFromIdByName(id, "dataControllers");
if (dataControllerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -105,7 +104,7 @@ public DataControllerResource getById(String id) {
public Response getByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -113,7 +112,7 @@ public Response getByIdWithResponse(String id, Context c
}
String dataControllerName = Utils.getValueFromIdByName(id, "dataControllers");
if (dataControllerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -125,7 +124,7 @@ public Response getByIdWithResponse(String id, Context c
public void deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -133,7 +132,7 @@ public void deleteById(String id) {
}
String dataControllerName = Utils.getValueFromIdByName(id, "dataControllers");
if (dataControllerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -145,7 +144,7 @@ public void deleteById(String id) {
public void deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -153,7 +152,7 @@ public void deleteByIdWithResponse(String id, Context context) {
}
String dataControllerName = Utils.getValueFromIdByName(id, "dataControllers");
if (dataControllerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/OperationsClientImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/OperationsClientImpl.java
index 44a32405b17e..677deca7b252 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/OperationsClientImpl.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/OperationsClientImpl.java
@@ -25,7 +25,6 @@
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.azurearcdata.fluent.OperationsClient;
import com.azure.resourcemanager.azurearcdata.fluent.models.OperationInner;
import com.azure.resourcemanager.azurearcdata.models.OperationListResult;
@@ -33,8 +32,6 @@
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public final class OperationsClientImpl implements OperationsClient {
- private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final OperationsService service;
@@ -85,7 +82,8 @@ Mono> listNext(
*
* @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 result of the request to list Azure Data Services on Azure Arc operations.
+ * @return result of the request to list Azure Data Services on Azure Arc operations along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -118,7 +116,8 @@ private Mono> listSinglePageAsync() {
* @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 result of the request to list Azure Data Services on Azure Arc operations.
+ * @return result of the request to list Azure Data Services on Azure Arc operations along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -148,7 +147,8 @@ private Mono> listSinglePageAsync(Context context)
*
* @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 result of the request to list Azure Data Services on Azure Arc operations.
+ * @return result of the request to list Azure Data Services on Azure Arc operations as paginated response with
+ * {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -162,7 +162,8 @@ private PagedFlux listAsync() {
* @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 result of the request to list Azure Data Services on Azure Arc operations.
+ * @return result of the request to list Azure Data Services on Azure Arc operations as paginated response with
+ * {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -175,7 +176,8 @@ private PagedFlux listAsync(Context context) {
*
* @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 result of the request to list Azure Data Services on Azure Arc operations.
+ * @return result of the request to list Azure Data Services on Azure Arc operations as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -189,7 +191,8 @@ public PagedIterable list() {
* @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 result of the request to list Azure Data Services on Azure Arc operations.
+ * @return result of the request to list Azure Data Services on Azure Arc operations as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -203,7 +206,8 @@ public PagedIterable list(Context context) {
* @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 result of the request to list Azure Data Services on Azure Arc operations.
+ * @return result of the request to list Azure Data Services on Azure Arc operations along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -239,7 +243,8 @@ private Mono> listNextSinglePageAsync(String nextL
* @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 result of the request to list Azure Data Services on Azure Arc operations.
+ * @return result of the request to list Azure Data Services on Azure Arc operations along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/OperationsImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/OperationsImpl.java
index 6fcceee329a7..c37fed4b74e2 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/OperationsImpl.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/OperationsImpl.java
@@ -11,10 +11,9 @@
import com.azure.resourcemanager.azurearcdata.fluent.models.OperationInner;
import com.azure.resourcemanager.azurearcdata.models.Operation;
import com.azure.resourcemanager.azurearcdata.models.Operations;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class OperationsImpl implements Operations {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class);
private final OperationsClient innerClient;
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/PostgresInstanceImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/PostgresInstanceImpl.java
new file mode 100644
index 000000000000..a2acd77de17f
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/PostgresInstanceImpl.java
@@ -0,0 +1,213 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurearcdata.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurearcdata.fluent.models.PostgresInstanceInner;
+import com.azure.resourcemanager.azurearcdata.models.ExtendedLocation;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstance;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceProperties;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceSku;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceUpdate;
+import java.util.Collections;
+import java.util.Map;
+
+public final class PostgresInstanceImpl
+ implements PostgresInstance, PostgresInstance.Definition, PostgresInstance.Update {
+ private PostgresInstanceInner innerObject;
+
+ private final com.azure.resourcemanager.azurearcdata.AzureArcDataManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public ExtendedLocation extendedLocation() {
+ return this.innerModel().extendedLocation();
+ }
+
+ public PostgresInstanceProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public PostgresInstanceSku sku() {
+ return this.innerModel().sku();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public PostgresInstanceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String postgresInstanceName;
+
+ private PostgresInstanceUpdate updateParameters;
+
+ public PostgresInstanceImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public PostgresInstance create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPostgresInstances()
+ .create(resourceGroupName, postgresInstanceName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public PostgresInstance create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPostgresInstances()
+ .create(resourceGroupName, postgresInstanceName, this.innerModel(), context);
+ return this;
+ }
+
+ PostgresInstanceImpl(String name, com.azure.resourcemanager.azurearcdata.AzureArcDataManager serviceManager) {
+ this.innerObject = new PostgresInstanceInner();
+ this.serviceManager = serviceManager;
+ this.postgresInstanceName = name;
+ }
+
+ public PostgresInstanceImpl update() {
+ this.updateParameters = new PostgresInstanceUpdate();
+ return this;
+ }
+
+ public PostgresInstance apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPostgresInstances()
+ .updateWithResponse(resourceGroupName, postgresInstanceName, updateParameters, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PostgresInstance apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPostgresInstances()
+ .updateWithResponse(resourceGroupName, postgresInstanceName, updateParameters, context)
+ .getValue();
+ return this;
+ }
+
+ PostgresInstanceImpl(
+ PostgresInstanceInner innerObject, com.azure.resourcemanager.azurearcdata.AzureArcDataManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.postgresInstanceName = Utils.getValueFromIdByName(innerObject.id(), "postgresInstances");
+ }
+
+ public PostgresInstance refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPostgresInstances()
+ .getByResourceGroupWithResponse(resourceGroupName, postgresInstanceName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PostgresInstance refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPostgresInstances()
+ .getByResourceGroupWithResponse(resourceGroupName, postgresInstanceName, context)
+ .getValue();
+ return this;
+ }
+
+ public PostgresInstanceImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public PostgresInstanceImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public PostgresInstanceImpl withProperties(PostgresInstanceProperties properties) {
+ if (isInCreateMode()) {
+ this.innerModel().withProperties(properties);
+ return this;
+ } else {
+ this.updateParameters.withProperties(properties);
+ return this;
+ }
+ }
+
+ public PostgresInstanceImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateParameters.withTags(tags);
+ return this;
+ }
+ }
+
+ public PostgresInstanceImpl withExtendedLocation(ExtendedLocation extendedLocation) {
+ this.innerModel().withExtendedLocation(extendedLocation);
+ return this;
+ }
+
+ public PostgresInstanceImpl withSku(PostgresInstanceSku sku) {
+ this.innerModel().withSku(sku);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/PostgresInstancesClientImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/PostgresInstancesClientImpl.java
new file mode 100644
index 000000000000..8699bbe58e22
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/PostgresInstancesClientImpl.java
@@ -0,0 +1,1448 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurearcdata.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.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.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurearcdata.fluent.PostgresInstancesClient;
+import com.azure.resourcemanager.azurearcdata.fluent.models.PostgresInstanceInner;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceListResult;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceUpdate;
+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 PostgresInstancesClient. */
+public final class PostgresInstancesClientImpl implements PostgresInstancesClient {
+ /** The proxy service used to perform REST calls. */
+ private final PostgresInstancesService service;
+
+ /** The service client containing this operation class. */
+ private final AzureArcDataManagementClientImpl client;
+
+ /**
+ * Initializes an instance of PostgresInstancesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PostgresInstancesClientImpl(AzureArcDataManagementClientImpl client) {
+ this.service =
+ RestProxy.create(PostgresInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureArcDataManagementClientPostgresInstances to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureArcDataManageme")
+ private interface PostgresInstancesService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureArcData/postgresInstances")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ + "/postgresInstances")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ + "/postgresInstances/{postgresInstanceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("postgresInstanceName") String postgresInstanceName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ + "/postgresInstances/{postgresInstanceName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("postgresInstanceName") String postgresInstanceName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") PostgresInstanceInner resource,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ + "/postgresInstances/{postgresInstanceName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("postgresInstanceName") String postgresInstanceName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ + "/postgresInstances/{postgresInstanceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("postgresInstanceName") String postgresInstanceName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") PostgresInstanceUpdate parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List postgres Instance resources in the subscription.
+ *
+ * @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 list of PostgresInstance along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ 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."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List postgres Instance resources in the subscription.
+ *
+ * @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 list of PostgresInstance along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(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."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List postgres Instance resources in the subscription.
+ *
+ * @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 list of PostgresInstance as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List postgres Instance resources in the subscription.
+ *
+ * @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 list of PostgresInstance as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux