scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ 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.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval
+ = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of Network Analytics service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Network Analytics service API instance.
+ */
+ public NetworkAnalyticsManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.networkanalytics")
+ .append("/").append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ 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.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0])).build();
+ return new NetworkAnalyticsManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of DataProducts. It manages DataProduct.
+ *
+ * @return Resource collection API of DataProducts.
+ */
+ public DataProducts dataProducts() {
+ if (this.dataProducts == null) {
+ this.dataProducts = new DataProductsImpl(clientObject.getDataProducts(), this);
+ }
+ return dataProducts;
+ }
+
+ /**
+ * Gets the resource collection API of DataProductsCatalogs.
+ *
+ * @return Resource collection API of DataProductsCatalogs.
+ */
+ public DataProductsCatalogs dataProductsCatalogs() {
+ if (this.dataProductsCatalogs == null) {
+ this.dataProductsCatalogs = new DataProductsCatalogsImpl(clientObject.getDataProductsCatalogs(), this);
+ }
+ return dataProductsCatalogs;
+ }
+
+ /**
+ * Gets the resource collection API of DataTypes. It manages DataType.
+ *
+ * @return Resource collection API of DataTypes.
+ */
+ public DataTypes dataTypes() {
+ if (this.dataTypes == null) {
+ this.dataTypes = new DataTypesImpl(clientObject.getDataTypes(), this);
+ }
+ return dataTypes;
+ }
+
+ /**
+ * Gets wrapped service client NetworkAnalyticsMgmtClient providing direct access to the underlying auto-generated
+ * API implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client NetworkAnalyticsMgmtClient.
+ */
+ public NetworkAnalyticsMgmtClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsCatalogsClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsCatalogsClient.java
new file mode 100644
index 000000000000..85fbcd14fac2
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsCatalogsClient.java
@@ -0,0 +1,89 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.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.util.Context;
+import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in DataProductsCatalogsClient.
+ */
+public interface DataProductsCatalogsClient {
+ /**
+ * List data catalog by 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 the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List data catalog by 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 the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * List data catalog by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List data catalog by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 data catalog resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, Context context);
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 data catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataProductsCatalogInner getByResourceGroup(String resourceGroupName);
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsClient.java
new file mode 100644
index 000000000000..36d0fea6c0e4
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsClient.java
@@ -0,0 +1,425 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.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.networkanalytics.fluent.models.AccountSasTokenInner;
+import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductInner;
+import com.azure.resourcemanager.networkanalytics.fluent.models.ListRoleAssignmentsInner;
+import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner;
+import com.azure.resourcemanager.networkanalytics.models.AccountSas;
+import com.azure.resourcemanager.networkanalytics.models.DataProductUpdate;
+import com.azure.resourcemanager.networkanalytics.models.KeyVaultInfo;
+import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentCommonProperties;
+
+/**
+ * An instance of this class provides access to all the operations defined in DataProductsClient.
+ */
+public interface DataProductsClient {
+ /**
+ * List data products by 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 the response of a DataProduct list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List data products by 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 the response of a DataProduct list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * List data products by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a DataProduct list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List data products by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a DataProduct list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Retrieve data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 data product resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String dataProductName,
+ Context context);
+
+ /**
+ * Retrieve data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataProductInner getByResourceGroup(String resourceGroupName, String dataProductName);
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataProductInner> beginCreate(String resourceGroupName,
+ String dataProductName, DataProductInner resource);
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataProductInner> beginCreate(String resourceGroupName,
+ String dataProductName, DataProductInner resource, Context context);
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataProductInner create(String resourceGroupName, String dataProductName, DataProductInner resource);
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataProductInner create(String resourceGroupName, String dataProductName, DataProductInner resource,
+ Context context);
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be 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 the {@link SyncPoller} for polling of the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataProductInner> beginUpdate(String resourceGroupName,
+ String dataProductName, DataProductUpdate properties);
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be 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 the {@link SyncPoller} for polling of the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataProductInner> beginUpdate(String resourceGroupName,
+ String dataProductName, DataProductUpdate properties, Context context);
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be 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 the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataProductInner update(String resourceGroupName, String dataProductName, DataProductUpdate properties);
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be 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 the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataProductInner update(String resourceGroupName, String dataProductName, DataProductUpdate properties,
+ Context context);
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName);
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName, Context context);
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName);
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName, Context context);
+
+ /**
+ * Assign role to the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details for role assignment response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response addUserRoleWithResponse(String resourceGroupName, String dataProductName,
+ RoleAssignmentCommonProperties body, Context context);
+
+ /**
+ * Assign role to the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details for role assignment response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RoleAssignmentDetailInner addUserRole(String resourceGroupName, String dataProductName,
+ RoleAssignmentCommonProperties body);
+
+ /**
+ * Generate sas token for storage account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details of storage account sas token along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response generateStorageAccountSasTokenWithResponse(String resourceGroupName,
+ String dataProductName, AccountSas body, Context context);
+
+ /**
+ * Generate sas token for storage account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details of storage account sas token.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AccountSasTokenInner generateStorageAccountSasToken(String resourceGroupName, String dataProductName,
+ AccountSas body);
+
+ /**
+ * List user roles associated with the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 list role assignments along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listRolesAssignmentsWithResponse(String resourceGroupName,
+ String dataProductName, Object body, Context context);
+
+ /**
+ * List user roles associated with the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 list role assignments.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ListRoleAssignmentsInner listRolesAssignments(String resourceGroupName, String dataProductName, Object body);
+
+ /**
+ * Remove role from the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response removeUserRoleWithResponse(String resourceGroupName, String dataProductName,
+ RoleAssignmentDetailInner body, Context context);
+
+ /**
+ * Remove role from the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 removeUserRole(String resourceGroupName, String dataProductName, RoleAssignmentDetailInner body);
+
+ /**
+ * Initiate key rotation on Data Product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response rotateKeyWithResponse(String resourceGroupName, String dataProductName, KeyVaultInfo body,
+ Context context);
+
+ /**
+ * Initiate key rotation on Data Product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 rotateKey(String resourceGroupName, String dataProductName, KeyVaultInfo body);
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataTypesClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataTypesClient.java
new file mode 100644
index 000000000000..11b92d53bb2d
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataTypesClient.java
@@ -0,0 +1,364 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.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.networkanalytics.fluent.models.ContainerSasTokenInner;
+import com.azure.resourcemanager.networkanalytics.fluent.models.DataTypeInner;
+import com.azure.resourcemanager.networkanalytics.models.ContainerSaS;
+import com.azure.resourcemanager.networkanalytics.models.DataTypeUpdate;
+
+/**
+ * An instance of this class provides access to all the operations defined in DataTypesClient.
+ */
+public interface DataTypesClient {
+ /**
+ * List data type by parent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 of a DataType list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDataProduct(String resourceGroupName, String dataProductName);
+
+ /**
+ * List data type by parent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 response of a DataType list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDataProduct(String resourceGroupName, String dataProductName, Context context);
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @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 data type resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String dataProductName, String dataTypeName,
+ Context context);
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @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 data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataTypeInner get(String resourceGroupName, String dataProductName, String dataTypeName);
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataTypeInner> beginCreate(String resourceGroupName, String dataProductName,
+ String dataTypeName, DataTypeInner resource);
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataTypeInner> beginCreate(String resourceGroupName, String dataProductName,
+ String dataTypeName, DataTypeInner resource, Context context);
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataTypeInner create(String resourceGroupName, String dataProductName, String dataTypeName, DataTypeInner resource);
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataTypeInner create(String resourceGroupName, String dataProductName, String dataTypeName, DataTypeInner resource,
+ Context context);
+
+ /**
+ * Update data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param properties The resource properties to be 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 the {@link SyncPoller} for polling of the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataTypeInner> beginUpdate(String resourceGroupName, String dataProductName,
+ String dataTypeName, DataTypeUpdate properties);
+
+ /**
+ * Update data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param properties The resource properties to be 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 the {@link SyncPoller} for polling of the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataTypeInner> beginUpdate(String resourceGroupName, String dataProductName,
+ String dataTypeName, DataTypeUpdate properties, Context context);
+
+ /**
+ * Update data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param properties The resource properties to be 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 the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataTypeInner update(String resourceGroupName, String dataProductName, String dataTypeName,
+ DataTypeUpdate properties);
+
+ /**
+ * Update data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param properties The resource properties to be 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 the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataTypeInner update(String resourceGroupName, String dataProductName, String dataTypeName,
+ DataTypeUpdate properties, Context context);
+
+ /**
+ * Delete data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @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 dataProductName,
+ String dataTypeName);
+
+ /**
+ * Delete data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @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 dataProductName,
+ String dataTypeName, Context context);
+
+ /**
+ * Delete data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @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 dataProductName, String dataTypeName);
+
+ /**
+ * Delete data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @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 dataProductName, String dataTypeName, Context context);
+
+ /**
+ * Delete data for data type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param body The content of the action request.
+ * @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> beginDeleteData(String resourceGroupName, String dataProductName,
+ String dataTypeName, Object body);
+
+ /**
+ * Delete data for data type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param body The content of the action request.
+ * @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> beginDeleteData(String resourceGroupName, String dataProductName,
+ String dataTypeName, Object body, Context context);
+
+ /**
+ * Delete data for data type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param body The content of the action request.
+ * @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 deleteData(String resourceGroupName, String dataProductName, String dataTypeName, Object body);
+
+ /**
+ * Delete data for data type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param body The content of the action request.
+ * @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 deleteData(String resourceGroupName, String dataProductName, String dataTypeName, Object body,
+ Context context);
+
+ /**
+ * Generate sas token for storage container.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param body The content of the action request.
+ * @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 details of storage container account sas token along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response generateStorageContainerSasTokenWithResponse(String resourceGroupName,
+ String dataProductName, String dataTypeName, ContainerSaS body, Context context);
+
+ /**
+ * Generate sas token for storage container.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param body The content of the action request.
+ * @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 details of storage container account sas token.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ContainerSasTokenInner generateStorageContainerSasToken(String resourceGroupName, String dataProductName,
+ String dataTypeName, ContainerSaS body);
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/NetworkAnalyticsMgmtClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/NetworkAnalyticsMgmtClient.java
new file mode 100644
index 000000000000..4346afd2cfc2
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/NetworkAnalyticsMgmtClient.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for NetworkAnalyticsMgmtClient class.
+ */
+public interface NetworkAnalyticsMgmtClient {
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the DataProductsClient object to access its operations.
+ *
+ * @return the DataProductsClient object.
+ */
+ DataProductsClient getDataProducts();
+
+ /**
+ * Gets the DataProductsCatalogsClient object to access its operations.
+ *
+ * @return the DataProductsCatalogsClient object.
+ */
+ DataProductsCatalogsClient getDataProductsCatalogs();
+
+ /**
+ * Gets the DataTypesClient object to access its operations.
+ *
+ * @return the DataTypesClient object.
+ */
+ DataTypesClient getDataTypes();
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/OperationsClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/OperationsClient.java
new file mode 100644
index 000000000000..16e81341f5da
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/OperationsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
+public interface OperationsClient {
+ /**
+ * List the operations for the provider.
+ *
+ * @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 REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List the operations for the provider.
+ *
+ * @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 REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/AccountSasTokenInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/AccountSasTokenInner.java
new file mode 100644
index 000000000000..0f1de881cd87
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/AccountSasTokenInner.java
@@ -0,0 +1,61 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Details of storage account sas token .
+ */
+@Fluent
+public final class AccountSasTokenInner {
+ /*
+ * Field to specify storage account sas token.
+ */
+ @JsonProperty(value = "storageAccountSasToken")
+ private String storageAccountSasToken;
+
+ /**
+ * Creates an instance of AccountSasTokenInner class.
+ */
+ public AccountSasTokenInner() {
+ }
+
+ /**
+ * Get the storageAccountSasToken property: Field to specify storage account sas token.
+ *
+ * @return the storageAccountSasToken value.
+ */
+ public String storageAccountSasToken() {
+ return this.storageAccountSasToken;
+ }
+
+ /**
+ * Set the storageAccountSasToken property: Field to specify storage account sas token.
+ *
+ * @param storageAccountSasToken the storageAccountSasToken value to set.
+ * @return the AccountSasTokenInner object itself.
+ */
+ public AccountSasTokenInner withStorageAccountSasToken(String storageAccountSasToken) {
+ this.storageAccountSasToken = storageAccountSasToken;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (storageAccountSasToken() == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ "Missing required property storageAccountSasToken in model AccountSasTokenInner"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(AccountSasTokenInner.class);
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ContainerSasTokenInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ContainerSasTokenInner.java
new file mode 100644
index 000000000000..2605e2bdeb8f
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ContainerSasTokenInner.java
@@ -0,0 +1,61 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Details of storage container account sas token .
+ */
+@Fluent
+public final class ContainerSasTokenInner {
+ /*
+ * Field to specify storage container sas token.
+ */
+ @JsonProperty(value = "storageContainerSasToken")
+ private String storageContainerSasToken;
+
+ /**
+ * Creates an instance of ContainerSasTokenInner class.
+ */
+ public ContainerSasTokenInner() {
+ }
+
+ /**
+ * Get the storageContainerSasToken property: Field to specify storage container sas token.
+ *
+ * @return the storageContainerSasToken value.
+ */
+ public String storageContainerSasToken() {
+ return this.storageContainerSasToken;
+ }
+
+ /**
+ * Set the storageContainerSasToken property: Field to specify storage container sas token.
+ *
+ * @param storageContainerSasToken the storageContainerSasToken value to set.
+ * @return the ContainerSasTokenInner object itself.
+ */
+ public ContainerSasTokenInner withStorageContainerSasToken(String storageContainerSasToken) {
+ this.storageContainerSasToken = storageContainerSasToken;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (storageContainerSasToken() == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ "Missing required property storageContainerSasToken in model ContainerSasTokenInner"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ContainerSasTokenInner.class);
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductInner.java
new file mode 100644
index 000000000000..638b2cd83b66
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductInner.java
@@ -0,0 +1,124 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.networkanalytics.models.DataProductProperties;
+import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentity;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/**
+ * The data product resource.
+ */
+@Fluent
+public final class DataProductInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private DataProductProperties properties;
+
+ /*
+ * The managed service identities assigned to this resource.
+ */
+ @JsonProperty(value = "identity")
+ private ManagedServiceIdentity identity;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Creates an instance of DataProductInner class.
+ */
+ public DataProductInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public DataProductProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the DataProductInner object itself.
+ */
+ public DataProductInner withProperties(DataProductProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the identity property: The managed service identities assigned to this resource.
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The managed service identities assigned to this resource.
+ *
+ * @param identity the identity value to set.
+ * @return the DataProductInner object itself.
+ */
+ public DataProductInner withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ 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 DataProductInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DataProductInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ if (identity() != null) {
+ identity().validate();
+ }
+ }
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductsCatalogInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductsCatalogInner.java
new file mode 100644
index 000000000000..b4e3467554dd
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductsCatalogInner.java
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The data catalog resource.
+ */
+@Fluent
+public final class DataProductsCatalogInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private DataProductsCatalogProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Creates an instance of DataProductsCatalogInner class.
+ */
+ public DataProductsCatalogInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public DataProductsCatalogProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the DataProductsCatalogInner object itself.
+ */
+ public DataProductsCatalogInner withProperties(DataProductsCatalogProperties properties) {
+ this.properties = properties;
+ 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;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataTypeInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataTypeInner.java
new file mode 100644
index 000000000000..414722f2786f
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataTypeInner.java
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.networkanalytics.models.DataTypeProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The data type resource.
+ */
+@Fluent
+public final class DataTypeInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private DataTypeProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Creates an instance of DataTypeInner class.
+ */
+ public DataTypeInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public DataTypeProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the DataTypeInner object itself.
+ */
+ public DataTypeInner withProperties(DataTypeProperties properties) {
+ this.properties = properties;
+ 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;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ListRoleAssignmentsInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ListRoleAssignmentsInner.java
new file mode 100644
index 000000000000..869b0e05bd1c
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ListRoleAssignmentsInner.java
@@ -0,0 +1,90 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * list role assignments.
+ */
+@Fluent
+public final class ListRoleAssignmentsInner {
+ /*
+ * Count of role assignments.
+ */
+ @JsonProperty(value = "count", required = true)
+ private int count;
+
+ /*
+ * list of role assignments
+ */
+ @JsonProperty(value = "roleAssignmentResponse", required = true)
+ private List roleAssignmentResponse;
+
+ /**
+ * Creates an instance of ListRoleAssignmentsInner class.
+ */
+ public ListRoleAssignmentsInner() {
+ }
+
+ /**
+ * Get the count property: Count of role assignments.
+ *
+ * @return the count value.
+ */
+ public int count() {
+ return this.count;
+ }
+
+ /**
+ * Set the count property: Count of role assignments.
+ *
+ * @param count the count value to set.
+ * @return the ListRoleAssignmentsInner object itself.
+ */
+ public ListRoleAssignmentsInner withCount(int count) {
+ this.count = count;
+ return this;
+ }
+
+ /**
+ * Get the roleAssignmentResponse property: list of role assignments.
+ *
+ * @return the roleAssignmentResponse value.
+ */
+ public List roleAssignmentResponse() {
+ return this.roleAssignmentResponse;
+ }
+
+ /**
+ * Set the roleAssignmentResponse property: list of role assignments.
+ *
+ * @param roleAssignmentResponse the roleAssignmentResponse value to set.
+ * @return the ListRoleAssignmentsInner object itself.
+ */
+ public ListRoleAssignmentsInner withRoleAssignmentResponse(List roleAssignmentResponse) {
+ this.roleAssignmentResponse = roleAssignmentResponse;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (roleAssignmentResponse() == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ "Missing required property roleAssignmentResponse in model ListRoleAssignmentsInner"));
+ } else {
+ roleAssignmentResponse().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ListRoleAssignmentsInner.class);
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/OperationInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..a5190e2372fc
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/OperationInner.java
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.networkanalytics.models.ActionType;
+import com.azure.resourcemanager.networkanalytics.models.OperationDisplay;
+import com.azure.resourcemanager.networkanalytics.models.Origin;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Fluent
+public final class OperationInner {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
+ * ARM/control-plane operations.
+ */
+ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ public OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Localized display information for this particular operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/RoleAssignmentDetailInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/RoleAssignmentDetailInner.java
new file mode 100644
index 000000000000..f434d38ef789
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/RoleAssignmentDetailInner.java
@@ -0,0 +1,243 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.networkanalytics.models.DataProductUserRole;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * The details for role assignment response.
+ */
+@Fluent
+public final class RoleAssignmentDetailInner {
+ /*
+ * Role Id of the Built-In Role
+ */
+ @JsonProperty(value = "roleId", required = true)
+ private String roleId;
+
+ /*
+ * Object ID of the AAD principal or security-group.
+ */
+ @JsonProperty(value = "principalId", required = true)
+ private String principalId;
+
+ /*
+ * User name.
+ */
+ @JsonProperty(value = "userName", required = true)
+ private String username;
+
+ /*
+ * Data Type Scope at which the role assignment is created.
+ */
+ @JsonProperty(value = "dataTypeScope", required = true)
+ private List dataTypeScope;
+
+ /*
+ * Type of the principal Id: User, Group or ServicePrincipal
+ */
+ @JsonProperty(value = "principalType", required = true)
+ private String principalType;
+
+ /*
+ * Data Product role to be assigned to a user.
+ */
+ @JsonProperty(value = "role", required = true)
+ private DataProductUserRole role;
+
+ /*
+ * Id of role assignment request
+ */
+ @JsonProperty(value = "roleAssignmentId", required = true)
+ private String roleAssignmentId;
+
+ /**
+ * Creates an instance of RoleAssignmentDetailInner class.
+ */
+ public RoleAssignmentDetailInner() {
+ }
+
+ /**
+ * Get the roleId property: Role Id of the Built-In Role.
+ *
+ * @return the roleId value.
+ */
+ public String roleId() {
+ return this.roleId;
+ }
+
+ /**
+ * Set the roleId property: Role Id of the Built-In Role.
+ *
+ * @param roleId the roleId value to set.
+ * @return the RoleAssignmentDetailInner object itself.
+ */
+ public RoleAssignmentDetailInner withRoleId(String roleId) {
+ this.roleId = roleId;
+ return this;
+ }
+
+ /**
+ * Get the principalId property: Object ID of the AAD principal or security-group.
+ *
+ * @return the principalId value.
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Set the principalId property: Object ID of the AAD principal or security-group.
+ *
+ * @param principalId the principalId value to set.
+ * @return the RoleAssignmentDetailInner object itself.
+ */
+ public RoleAssignmentDetailInner withPrincipalId(String principalId) {
+ this.principalId = principalId;
+ return this;
+ }
+
+ /**
+ * Get the username property: User name.
+ *
+ * @return the username value.
+ */
+ public String username() {
+ return this.username;
+ }
+
+ /**
+ * Set the username property: User name.
+ *
+ * @param username the username value to set.
+ * @return the RoleAssignmentDetailInner object itself.
+ */
+ public RoleAssignmentDetailInner withUsername(String username) {
+ this.username = username;
+ return this;
+ }
+
+ /**
+ * Get the dataTypeScope property: Data Type Scope at which the role assignment is created.
+ *
+ * @return the dataTypeScope value.
+ */
+ public List dataTypeScope() {
+ return this.dataTypeScope;
+ }
+
+ /**
+ * Set the dataTypeScope property: Data Type Scope at which the role assignment is created.
+ *
+ * @param dataTypeScope the dataTypeScope value to set.
+ * @return the RoleAssignmentDetailInner object itself.
+ */
+ public RoleAssignmentDetailInner withDataTypeScope(List dataTypeScope) {
+ this.dataTypeScope = dataTypeScope;
+ return this;
+ }
+
+ /**
+ * Get the principalType property: Type of the principal Id: User, Group or ServicePrincipal.
+ *
+ * @return the principalType value.
+ */
+ public String principalType() {
+ return this.principalType;
+ }
+
+ /**
+ * Set the principalType property: Type of the principal Id: User, Group or ServicePrincipal.
+ *
+ * @param principalType the principalType value to set.
+ * @return the RoleAssignmentDetailInner object itself.
+ */
+ public RoleAssignmentDetailInner withPrincipalType(String principalType) {
+ this.principalType = principalType;
+ return this;
+ }
+
+ /**
+ * Get the role property: Data Product role to be assigned to a user.
+ *
+ * @return the role value.
+ */
+ public DataProductUserRole role() {
+ return this.role;
+ }
+
+ /**
+ * Set the role property: Data Product role to be assigned to a user.
+ *
+ * @param role the role value to set.
+ * @return the RoleAssignmentDetailInner object itself.
+ */
+ public RoleAssignmentDetailInner withRole(DataProductUserRole role) {
+ this.role = role;
+ return this;
+ }
+
+ /**
+ * Get the roleAssignmentId property: Id of role assignment request.
+ *
+ * @return the roleAssignmentId value.
+ */
+ public String roleAssignmentId() {
+ return this.roleAssignmentId;
+ }
+
+ /**
+ * Set the roleAssignmentId property: Id of role assignment request.
+ *
+ * @param roleAssignmentId the roleAssignmentId value to set.
+ * @return the RoleAssignmentDetailInner object itself.
+ */
+ public RoleAssignmentDetailInner withRoleAssignmentId(String roleAssignmentId) {
+ this.roleAssignmentId = roleAssignmentId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (roleId() == null) {
+ throw LOGGER.logExceptionAsError(
+ new IllegalArgumentException("Missing required property roleId in model RoleAssignmentDetailInner"));
+ }
+ if (principalId() == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ "Missing required property principalId in model RoleAssignmentDetailInner"));
+ }
+ if (username() == null) {
+ throw LOGGER.logExceptionAsError(
+ new IllegalArgumentException("Missing required property username in model RoleAssignmentDetailInner"));
+ }
+ if (dataTypeScope() == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ "Missing required property dataTypeScope in model RoleAssignmentDetailInner"));
+ }
+ if (principalType() == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ "Missing required property principalType in model RoleAssignmentDetailInner"));
+ }
+ if (role() == null) {
+ throw LOGGER.logExceptionAsError(
+ new IllegalArgumentException("Missing required property role in model RoleAssignmentDetailInner"));
+ }
+ if (roleAssignmentId() == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ "Missing required property roleAssignmentId in model RoleAssignmentDetailInner"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(RoleAssignmentDetailInner.class);
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/package-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/package-info.java
new file mode 100644
index 000000000000..e1f6bff75f08
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for NetworkAnalyticsMgmtClient.
+ * null.
+ */
+package com.azure.resourcemanager.networkanalytics.fluent.models;
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/package-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/package-info.java
new file mode 100644
index 000000000000..50e85cb1a400
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for NetworkAnalyticsMgmtClient.
+ * null.
+ */
+package com.azure.resourcemanager.networkanalytics.fluent;
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/AccountSasTokenImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/AccountSasTokenImpl.java
new file mode 100644
index 000000000000..58ff79c1ce03
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/AccountSasTokenImpl.java
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.implementation;
+
+import com.azure.resourcemanager.networkanalytics.fluent.models.AccountSasTokenInner;
+import com.azure.resourcemanager.networkanalytics.models.AccountSasToken;
+
+public final class AccountSasTokenImpl implements AccountSasToken {
+ private AccountSasTokenInner innerObject;
+
+ private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager;
+
+ AccountSasTokenImpl(AccountSasTokenInner innerObject,
+ com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String storageAccountSasToken() {
+ return this.innerModel().storageAccountSasToken();
+ }
+
+ public AccountSasTokenInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ContainerSasTokenImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ContainerSasTokenImpl.java
new file mode 100644
index 000000000000..cacf8488a1e0
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ContainerSasTokenImpl.java
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.implementation;
+
+import com.azure.resourcemanager.networkanalytics.fluent.models.ContainerSasTokenInner;
+import com.azure.resourcemanager.networkanalytics.models.ContainerSasToken;
+
+public final class ContainerSasTokenImpl implements ContainerSasToken {
+ private ContainerSasTokenInner innerObject;
+
+ private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager;
+
+ ContainerSasTokenImpl(ContainerSasTokenInner innerObject,
+ com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String storageContainerSasToken() {
+ return this.innerModel().storageContainerSasToken();
+ }
+
+ public ContainerSasTokenInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductImpl.java
new file mode 100644
index 000000000000..090206e5b4e2
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductImpl.java
@@ -0,0 +1,242 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductInner;
+import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner;
+import com.azure.resourcemanager.networkanalytics.models.AccountSas;
+import com.azure.resourcemanager.networkanalytics.models.AccountSasToken;
+import com.azure.resourcemanager.networkanalytics.models.DataProduct;
+import com.azure.resourcemanager.networkanalytics.models.DataProductProperties;
+import com.azure.resourcemanager.networkanalytics.models.DataProductUpdate;
+import com.azure.resourcemanager.networkanalytics.models.DataProductUpdateProperties;
+import com.azure.resourcemanager.networkanalytics.models.KeyVaultInfo;
+import com.azure.resourcemanager.networkanalytics.models.ListRoleAssignments;
+import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentCommonProperties;
+import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentDetail;
+import java.util.Collections;
+import java.util.Map;
+
+public final class DataProductImpl implements DataProduct, DataProduct.Definition, DataProduct.Update {
+ private DataProductInner innerObject;
+
+ private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager 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 DataProductProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public ManagedServiceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public DataProductInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String dataProductName;
+
+ private DataProductUpdate updateProperties;
+
+ public DataProductImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public DataProduct create() {
+ this.innerObject = serviceManager.serviceClient().getDataProducts().create(resourceGroupName, dataProductName,
+ this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public DataProduct create(Context context) {
+ this.innerObject = serviceManager.serviceClient().getDataProducts().create(resourceGroupName, dataProductName,
+ this.innerModel(), context);
+ return this;
+ }
+
+ DataProductImpl(String name, com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) {
+ this.innerObject = new DataProductInner();
+ this.serviceManager = serviceManager;
+ this.dataProductName = name;
+ }
+
+ public DataProductImpl update() {
+ this.updateProperties = new DataProductUpdate();
+ return this;
+ }
+
+ public DataProduct apply() {
+ this.innerObject = serviceManager.serviceClient().getDataProducts().update(resourceGroupName, dataProductName,
+ updateProperties, Context.NONE);
+ return this;
+ }
+
+ public DataProduct apply(Context context) {
+ this.innerObject = serviceManager.serviceClient().getDataProducts().update(resourceGroupName, dataProductName,
+ updateProperties, context);
+ return this;
+ }
+
+ DataProductImpl(DataProductInner innerObject,
+ com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.dataProductName = Utils.getValueFromIdByName(innerObject.id(), "dataProducts");
+ }
+
+ public DataProduct refresh() {
+ this.innerObject = serviceManager.serviceClient().getDataProducts()
+ .getByResourceGroupWithResponse(resourceGroupName, dataProductName, Context.NONE).getValue();
+ return this;
+ }
+
+ public DataProduct refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient().getDataProducts()
+ .getByResourceGroupWithResponse(resourceGroupName, dataProductName, context).getValue();
+ return this;
+ }
+
+ public Response addUserRoleWithResponse(RoleAssignmentCommonProperties body,
+ Context context) {
+ return serviceManager.dataProducts().addUserRoleWithResponse(resourceGroupName, dataProductName, body, context);
+ }
+
+ public RoleAssignmentDetail addUserRole(RoleAssignmentCommonProperties body) {
+ return serviceManager.dataProducts().addUserRole(resourceGroupName, dataProductName, body);
+ }
+
+ public Response generateStorageAccountSasTokenWithResponse(AccountSas body, Context context) {
+ return serviceManager.dataProducts().generateStorageAccountSasTokenWithResponse(resourceGroupName,
+ dataProductName, body, context);
+ }
+
+ public AccountSasToken generateStorageAccountSasToken(AccountSas body) {
+ return serviceManager.dataProducts().generateStorageAccountSasToken(resourceGroupName, dataProductName, body);
+ }
+
+ public Response listRolesAssignmentsWithResponse(Object body, Context context) {
+ return serviceManager.dataProducts().listRolesAssignmentsWithResponse(resourceGroupName, dataProductName, body,
+ context);
+ }
+
+ public ListRoleAssignments listRolesAssignments(Object body) {
+ return serviceManager.dataProducts().listRolesAssignments(resourceGroupName, dataProductName, body);
+ }
+
+ public Response removeUserRoleWithResponse(RoleAssignmentDetailInner body, Context context) {
+ return serviceManager.dataProducts().removeUserRoleWithResponse(resourceGroupName, dataProductName, body,
+ context);
+ }
+
+ public void removeUserRole(RoleAssignmentDetailInner body) {
+ serviceManager.dataProducts().removeUserRole(resourceGroupName, dataProductName, body);
+ }
+
+ public Response rotateKeyWithResponse(KeyVaultInfo body, Context context) {
+ return serviceManager.dataProducts().rotateKeyWithResponse(resourceGroupName, dataProductName, body, context);
+ }
+
+ public void rotateKey(KeyVaultInfo body) {
+ serviceManager.dataProducts().rotateKey(resourceGroupName, dataProductName, body);
+ }
+
+ public DataProductImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public DataProductImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public DataProductImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateProperties.withTags(tags);
+ return this;
+ }
+ }
+
+ public DataProductImpl withProperties(DataProductProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public DataProductImpl withIdentity(ManagedServiceIdentity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateProperties.withIdentity(identity);
+ return this;
+ }
+ }
+
+ public DataProductImpl withProperties(DataProductUpdateProperties properties) {
+ this.updateProperties.withProperties(properties);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogImpl.java
new file mode 100644
index 000000000000..22546497f6bd
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner;
+import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalog;
+import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogProperties;
+
+public final class DataProductsCatalogImpl implements DataProductsCatalog {
+ private DataProductsCatalogInner innerObject;
+
+ private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager;
+
+ DataProductsCatalogImpl(DataProductsCatalogInner innerObject,
+ com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager 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 DataProductsCatalogProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public DataProductsCatalogInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsClientImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsClientImpl.java
new file mode 100644
index 000000000000..3afa90e3fb9f
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsClientImpl.java
@@ -0,0 +1,570 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.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.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.networkanalytics.fluent.DataProductsCatalogsClient;
+import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner;
+import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in DataProductsCatalogsClient.
+ */
+public final class DataProductsCatalogsClientImpl implements DataProductsCatalogsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final DataProductsCatalogsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final NetworkAnalyticsMgmtClientImpl client;
+
+ /**
+ * Initializes an instance of DataProductsCatalogsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DataProductsCatalogsClientImpl(NetworkAnalyticsMgmtClientImpl client) {
+ this.service = RestProxy.create(DataProductsCatalogsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for NetworkAnalyticsMgmtClientDataProductsCatalogs to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "NetworkAnalyticsMgmt")
+ public interface DataProductsCatalogsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @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 data catalog by 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 the response of a DataProductsCatalog list operation 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.getApiVersion(),
+ this.client.getSubscriptionId(), 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 data catalog by 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 the response of a DataProductsCatalog list operation 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.getApiVersion(), this.client.getSubscriptionId(), accept,
+ context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List data catalog by 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 the response of a DataProductsCatalog list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List data catalog by 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 the response of a DataProductsCatalog list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List data catalog by 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 the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List data catalog by 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 the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * List data catalog by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a DataProductsCatalog list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ 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."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, 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 data catalog by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a DataProductsCatalog list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
+ 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."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List data catalog by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a DataProductsCatalog list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List data catalog by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a DataProductsCatalog list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List data catalog by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List data catalog by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 data catalog resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName) {
+ 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."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 data catalog resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ 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."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context);
+ }
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 data catalog resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 data catalog resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, context).block();
+ }
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 data catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DataProductsCatalogInner getByResourceGroup(String resourceGroupName) {
+ return getByResourceGroupWithResponse(resourceGroupName, Context.NONE).getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
+ * 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 the response of a DataProductsCatalog list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(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 URL to get the next list of items
+ *
+ * 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 the response of a DataProductsCatalog list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
+ * 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 the response of a DataProductsCatalog list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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 URL to get the next list of items
+ *
+ * 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 the response of a DataProductsCatalog list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsImpl.java
new file mode 100644
index 000000000000..0942703a3e8c
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsImpl.java
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.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.networkanalytics.fluent.DataProductsCatalogsClient;
+import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner;
+import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalog;
+import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogs;
+
+public final class DataProductsCatalogsImpl implements DataProductsCatalogs {
+ private static final ClientLogger LOGGER = new ClientLogger(DataProductsCatalogsImpl.class);
+
+ private final DataProductsCatalogsClient innerClient;
+
+ private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager;
+
+ public DataProductsCatalogsImpl(DataProductsCatalogsClient innerClient,
+ com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new DataProductsCatalogImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new DataProductsCatalogImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new DataProductsCatalogImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new DataProductsCatalogImpl(inner1, this.manager()));
+ }
+
+ public Response getByResourceGroupWithResponse(String resourceGroupName, Context context) {
+ Response inner
+ = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new DataProductsCatalogImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public DataProductsCatalog getByResourceGroup(String resourceGroupName) {
+ DataProductsCatalogInner inner = this.serviceClient().getByResourceGroup(resourceGroupName);
+ if (inner != null) {
+ return new DataProductsCatalogImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private DataProductsCatalogsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsClientImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsClientImpl.java
new file mode 100644
index 000000000000..58bdfc22321f
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsClientImpl.java
@@ -0,0 +1,2033 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.networkanalytics.fluent.DataProductsClient;
+import com.azure.resourcemanager.networkanalytics.fluent.models.AccountSasTokenInner;
+import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductInner;
+import com.azure.resourcemanager.networkanalytics.fluent.models.ListRoleAssignmentsInner;
+import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner;
+import com.azure.resourcemanager.networkanalytics.models.AccountSas;
+import com.azure.resourcemanager.networkanalytics.models.DataProductListResult;
+import com.azure.resourcemanager.networkanalytics.models.DataProductUpdate;
+import com.azure.resourcemanager.networkanalytics.models.KeyVaultInfo;
+import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentCommonProperties;
+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 DataProductsClient.
+ */
+public final class DataProductsClientImpl implements DataProductsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final DataProductsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final NetworkAnalyticsMgmtClientImpl client;
+
+ /**
+ * Initializes an instance of DataProductsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DataProductsClientImpl(NetworkAnalyticsMgmtClientImpl client) {
+ this.service
+ = RestProxy.create(DataProductsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for NetworkAnalyticsMgmtClientDataProducts to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "NetworkAnalyticsMgmt")
+ public interface DataProductsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkAnalytics/dataProducts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName,
+ @BodyParam("application/json") DataProductInner resource, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName,
+ @BodyParam("application/json") DataProductUpdate properties, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/addUserRole")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> addUserRole(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName,
+ @BodyParam("application/json") RoleAssignmentCommonProperties body, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/generateStorageAccountSasToken")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> generateStorageAccountSasToken(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName, @BodyParam("application/json") AccountSas body,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/listRolesAssignments")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listRolesAssignments(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName, @BodyParam("application/json") Object body,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/removeUserRole")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> removeUserRole(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName,
+ @BodyParam("application/json") RoleAssignmentDetailInner body, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/rotateKey")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> rotateKey(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName, @BodyParam("application/json") KeyVaultInfo body,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @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 data products by 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 the response of a DataProduct list operation 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.getApiVersion(),
+ this.client.getSubscriptionId(), 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 data products by 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 the response of a DataProduct list operation 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.getApiVersion(), this.client.getSubscriptionId(), accept,
+ context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List data products by 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 the response of a DataProduct list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List data products by 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 the response of a DataProduct list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List data products by 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 the response of a DataProduct list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List data products by 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 the response of a DataProduct list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * List data products by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a DataProduct list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ 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."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, 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 data products by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a DataProduct list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
+ 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."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List data products by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a DataProduct list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List data products by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a DataProduct list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List data products by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a DataProduct list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List data products by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a DataProduct list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Retrieve data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 data product resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String dataProductName) {
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Retrieve data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 data product resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String dataProductName, 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, accept, context);
+ }
+
+ /**
+ * Retrieve data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 data product resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String dataProductName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, dataProductName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Retrieve data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 data product resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String dataProductName,
+ Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, dataProductName, context).block();
+ }
+
+ /**
+ * Retrieve data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DataProductInner getByResourceGroup(String resourceGroupName, String dataProductName) {
+ return getByResourceGroupWithResponse(resourceGroupName, dataProductName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 data product resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName, String dataProductName,
+ DataProductInner resource) {
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, resource, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 data product resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName, String dataProductName,
+ DataProductInner resource, 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, dataProductName, resource, accept, context);
+ }
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DataProductInner> beginCreateAsync(String resourceGroupName,
+ String dataProductName, DataProductInner resource) {
+ Mono>> mono = createWithResponseAsync(resourceGroupName, dataProductName, resource);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DataProductInner.class, DataProductInner.class, this.client.getContext());
+ }
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DataProductInner> beginCreateAsync(String resourceGroupName,
+ String dataProductName, DataProductInner resource, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = createWithResponseAsync(resourceGroupName, dataProductName, resource, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DataProductInner.class, DataProductInner.class, context);
+ }
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DataProductInner> beginCreate(String resourceGroupName,
+ String dataProductName, DataProductInner resource) {
+ return this.beginCreateAsync(resourceGroupName, dataProductName, resource).getSyncPoller();
+ }
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DataProductInner> beginCreate(String resourceGroupName,
+ String dataProductName, DataProductInner resource, Context context) {
+ return this.beginCreateAsync(resourceGroupName, dataProductName, resource, context).getSyncPoller();
+ }
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 data product resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String dataProductName,
+ DataProductInner resource) {
+ return beginCreateAsync(resourceGroupName, dataProductName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 data product resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String dataProductName,
+ DataProductInner resource, Context context) {
+ return beginCreateAsync(resourceGroupName, dataProductName, resource, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DataProductInner create(String resourceGroupName, String dataProductName, DataProductInner resource) {
+ return createAsync(resourceGroupName, dataProductName, resource).block();
+ }
+
+ /**
+ * Create data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param resource Resource create parameters.
+ * @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 data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DataProductInner create(String resourceGroupName, String dataProductName, DataProductInner resource,
+ Context context) {
+ return createAsync(resourceGroupName, dataProductName, resource, context).block();
+ }
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be updated.
+ * @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 data product resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String dataProductName,
+ DataProductUpdate properties) {
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, properties, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be updated.
+ * @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 data product resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String dataProductName,
+ DataProductUpdate properties, 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, dataProductName, properties, accept, context);
+ }
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be updated.
+ * @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 the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DataProductInner> beginUpdateAsync(String resourceGroupName,
+ String dataProductName, DataProductUpdate properties) {
+ Mono>> mono = updateWithResponseAsync(resourceGroupName, dataProductName, properties);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DataProductInner.class, DataProductInner.class, this.client.getContext());
+ }
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be updated.
+ * @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 the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DataProductInner> beginUpdateAsync(String resourceGroupName,
+ String dataProductName, DataProductUpdate properties, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, dataProductName, properties, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DataProductInner.class, DataProductInner.class, context);
+ }
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be updated.
+ * @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 the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DataProductInner> beginUpdate(String resourceGroupName,
+ String dataProductName, DataProductUpdate properties) {
+ return this.beginUpdateAsync(resourceGroupName, dataProductName, properties).getSyncPoller();
+ }
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be updated.
+ * @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 the data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DataProductInner> beginUpdate(String resourceGroupName,
+ String dataProductName, DataProductUpdate properties, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, dataProductName, properties, context).getSyncPoller();
+ }
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be updated.
+ * @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 data product resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String dataProductName,
+ DataProductUpdate properties) {
+ return beginUpdateAsync(resourceGroupName, dataProductName, properties).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be updated.
+ * @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 data product resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String dataProductName,
+ DataProductUpdate properties, Context context) {
+ return beginUpdateAsync(resourceGroupName, dataProductName, properties, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be updated.
+ * @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 data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DataProductInner update(String resourceGroupName, String dataProductName, DataProductUpdate properties) {
+ return updateAsync(resourceGroupName, dataProductName, properties).block();
+ }
+
+ /**
+ * Update data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param properties The resource properties to be updated.
+ * @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 data product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DataProductInner update(String resourceGroupName, String dataProductName, DataProductUpdate properties,
+ Context context) {
+ return updateAsync(resourceGroupName, dataProductName, properties, context).block();
+ }
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName) {
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName,
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, dataProductName, accept, context);
+ }
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, dataProductName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, dataProductName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName) {
+ return this.beginDeleteAsync(resourceGroupName, dataProductName).getSyncPoller();
+ }
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName,
+ Context context) {
+ return this.beginDeleteAsync(resourceGroupName, dataProductName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName) {
+ return beginDeleteAsync(resourceGroupName, dataProductName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName, Context context) {
+ return beginDeleteAsync(resourceGroupName, dataProductName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName) {
+ deleteAsync(resourceGroupName, dataProductName).block();
+ }
+
+ /**
+ * Delete data product resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 dataProductName, Context context) {
+ deleteAsync(resourceGroupName, dataProductName, context).block();
+ }
+
+ /**
+ * Assign role to the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details for role assignment response along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> addUserRoleWithResponseAsync(String resourceGroupName,
+ String dataProductName, RoleAssignmentCommonProperties body) {
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.addUserRole(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Assign role to the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details for role assignment response along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> addUserRoleWithResponseAsync(String resourceGroupName,
+ String dataProductName, RoleAssignmentCommonProperties body, 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.addUserRole(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context);
+ }
+
+ /**
+ * Assign role to the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details for role assignment response on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono addUserRoleAsync(String resourceGroupName, String dataProductName,
+ RoleAssignmentCommonProperties body) {
+ return addUserRoleWithResponseAsync(resourceGroupName, dataProductName, body)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Assign role to the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details for role assignment response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response addUserRoleWithResponse(String resourceGroupName, String dataProductName,
+ RoleAssignmentCommonProperties body, Context context) {
+ return addUserRoleWithResponseAsync(resourceGroupName, dataProductName, body, context).block();
+ }
+
+ /**
+ * Assign role to the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details for role assignment response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public RoleAssignmentDetailInner addUserRole(String resourceGroupName, String dataProductName,
+ RoleAssignmentCommonProperties body) {
+ return addUserRoleWithResponse(resourceGroupName, dataProductName, body, Context.NONE).getValue();
+ }
+
+ /**
+ * Generate sas token for storage account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details of storage account sas token along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> generateStorageAccountSasTokenWithResponseAsync(
+ String resourceGroupName, String dataProductName, AccountSas body) {
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.generateStorageAccountSasToken(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, dataProductName, body,
+ accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Generate sas token for storage account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details of storage account sas token along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> generateStorageAccountSasTokenWithResponseAsync(
+ String resourceGroupName, String dataProductName, AccountSas body, 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.generateStorageAccountSasToken(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context);
+ }
+
+ /**
+ * Generate sas token for storage account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details of storage account sas token on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono generateStorageAccountSasTokenAsync(String resourceGroupName,
+ String dataProductName, AccountSas body) {
+ return generateStorageAccountSasTokenWithResponseAsync(resourceGroupName, dataProductName, body)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Generate sas token for storage account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details of storage account sas token along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response generateStorageAccountSasTokenWithResponse(String resourceGroupName,
+ String dataProductName, AccountSas body, Context context) {
+ return generateStorageAccountSasTokenWithResponseAsync(resourceGroupName, dataProductName, body, context)
+ .block();
+ }
+
+ /**
+ * Generate sas token for storage account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 details of storage account sas token.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AccountSasTokenInner generateStorageAccountSasToken(String resourceGroupName, String dataProductName,
+ AccountSas body) {
+ return generateStorageAccountSasTokenWithResponse(resourceGroupName, dataProductName, body, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * List user roles associated with the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 list role assignments along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listRolesAssignmentsWithResponseAsync(String resourceGroupName,
+ String dataProductName, Object body) {
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listRolesAssignments(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List user roles associated with the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 list role assignments along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listRolesAssignmentsWithResponseAsync(String resourceGroupName,
+ String dataProductName, Object body, 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listRolesAssignments(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context);
+ }
+
+ /**
+ * List user roles associated with the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 list role assignments on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listRolesAssignmentsAsync(String resourceGroupName, String dataProductName,
+ Object body) {
+ return listRolesAssignmentsWithResponseAsync(resourceGroupName, dataProductName, body)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * List user roles associated with the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 list role assignments along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listRolesAssignmentsWithResponse(String resourceGroupName,
+ String dataProductName, Object body, Context context) {
+ return listRolesAssignmentsWithResponseAsync(resourceGroupName, dataProductName, body, context).block();
+ }
+
+ /**
+ * List user roles associated with the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 list role assignments.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ListRoleAssignmentsInner listRolesAssignments(String resourceGroupName, String dataProductName,
+ Object body) {
+ return listRolesAssignmentsWithResponse(resourceGroupName, dataProductName, body, Context.NONE).getValue();
+ }
+
+ /**
+ * Remove role from the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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> removeUserRoleWithResponseAsync(String resourceGroupName, String dataProductName,
+ RoleAssignmentDetailInner body) {
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.removeUserRole(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Remove role from the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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> removeUserRoleWithResponseAsync(String resourceGroupName, String dataProductName,
+ RoleAssignmentDetailInner body, 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.removeUserRole(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context);
+ }
+
+ /**
+ * Remove role from the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 removeUserRoleAsync(String resourceGroupName, String dataProductName,
+ RoleAssignmentDetailInner body) {
+ return removeUserRoleWithResponseAsync(resourceGroupName, dataProductName, body)
+ .flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Remove role from the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response removeUserRoleWithResponse(String resourceGroupName, String dataProductName,
+ RoleAssignmentDetailInner body, Context context) {
+ return removeUserRoleWithResponseAsync(resourceGroupName, dataProductName, body, context).block();
+ }
+
+ /**
+ * Remove role from the data product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 removeUserRole(String resourceGroupName, String dataProductName, RoleAssignmentDetailInner body) {
+ removeUserRoleWithResponse(resourceGroupName, dataProductName, body, Context.NONE);
+ }
+
+ /**
+ * Initiate key rotation on Data Product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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> rotateKeyWithResponseAsync(String resourceGroupName, String dataProductName,
+ KeyVaultInfo body) {
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.rotateKey(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Initiate key rotation on Data Product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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> rotateKeyWithResponseAsync(String resourceGroupName, String dataProductName,
+ KeyVaultInfo body, 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.rotateKey(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context);
+ }
+
+ /**
+ * Initiate key rotation on Data Product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 rotateKeyAsync(String resourceGroupName, String dataProductName, KeyVaultInfo body) {
+ return rotateKeyWithResponseAsync(resourceGroupName, dataProductName, body).flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Initiate key rotation on Data Product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response rotateKeyWithResponse(String resourceGroupName, String dataProductName, KeyVaultInfo body,
+ Context context) {
+ return rotateKeyWithResponseAsync(resourceGroupName, dataProductName, body, context).block();
+ }
+
+ /**
+ * Initiate key rotation on Data Product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param body The content of the action request.
+ * @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 rotateKey(String resourceGroupName, String dataProductName, KeyVaultInfo body) {
+ rotateKeyWithResponse(resourceGroupName, dataProductName, body, Context.NONE);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
+ * 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 the response of a DataProduct list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(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 URL to get the next list of items
+ *
+ * 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 the response of a DataProduct list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
+ * 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 the response of a DataProduct list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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 URL to get the next list of items
+ *
+ * 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 the response of a DataProduct list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsImpl.java
new file mode 100644
index 000000000000..42ff2e765e6d
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsImpl.java
@@ -0,0 +1,240 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.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.networkanalytics.fluent.DataProductsClient;
+import com.azure.resourcemanager.networkanalytics.fluent.models.AccountSasTokenInner;
+import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductInner;
+import com.azure.resourcemanager.networkanalytics.fluent.models.ListRoleAssignmentsInner;
+import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner;
+import com.azure.resourcemanager.networkanalytics.models.AccountSas;
+import com.azure.resourcemanager.networkanalytics.models.AccountSasToken;
+import com.azure.resourcemanager.networkanalytics.models.DataProduct;
+import com.azure.resourcemanager.networkanalytics.models.DataProducts;
+import com.azure.resourcemanager.networkanalytics.models.KeyVaultInfo;
+import com.azure.resourcemanager.networkanalytics.models.ListRoleAssignments;
+import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentCommonProperties;
+import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentDetail;
+
+public final class DataProductsImpl implements DataProducts {
+ private static final ClientLogger LOGGER = new ClientLogger(DataProductsImpl.class);
+
+ private final DataProductsClient innerClient;
+
+ private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager;
+
+ public DataProductsImpl(DataProductsClient innerClient,
+ com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new DataProductImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new DataProductImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new DataProductImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new DataProductImpl(inner1, this.manager()));
+ }
+
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String dataProductName,
+ Context context) {
+ Response inner
+ = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, dataProductName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new DataProductImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public DataProduct getByResourceGroup(String resourceGroupName, String dataProductName) {
+ DataProductInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, dataProductName);
+ if (inner != null) {
+ return new DataProductImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String dataProductName) {
+ this.serviceClient().delete(resourceGroupName, dataProductName);
+ }
+
+ public void delete(String resourceGroupName, String dataProductName, Context context) {
+ this.serviceClient().delete(resourceGroupName, dataProductName, context);
+ }
+
+ public Response addUserRoleWithResponse(String resourceGroupName, String dataProductName,
+ RoleAssignmentCommonProperties body, Context context) {
+ Response inner
+ = this.serviceClient().addUserRoleWithResponse(resourceGroupName, dataProductName, body, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new RoleAssignmentDetailImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public RoleAssignmentDetail addUserRole(String resourceGroupName, String dataProductName,
+ RoleAssignmentCommonProperties body) {
+ RoleAssignmentDetailInner inner = this.serviceClient().addUserRole(resourceGroupName, dataProductName, body);
+ if (inner != null) {
+ return new RoleAssignmentDetailImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response generateStorageAccountSasTokenWithResponse(String resourceGroupName,
+ String dataProductName, AccountSas body, Context context) {
+ Response inner = this.serviceClient()
+ .generateStorageAccountSasTokenWithResponse(resourceGroupName, dataProductName, body, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AccountSasTokenImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AccountSasToken generateStorageAccountSasToken(String resourceGroupName, String dataProductName,
+ AccountSas body) {
+ AccountSasTokenInner inner
+ = this.serviceClient().generateStorageAccountSasToken(resourceGroupName, dataProductName, body);
+ if (inner != null) {
+ return new AccountSasTokenImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response listRolesAssignmentsWithResponse(String resourceGroupName,
+ String dataProductName, Object body, Context context) {
+ Response inner
+ = this.serviceClient().listRolesAssignmentsWithResponse(resourceGroupName, dataProductName, body, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new ListRoleAssignmentsImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ListRoleAssignments listRolesAssignments(String resourceGroupName, String dataProductName, Object body) {
+ ListRoleAssignmentsInner inner
+ = this.serviceClient().listRolesAssignments(resourceGroupName, dataProductName, body);
+ if (inner != null) {
+ return new ListRoleAssignmentsImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response removeUserRoleWithResponse(String resourceGroupName, String dataProductName,
+ RoleAssignmentDetailInner body, Context context) {
+ return this.serviceClient().removeUserRoleWithResponse(resourceGroupName, dataProductName, body, context);
+ }
+
+ public void removeUserRole(String resourceGroupName, String dataProductName, RoleAssignmentDetailInner body) {
+ this.serviceClient().removeUserRole(resourceGroupName, dataProductName, body);
+ }
+
+ public Response rotateKeyWithResponse(String resourceGroupName, String dataProductName, KeyVaultInfo body,
+ Context context) {
+ return this.serviceClient().rotateKeyWithResponse(resourceGroupName, dataProductName, body, context);
+ }
+
+ public void rotateKey(String resourceGroupName, String dataProductName, KeyVaultInfo body) {
+ this.serviceClient().rotateKey(resourceGroupName, dataProductName, body);
+ }
+
+ public DataProduct 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 dataProductName = Utils.getValueFromIdByName(id, "dataProducts");
+ if (dataProductName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'dataProducts'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, dataProductName, 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 dataProductName = Utils.getValueFromIdByName(id, "dataProducts");
+ if (dataProductName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'dataProducts'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, dataProductName, 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 dataProductName = Utils.getValueFromIdByName(id, "dataProducts");
+ if (dataProductName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'dataProducts'.", id)));
+ }
+ this.delete(resourceGroupName, dataProductName, 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 dataProductName = Utils.getValueFromIdByName(id, "dataProducts");
+ if (dataProductName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'dataProducts'.", id)));
+ }
+ this.delete(resourceGroupName, dataProductName, context);
+ }
+
+ private DataProductsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+
+ public DataProductImpl define(String name) {
+ return new DataProductImpl(name, this.manager());
+ }
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypeImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypeImpl.java
new file mode 100644
index 000000000000..041e067571cc
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypeImpl.java
@@ -0,0 +1,153 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.networkanalytics.fluent.models.DataTypeInner;
+import com.azure.resourcemanager.networkanalytics.models.ContainerSaS;
+import com.azure.resourcemanager.networkanalytics.models.ContainerSasToken;
+import com.azure.resourcemanager.networkanalytics.models.DataType;
+import com.azure.resourcemanager.networkanalytics.models.DataTypeProperties;
+import com.azure.resourcemanager.networkanalytics.models.DataTypeUpdate;
+import com.azure.resourcemanager.networkanalytics.models.DataTypeUpdateProperties;
+
+public final class DataTypeImpl implements DataType, DataType.Definition, DataType.Update {
+ private DataTypeInner innerObject;
+
+ private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public DataTypeProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public DataTypeInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String dataProductName;
+
+ private String dataTypeName;
+
+ private DataTypeUpdate updateProperties;
+
+ public DataTypeImpl withExistingDataProduct(String resourceGroupName, String dataProductName) {
+ this.resourceGroupName = resourceGroupName;
+ this.dataProductName = dataProductName;
+ return this;
+ }
+
+ public DataType create() {
+ this.innerObject = serviceManager.serviceClient().getDataTypes().create(resourceGroupName, dataProductName,
+ dataTypeName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public DataType create(Context context) {
+ this.innerObject = serviceManager.serviceClient().getDataTypes().create(resourceGroupName, dataProductName,
+ dataTypeName, this.innerModel(), context);
+ return this;
+ }
+
+ DataTypeImpl(String name, com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) {
+ this.innerObject = new DataTypeInner();
+ this.serviceManager = serviceManager;
+ this.dataTypeName = name;
+ }
+
+ public DataTypeImpl update() {
+ this.updateProperties = new DataTypeUpdate();
+ return this;
+ }
+
+ public DataType apply() {
+ this.innerObject = serviceManager.serviceClient().getDataTypes().update(resourceGroupName, dataProductName,
+ dataTypeName, updateProperties, Context.NONE);
+ return this;
+ }
+
+ public DataType apply(Context context) {
+ this.innerObject = serviceManager.serviceClient().getDataTypes().update(resourceGroupName, dataProductName,
+ dataTypeName, updateProperties, context);
+ return this;
+ }
+
+ DataTypeImpl(DataTypeInner innerObject,
+ com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.dataProductName = Utils.getValueFromIdByName(innerObject.id(), "dataProducts");
+ this.dataTypeName = Utils.getValueFromIdByName(innerObject.id(), "dataTypes");
+ }
+
+ public DataType refresh() {
+ this.innerObject = serviceManager.serviceClient().getDataTypes()
+ .getWithResponse(resourceGroupName, dataProductName, dataTypeName, Context.NONE).getValue();
+ return this;
+ }
+
+ public DataType refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient().getDataTypes()
+ .getWithResponse(resourceGroupName, dataProductName, dataTypeName, context).getValue();
+ return this;
+ }
+
+ public void deleteData(Object body) {
+ serviceManager.dataTypes().deleteData(resourceGroupName, dataProductName, dataTypeName, body);
+ }
+
+ public void deleteData(Object body, Context context) {
+ serviceManager.dataTypes().deleteData(resourceGroupName, dataProductName, dataTypeName, body, context);
+ }
+
+ public Response generateStorageContainerSasTokenWithResponse(ContainerSaS body,
+ Context context) {
+ return serviceManager.dataTypes().generateStorageContainerSasTokenWithResponse(resourceGroupName,
+ dataProductName, dataTypeName, body, context);
+ }
+
+ public ContainerSasToken generateStorageContainerSasToken(ContainerSaS body) {
+ return serviceManager.dataTypes().generateStorageContainerSasToken(resourceGroupName, dataProductName,
+ dataTypeName, body);
+ }
+
+ public DataTypeImpl withProperties(DataTypeProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public DataTypeImpl withProperties(DataTypeUpdateProperties properties) {
+ this.updateProperties.withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypesClientImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypesClientImpl.java
new file mode 100644
index 000000000000..bd23cfdcc76b
--- /dev/null
+++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypesClientImpl.java
@@ -0,0 +1,1615 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.networkanalytics.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.networkanalytics.fluent.DataTypesClient;
+import com.azure.resourcemanager.networkanalytics.fluent.models.ContainerSasTokenInner;
+import com.azure.resourcemanager.networkanalytics.fluent.models.DataTypeInner;
+import com.azure.resourcemanager.networkanalytics.models.ContainerSaS;
+import com.azure.resourcemanager.networkanalytics.models.DataTypeListResult;
+import com.azure.resourcemanager.networkanalytics.models.DataTypeUpdate;
+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 DataTypesClient.
+ */
+public final class DataTypesClientImpl implements DataTypesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final DataTypesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final NetworkAnalyticsMgmtClientImpl client;
+
+ /**
+ * Initializes an instance of DataTypesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DataTypesClientImpl(NetworkAnalyticsMgmtClientImpl client) {
+ this.service
+ = RestProxy.create(DataTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for NetworkAnalyticsMgmtClientDataTypes to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "NetworkAnalyticsMgmt")
+ public interface DataTypesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByDataProduct(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName, @PathParam("dataTypeName") String dataTypeName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName, @PathParam("dataTypeName") String dataTypeName,
+ @BodyParam("application/json") DataTypeInner resource, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName, @PathParam("dataTypeName") String dataTypeName,
+ @BodyParam("application/json") DataTypeUpdate properties, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName, @PathParam("dataTypeName") String dataTypeName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}/deleteData")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> deleteData(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName, @PathParam("dataTypeName") String dataTypeName,
+ @BodyParam("application/json") Object body, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}/generateStorageContainerSasToken")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> generateStorageContainerSasToken(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataProductName") String dataProductName, @PathParam("dataTypeName") String dataTypeName,
+ @BodyParam("application/json") ContainerSaS body, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByDataProductNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * List data type by parent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 of a DataType list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByDataProductSinglePageAsync(String resourceGroupName,
+ String dataProductName) {
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByDataProduct(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, 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 data type by parent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 response of a DataType list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByDataProductSinglePageAsync(String resourceGroupName,
+ String dataProductName, 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByDataProduct(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, dataProductName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List data type by parent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 of a DataType list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByDataProductAsync(String resourceGroupName, String dataProductName) {
+ return new PagedFlux<>(() -> listByDataProductSinglePageAsync(resourceGroupName, dataProductName),
+ nextLink -> listByDataProductNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List data type by parent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 response of a DataType list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByDataProductAsync(String resourceGroupName, String dataProductName,
+ Context context) {
+ return new PagedFlux<>(() -> listByDataProductSinglePageAsync(resourceGroupName, dataProductName, context),
+ nextLink -> listByDataProductNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List data type by parent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 of a DataType list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByDataProduct(String resourceGroupName, String dataProductName) {
+ return new PagedIterable<>(listByDataProductAsync(resourceGroupName, dataProductName));
+ }
+
+ /**
+ * List data type by parent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @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 response of a DataType list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByDataProduct(String resourceGroupName, String dataProductName,
+ Context context) {
+ return new PagedIterable<>(listByDataProductAsync(resourceGroupName, dataProductName, context));
+ }
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @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 data type resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String dataProductName,
+ String dataTypeName) {
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (dataTypeName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, dataTypeName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @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 data type resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String dataProductName,
+ String dataTypeName, 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (dataTypeName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, dataProductName, dataTypeName, accept, context);
+ }
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @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 data type resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String dataProductName, String dataTypeName) {
+ return getWithResponseAsync(resourceGroupName, dataProductName, dataTypeName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @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 data type resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String dataProductName,
+ String dataTypeName, Context context) {
+ return getWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, context).block();
+ }
+
+ /**
+ * Retrieve data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @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 data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DataTypeInner get(String resourceGroupName, String dataProductName, String dataTypeName) {
+ return getWithResponse(resourceGroupName, dataProductName, dataTypeName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 data type resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName, String dataProductName,
+ String dataTypeName, DataTypeInner resource) {
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (dataTypeName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, dataTypeName, resource, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 data type resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName, String dataProductName,
+ String dataTypeName, DataTypeInner resource, 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (dataTypeName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, dataProductName, dataTypeName, resource, accept, context);
+ }
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DataTypeInner> beginCreateAsync(String resourceGroupName,
+ String dataProductName, String dataTypeName, DataTypeInner resource) {
+ Mono>> mono
+ = createWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, resource);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DataTypeInner.class, DataTypeInner.class, this.client.getContext());
+ }
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DataTypeInner> beginCreateAsync(String resourceGroupName,
+ String dataProductName, String dataTypeName, DataTypeInner resource, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = createWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, resource, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DataTypeInner.class, DataTypeInner.class, context);
+ }
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DataTypeInner> beginCreate(String resourceGroupName,
+ String dataProductName, String dataTypeName, DataTypeInner resource) {
+ return this.beginCreateAsync(resourceGroupName, dataProductName, dataTypeName, resource).getSyncPoller();
+ }
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DataTypeInner> beginCreate(String resourceGroupName,
+ String dataProductName, String dataTypeName, DataTypeInner resource, Context context) {
+ return this.beginCreateAsync(resourceGroupName, dataProductName, dataTypeName, resource, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 data type resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String dataProductName, String dataTypeName,
+ DataTypeInner resource) {
+ return beginCreateAsync(resourceGroupName, dataProductName, dataTypeName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 data type resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String dataProductName, String dataTypeName,
+ DataTypeInner resource, Context context) {
+ return beginCreateAsync(resourceGroupName, dataProductName, dataTypeName, resource, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DataTypeInner create(String resourceGroupName, String dataProductName, String dataTypeName,
+ DataTypeInner resource) {
+ return createAsync(resourceGroupName, dataProductName, dataTypeName, resource).block();
+ }
+
+ /**
+ * Create data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param resource Resource create parameters.
+ * @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 data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DataTypeInner create(String resourceGroupName, String dataProductName, String dataTypeName,
+ DataTypeInner resource, Context context) {
+ return createAsync(resourceGroupName, dataProductName, dataTypeName, resource, context).block();
+ }
+
+ /**
+ * Update data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param properties The resource properties to be updated.
+ * @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 data type resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String dataProductName,
+ String dataTypeName, DataTypeUpdate properties) {
+ 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (dataTypeName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, dataProductName, dataTypeName, properties, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param properties The resource properties to be updated.
+ * @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 data type resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String dataProductName,
+ String dataTypeName, DataTypeUpdate properties, 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 (dataProductName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null."));
+ }
+ if (dataTypeName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, dataProductName, dataTypeName, properties, accept, context);
+ }
+
+ /**
+ * Update data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param properties The resource properties to be updated.
+ * @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 the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DataTypeInner> beginUpdateAsync(String resourceGroupName,
+ String dataProductName, String dataTypeName, DataTypeUpdate properties) {
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, properties);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DataTypeInner.class, DataTypeInner.class, this.client.getContext());
+ }
+
+ /**
+ * Update data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param properties The resource properties to be updated.
+ * @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 the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DataTypeInner> beginUpdateAsync(String resourceGroupName,
+ String dataProductName, String dataTypeName, DataTypeUpdate properties, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, properties, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DataTypeInner.class, DataTypeInner.class, context);
+ }
+
+ /**
+ * Update data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param properties The resource properties to be updated.
+ * @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 the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DataTypeInner> beginUpdate(String resourceGroupName,
+ String dataProductName, String dataTypeName, DataTypeUpdate properties) {
+ return this.beginUpdateAsync(resourceGroupName, dataProductName, dataTypeName, properties).getSyncPoller();
+ }
+
+ /**
+ * Update data type resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param dataProductName The data product resource name.
+ * @param dataTypeName The data type name.
+ * @param properties The resource properties to be updated.
+ * @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 the data type resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller