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 Nginx service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Nginx service API instance.
+ */
+ public NginxManager 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.nginx")
+ .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 NginxManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Certificates. It manages NginxCertificate.
+ *
+ * @return Resource collection API of Certificates.
+ */
+ public Certificates certificates() {
+ if (this.certificates == null) {
+ this.certificates = new CertificatesImpl(clientObject.getCertificates(), this);
+ }
+ return certificates;
+ }
+
+ /**
+ * Gets the resource collection API of Configurations. It manages NginxConfiguration.
+ *
+ * @return Resource collection API of Configurations.
+ */
+ public Configurations configurations() {
+ if (this.configurations == null) {
+ this.configurations = new ConfigurationsImpl(clientObject.getConfigurations(), this);
+ }
+ return configurations;
+ }
+
+ /**
+ * Gets the resource collection API of Deployments. It manages NginxDeployment.
+ *
+ * @return Resource collection API of Deployments.
+ */
+ public Deployments deployments() {
+ if (this.deployments == null) {
+ this.deployments = new DeploymentsImpl(clientObject.getDeployments(), this);
+ }
+ return deployments;
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * @return Wrapped service client NginxManagementClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public NginxManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/CertificatesClient.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/CertificatesClient.java
new file mode 100644
index 000000000000..8cb3acfb363d
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/CertificatesClient.java
@@ -0,0 +1,220 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.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.nginx.fluent.models.NginxCertificateInner;
+
+/** An instance of this class provides access to all the operations defined in CertificatesClient. */
+public interface CertificatesClient {
+ /**
+ * Get a certificate of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 certificate of given Nginx deployment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxCertificateInner get(String resourceGroupName, String deploymentName, String certificateName);
+
+ /**
+ * Get a certificate of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 certificate of given Nginx deployment along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String deploymentName, String certificateName, Context context);
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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, NginxCertificateInner> beginCreate(
+ String resourceGroupName, String deploymentName, String certificateName, NginxCertificateInner body);
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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, NginxCertificateInner> beginCreate(
+ String resourceGroupName,
+ String deploymentName,
+ String certificateName,
+ NginxCertificateInner body,
+ Context context);
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxCertificateInner create(
+ String resourceGroupName, String deploymentName, String certificateName, NginxCertificateInner body);
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxCertificateInner create(String resourceGroupName, String deploymentName, String certificateName);
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxCertificateInner create(
+ String resourceGroupName,
+ String deploymentName,
+ String certificateName,
+ NginxCertificateInner body,
+ Context context);
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName);
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName, Context context);
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName);
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName, Context context);
+
+ /**
+ * List all certificates of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String deploymentName);
+
+ /**
+ * List all certificates of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String deploymentName, Context context);
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/ConfigurationsClient.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/ConfigurationsClient.java
new file mode 100644
index 000000000000..ef5c20310a6a
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/ConfigurationsClient.java
@@ -0,0 +1,231 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.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.nginx.fluent.models.NginxConfigurationInner;
+
+/** An instance of this class provides access to all the operations defined in ConfigurationsClient. */
+public interface ConfigurationsClient {
+ /**
+ * List the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 response of a list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String deploymentName);
+
+ /**
+ * List the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 response of a list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String deploymentName, Context context);
+
+ /**
+ * Get the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 Nginx configuration of given Nginx deployment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxConfigurationInner get(String resourceGroupName, String deploymentName, String configurationName);
+
+ /**
+ * Get the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 Nginx configuration of given Nginx deployment along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String deploymentName, String configurationName, Context context);
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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, NginxConfigurationInner> beginCreateOrUpdate(
+ String resourceGroupName, String deploymentName, String configurationName, NginxConfigurationInner body);
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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, NginxConfigurationInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String deploymentName,
+ String configurationName,
+ NginxConfigurationInner body,
+ Context context);
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxConfigurationInner createOrUpdate(
+ String resourceGroupName, String deploymentName, String configurationName, NginxConfigurationInner body);
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxConfigurationInner createOrUpdate(String resourceGroupName, String deploymentName, String configurationName);
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxConfigurationInner createOrUpdate(
+ String resourceGroupName,
+ String deploymentName,
+ String configurationName,
+ NginxConfigurationInner body,
+ Context context);
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName);
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName, Context context);
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName);
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName, Context context);
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/DeploymentsClient.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/DeploymentsClient.java
new file mode 100644
index 000000000000..8ca0769ba615
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/DeploymentsClient.java
@@ -0,0 +1,293 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.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.nginx.fluent.models.NginxDeploymentInner;
+import com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateParameters;
+
+/** An instance of this class provides access to all the operations defined in DeploymentsClient. */
+public interface DeploymentsClient {
+ /**
+ * Get the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 Nginx deployment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxDeploymentInner getByResourceGroup(String resourceGroupName, String deploymentName);
+
+ /**
+ * Get the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 Nginx deployment along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String deploymentName, Context context);
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body parameter.
+ * @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, NginxDeploymentInner> beginCreate(
+ String resourceGroupName, String deploymentName, NginxDeploymentInner body);
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body parameter.
+ * @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, NginxDeploymentInner> beginCreate(
+ String resourceGroupName, String deploymentName, NginxDeploymentInner body, Context context);
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxDeploymentInner create(String resourceGroupName, String deploymentName, NginxDeploymentInner body);
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxDeploymentInner create(String resourceGroupName, String deploymentName);
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxDeploymentInner create(
+ String resourceGroupName, String deploymentName, NginxDeploymentInner body, Context context);
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body parameter.
+ * @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, NginxDeploymentInner> beginUpdate(
+ String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body);
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body parameter.
+ * @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, NginxDeploymentInner> beginUpdate(
+ String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body, Context context);
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxDeploymentInner update(String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body);
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxDeploymentInner update(String resourceGroupName, String deploymentName);
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NginxDeploymentInner update(
+ String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body, Context context);
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName);
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName, Context context);
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName);
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName, Context context);
+
+ /**
+ * List the Nginx deployments resources.
+ *
+ * @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 paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List the Nginx deployments resources.
+ *
+ * @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 paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * List all Nginx deployments under the specified 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 paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List all Nginx deployments under the specified 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 paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/NginxManagementClient.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/NginxManagementClient.java
new file mode 100644
index 000000000000..e24d2ad31db5
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/NginxManagementClient.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for NginxManagementClient class. */
+public interface NginxManagementClient {
+ /**
+ * 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 CertificatesClient object to access its operations.
+ *
+ * @return the CertificatesClient object.
+ */
+ CertificatesClient getCertificates();
+
+ /**
+ * Gets the ConfigurationsClient object to access its operations.
+ *
+ * @return the ConfigurationsClient object.
+ */
+ ConfigurationsClient getConfigurations();
+
+ /**
+ * Gets the DeploymentsClient object to access its operations.
+ *
+ * @return the DeploymentsClient object.
+ */
+ DeploymentsClient getDeployments();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/OperationsClient.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/OperationsClient.java
new file mode 100644
index 000000000000..cb80aa2a2251
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/OperationsClient.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.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.nginx.fluent.models.OperationResultInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * List all operations provided by Nginx.NginxPlus for the 2021-05-01-preview api version.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of GET request to list Nginx.NginxPlus operations as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List all operations provided by Nginx.NginxPlus for the 2021-05-01-preview api version.
+ *
+ * @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 result of GET request to list Nginx.NginxPlus operations as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxCertificateInner.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxCertificateInner.java
new file mode 100644
index 000000000000..e328c36cf85f
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxCertificateInner.java
@@ -0,0 +1,82 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.nginx.models.NginxCertificateProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The NginxCertificate model. */
+@Fluent
+public final class NginxCertificateInner extends Resource {
+ /*
+ * The properties property.
+ */
+ @JsonProperty(value = "properties")
+ private NginxCertificateProperties properties;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the properties property: The properties property.
+ *
+ * @return the properties value.
+ */
+ public NginxCertificateProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The properties property.
+ *
+ * @param properties the properties value to set.
+ * @return the NginxCertificateInner object itself.
+ */
+ public NginxCertificateInner withProperties(NginxCertificateProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public NginxCertificateInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public NginxCertificateInner 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();
+ }
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxConfigurationInner.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxConfigurationInner.java
new file mode 100644
index 000000000000..c768f162dcae
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxConfigurationInner.java
@@ -0,0 +1,82 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.nginx.models.NginxConfigurationProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The NginxConfiguration model. */
+@Fluent
+public final class NginxConfigurationInner extends Resource {
+ /*
+ * The properties property.
+ */
+ @JsonProperty(value = "properties")
+ private NginxConfigurationProperties properties;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the properties property: The properties property.
+ *
+ * @return the properties value.
+ */
+ public NginxConfigurationProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The properties property.
+ *
+ * @param properties the properties value to set.
+ * @return the NginxConfigurationInner object itself.
+ */
+ public NginxConfigurationInner withProperties(NginxConfigurationProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public NginxConfigurationInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public NginxConfigurationInner 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();
+ }
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentInner.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentInner.java
new file mode 100644
index 000000000000..92541df0ccf5
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentInner.java
@@ -0,0 +1,142 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.nginx.models.IdentityProperties;
+import com.azure.resourcemanager.nginx.models.NginxDeploymentProperties;
+import com.azure.resourcemanager.nginx.models.ResourceSku;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The NginxDeployment model. */
+@Fluent
+public final class NginxDeploymentInner extends Resource {
+ /*
+ * The identity property.
+ */
+ @JsonProperty(value = "identity")
+ private IdentityProperties identity;
+
+ /*
+ * The properties property.
+ */
+ @JsonProperty(value = "properties")
+ private NginxDeploymentProperties properties;
+
+ /*
+ * The sku property.
+ */
+ @JsonProperty(value = "sku")
+ private ResourceSku sku;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the identity property: The identity property.
+ *
+ * @return the identity value.
+ */
+ public IdentityProperties identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The identity property.
+ *
+ * @param identity the identity value to set.
+ * @return the NginxDeploymentInner object itself.
+ */
+ public NginxDeploymentInner withIdentity(IdentityProperties identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the properties property: The properties property.
+ *
+ * @return the properties value.
+ */
+ public NginxDeploymentProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The properties property.
+ *
+ * @param properties the properties value to set.
+ * @return the NginxDeploymentInner object itself.
+ */
+ public NginxDeploymentInner withProperties(NginxDeploymentProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the sku property: The sku property.
+ *
+ * @return the sku value.
+ */
+ public ResourceSku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The sku property.
+ *
+ * @param sku the sku value to set.
+ * @return the NginxDeploymentInner object itself.
+ */
+ public NginxDeploymentInner withSku(ResourceSku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public NginxDeploymentInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public NginxDeploymentInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
+ if (properties() != null) {
+ properties().validate();
+ }
+ if (sku() != null) {
+ sku().validate();
+ }
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/OperationResultInner.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/OperationResultInner.java
new file mode 100644
index 000000000000..f1e0386770f9
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/OperationResultInner.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.nginx.models.OperationDisplay;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A Nginx.NginxPlus REST API operation. */
+@Fluent
+public final class OperationResultInner {
+ /*
+ * Operation name: {provider}/{resource}/{operation}
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * The object that represents the operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /*
+ * Indicates whether the operation is a data action
+ */
+ @JsonProperty(value = "isDataAction")
+ private Boolean isDataAction;
+
+ /**
+ * Get the name property: Operation name: {provider}/{resource}/{operation}.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Operation name: {provider}/{resource}/{operation}.
+ *
+ * @param name the name value to set.
+ * @return the OperationResultInner object itself.
+ */
+ public OperationResultInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the display property: The object that represents the operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: The object that represents the operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationResultInner object itself.
+ */
+ public OperationResultInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the isDataAction property: Indicates whether the operation is a data action.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Set the isDataAction property: Indicates whether the operation is a data action.
+ *
+ * @param isDataAction the isDataAction value to set.
+ * @return the OperationResultInner object itself.
+ */
+ public OperationResultInner withIsDataAction(Boolean isDataAction) {
+ this.isDataAction = isDataAction;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/package-info.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/package-info.java
new file mode 100644
index 000000000000..7cba885b86c2
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/package-info.java
@@ -0,0 +1,6 @@
+// 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 NginxManagementClient. null. */
+package com.azure.resourcemanager.nginx.fluent.models;
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/package-info.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/package-info.java
new file mode 100644
index 000000000000..4db0ff3a08b3
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/package-info.java
@@ -0,0 +1,6 @@
+// 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 NginxManagementClient. null. */
+package com.azure.resourcemanager.nginx.fluent;
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesClientImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesClientImpl.java
new file mode 100644
index 000000000000..a8ea3e272f6b
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesClientImpl.java
@@ -0,0 +1,1137 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.nginx.fluent.CertificatesClient;
+import com.azure.resourcemanager.nginx.fluent.models.NginxCertificateInner;
+import com.azure.resourcemanager.nginx.models.NginxCertificateListResponse;
+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 CertificatesClient. */
+public final class CertificatesClientImpl implements CertificatesClient {
+ /** The proxy service used to perform REST calls. */
+ private final CertificatesService service;
+
+ /** The service client containing this operation class. */
+ private final NginxManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CertificatesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CertificatesClientImpl(NginxManagementClientImpl client) {
+ this.service =
+ RestProxy.create(CertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for NginxManagementClientCertificates to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "NginxManagementClien")
+ private interface CertificatesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus"
+ + "/nginxDeployments/{deploymentName}/certificates/{certificateName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("deploymentName") String deploymentName,
+ @PathParam("certificateName") String certificateName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus"
+ + "/nginxDeployments/{deploymentName}/certificates/{certificateName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("deploymentName") String deploymentName,
+ @PathParam("certificateName") String certificateName,
+ @BodyParam("application/json") NginxCertificateInner body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus"
+ + "/nginxDeployments/{deploymentName}/certificates/{certificateName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("deploymentName") String deploymentName,
+ @PathParam("certificateName") String certificateName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus"
+ + "/nginxDeployments/{deploymentName}/certificates")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("deploymentName") String deploymentName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get a certificate of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 certificate of given Nginx deployment along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String deploymentName, String certificateName) {
+ 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ certificateName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a certificate of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 certificate of given Nginx deployment along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String deploymentName, String certificateName, 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ certificateName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a certificate of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 certificate of given Nginx deployment on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String deploymentName, String certificateName) {
+ return getWithResponseAsync(resourceGroupName, deploymentName, certificateName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a certificate of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 certificate of given Nginx deployment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxCertificateInner get(String resourceGroupName, String deploymentName, String certificateName) {
+ return getAsync(resourceGroupName, deploymentName, certificateName).block();
+ }
+
+ /**
+ * Get a certificate of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 certificate of given Nginx deployment along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String deploymentName, String certificateName, Context context) {
+ return getWithResponseAsync(resourceGroupName, deploymentName, certificateName, context).block();
+ }
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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 body along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String deploymentName, String certificateName, NginxCertificateInner 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ certificateName,
+ body,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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 body along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String deploymentName,
+ String certificateName,
+ NginxCertificateInner 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ certificateName,
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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, NginxCertificateInner> beginCreateAsync(
+ String resourceGroupName, String deploymentName, String certificateName, NginxCertificateInner body) {
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, deploymentName, certificateName, body);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ NginxCertificateInner.class,
+ NginxCertificateInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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, NginxCertificateInner> beginCreateAsync(
+ String resourceGroupName,
+ String deploymentName,
+ String certificateName,
+ NginxCertificateInner body,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, deploymentName, certificateName, body, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), NginxCertificateInner.class, NginxCertificateInner.class, context);
+ }
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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, NginxCertificateInner> beginCreate(
+ String resourceGroupName, String deploymentName, String certificateName, NginxCertificateInner body) {
+ return beginCreateAsync(resourceGroupName, deploymentName, certificateName, body).getSyncPoller();
+ }
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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, NginxCertificateInner> beginCreate(
+ String resourceGroupName,
+ String deploymentName,
+ String certificateName,
+ NginxCertificateInner body,
+ Context context) {
+ return beginCreateAsync(resourceGroupName, deploymentName, certificateName, body, context).getSyncPoller();
+ }
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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 body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String deploymentName, String certificateName, NginxCertificateInner body) {
+ return beginCreateAsync(resourceGroupName, deploymentName, certificateName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String deploymentName, String certificateName) {
+ final NginxCertificateInner body = null;
+ return beginCreateAsync(resourceGroupName, deploymentName, certificateName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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 body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String deploymentName,
+ String certificateName,
+ NginxCertificateInner body,
+ Context context) {
+ return beginCreateAsync(resourceGroupName, deploymentName, certificateName, body, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxCertificateInner create(
+ String resourceGroupName, String deploymentName, String certificateName, NginxCertificateInner body) {
+ return createAsync(resourceGroupName, deploymentName, certificateName, body).block();
+ }
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxCertificateInner create(String resourceGroupName, String deploymentName, String certificateName) {
+ final NginxCertificateInner body = null;
+ return createAsync(resourceGroupName, deploymentName, certificateName, body).block();
+ }
+
+ /**
+ * Create or update the Nginx certificates for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @param body The certificate.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxCertificateInner create(
+ String resourceGroupName,
+ String deploymentName,
+ String certificateName,
+ NginxCertificateInner body,
+ Context context) {
+ return createAsync(resourceGroupName, deploymentName, certificateName, body, context).block();
+ }
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName) {
+ 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ certificateName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName, 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ certificateName,
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, deploymentName, certificateName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, deploymentName, certificateName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName) {
+ return beginDeleteAsync(resourceGroupName, deploymentName, certificateName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName, Context context) {
+ return beginDeleteAsync(resourceGroupName, deploymentName, certificateName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName) {
+ return beginDeleteAsync(resourceGroupName, deploymentName, certificateName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName, Context context) {
+ return beginDeleteAsync(resourceGroupName, deploymentName, certificateName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName) {
+ deleteAsync(resourceGroupName, deploymentName, certificateName).block();
+ }
+
+ /**
+ * Deletes a certificate from the nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param certificateName The name of certificate.
+ * @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 deploymentName, String certificateName, Context context) {
+ deleteAsync(resourceGroupName, deploymentName, certificateName, context).block();
+ }
+
+ /**
+ * List all certificates of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String deploymentName) {
+ 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List all certificates of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String deploymentName, 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List all certificates of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String deploymentName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, deploymentName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all certificates of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String deploymentName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, deploymentName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List all certificates of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String deploymentName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, deploymentName));
+ }
+
+ /**
+ * List all certificates of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String deploymentName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, deploymentName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesImpl.java
new file mode 100644
index 000000000000..9161c3858265
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesImpl.java
@@ -0,0 +1,196 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.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.nginx.fluent.CertificatesClient;
+import com.azure.resourcemanager.nginx.fluent.models.NginxCertificateInner;
+import com.azure.resourcemanager.nginx.models.Certificates;
+import com.azure.resourcemanager.nginx.models.NginxCertificate;
+
+public final class CertificatesImpl implements Certificates {
+ private static final ClientLogger LOGGER = new ClientLogger(CertificatesImpl.class);
+
+ private final CertificatesClient innerClient;
+
+ private final com.azure.resourcemanager.nginx.NginxManager serviceManager;
+
+ public CertificatesImpl(
+ CertificatesClient innerClient, com.azure.resourcemanager.nginx.NginxManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public NginxCertificate get(String resourceGroupName, String deploymentName, String certificateName) {
+ NginxCertificateInner inner = this.serviceClient().get(resourceGroupName, deploymentName, certificateName);
+ if (inner != null) {
+ return new NginxCertificateImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String deploymentName, String certificateName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, deploymentName, certificateName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new NginxCertificateImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String deploymentName, String certificateName) {
+ this.serviceClient().delete(resourceGroupName, deploymentName, certificateName);
+ }
+
+ public void delete(String resourceGroupName, String deploymentName, String certificateName, Context context) {
+ this.serviceClient().delete(resourceGroupName, deploymentName, certificateName, context);
+ }
+
+ public PagedIterable list(String resourceGroupName, String deploymentName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, deploymentName);
+ return Utils.mapPage(inner, inner1 -> new NginxCertificateImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String deploymentName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, deploymentName, context);
+ return Utils.mapPage(inner, inner1 -> new NginxCertificateImpl(inner1, this.manager()));
+ }
+
+ public NginxCertificate 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 deploymentName = Utils.getValueFromIdByName(id, "nginxDeployments");
+ if (deploymentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id)));
+ }
+ String certificateName = Utils.getValueFromIdByName(id, "certificates");
+ if (certificateName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, deploymentName, certificateName, 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 deploymentName = Utils.getValueFromIdByName(id, "nginxDeployments");
+ if (deploymentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id)));
+ }
+ String certificateName = Utils.getValueFromIdByName(id, "certificates");
+ if (certificateName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, deploymentName, certificateName, 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 deploymentName = Utils.getValueFromIdByName(id, "nginxDeployments");
+ if (deploymentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id)));
+ }
+ String certificateName = Utils.getValueFromIdByName(id, "certificates");
+ if (certificateName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
+ }
+ this.delete(resourceGroupName, deploymentName, certificateName, 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 deploymentName = Utils.getValueFromIdByName(id, "nginxDeployments");
+ if (deploymentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id)));
+ }
+ String certificateName = Utils.getValueFromIdByName(id, "certificates");
+ if (certificateName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
+ }
+ this.delete(resourceGroupName, deploymentName, certificateName, context);
+ }
+
+ private CertificatesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.nginx.NginxManager manager() {
+ return this.serviceManager;
+ }
+
+ public NginxCertificateImpl define(String name) {
+ return new NginxCertificateImpl(name, this.manager());
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsClientImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsClientImpl.java
new file mode 100644
index 000000000000..177bc2bc8be3
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsClientImpl.java
@@ -0,0 +1,1171 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.nginx.fluent.ConfigurationsClient;
+import com.azure.resourcemanager.nginx.fluent.models.NginxConfigurationInner;
+import com.azure.resourcemanager.nginx.models.NginxConfigurationListResponse;
+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 ConfigurationsClient. */
+public final class ConfigurationsClientImpl implements ConfigurationsClient {
+ /** The proxy service used to perform REST calls. */
+ private final ConfigurationsService service;
+
+ /** The service client containing this operation class. */
+ private final NginxManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ConfigurationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ConfigurationsClientImpl(NginxManagementClientImpl client) {
+ this.service =
+ RestProxy.create(ConfigurationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for NginxManagementClientConfigurations to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "NginxManagementClien")
+ private interface ConfigurationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus"
+ + "/nginxDeployments/{deploymentName}/configurations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("deploymentName") String deploymentName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus"
+ + "/nginxDeployments/{deploymentName}/configurations/{configurationName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("deploymentName") String deploymentName,
+ @PathParam("configurationName") String configurationName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus"
+ + "/nginxDeployments/{deploymentName}/configurations/{configurationName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("deploymentName") String deploymentName,
+ @PathParam("configurationName") String configurationName,
+ @BodyParam("application/json") NginxConfigurationInner body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus"
+ + "/nginxDeployments/{deploymentName}/configurations/{configurationName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("deploymentName") String deploymentName,
+ @PathParam("configurationName") String configurationName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String deploymentName) {
+ 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String deploymentName, 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 response of a list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String deploymentName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, deploymentName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 response of a list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String deploymentName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, deploymentName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 response of a list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String deploymentName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, deploymentName));
+ }
+
+ /**
+ * List the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 response of a list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName, String deploymentName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, deploymentName, context));
+ }
+
+ /**
+ * Get the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 Nginx configuration of given Nginx deployment along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String deploymentName, String configurationName) {
+ 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ configurationName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 Nginx configuration of given Nginx deployment along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String deploymentName, String configurationName, 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ configurationName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 Nginx configuration of given Nginx deployment on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String deploymentName, String configurationName) {
+ return getWithResponseAsync(resourceGroupName, deploymentName, configurationName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 Nginx configuration of given Nginx deployment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxConfigurationInner get(String resourceGroupName, String deploymentName, String configurationName) {
+ return getAsync(resourceGroupName, deploymentName, configurationName).block();
+ }
+
+ /**
+ * Get the Nginx configuration of given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 Nginx configuration of given Nginx deployment along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String deploymentName, String configurationName, Context context) {
+ return getWithResponseAsync(resourceGroupName, deploymentName, configurationName, context).block();
+ }
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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 body along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String deploymentName, String configurationName, NginxConfigurationInner 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ configurationName,
+ body,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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 body along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String deploymentName,
+ String configurationName,
+ NginxConfigurationInner 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ configurationName,
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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, NginxConfigurationInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String deploymentName, String configurationName, NginxConfigurationInner body) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, deploymentName, configurationName, body);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ NginxConfigurationInner.class,
+ NginxConfigurationInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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, NginxConfigurationInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String deploymentName,
+ String configurationName,
+ NginxConfigurationInner body,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, deploymentName, configurationName, body, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ NginxConfigurationInner.class,
+ NginxConfigurationInner.class,
+ context);
+ }
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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, NginxConfigurationInner> beginCreateOrUpdate(
+ String resourceGroupName, String deploymentName, String configurationName, NginxConfigurationInner body) {
+ return beginCreateOrUpdateAsync(resourceGroupName, deploymentName, configurationName, body).getSyncPoller();
+ }
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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, NginxConfigurationInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String deploymentName,
+ String configurationName,
+ NginxConfigurationInner body,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, deploymentName, configurationName, body, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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 body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String deploymentName, String configurationName, NginxConfigurationInner body) {
+ return beginCreateOrUpdateAsync(resourceGroupName, deploymentName, configurationName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String deploymentName, String configurationName) {
+ final NginxConfigurationInner body = null;
+ return beginCreateOrUpdateAsync(resourceGroupName, deploymentName, configurationName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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 body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String deploymentName,
+ String configurationName,
+ NginxConfigurationInner body,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, deploymentName, configurationName, body, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxConfigurationInner createOrUpdate(
+ String resourceGroupName, String deploymentName, String configurationName, NginxConfigurationInner body) {
+ return createOrUpdateAsync(resourceGroupName, deploymentName, configurationName, body).block();
+ }
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxConfigurationInner createOrUpdate(
+ String resourceGroupName, String deploymentName, String configurationName) {
+ final NginxConfigurationInner body = null;
+ return createOrUpdateAsync(resourceGroupName, deploymentName, configurationName, body).block();
+ }
+
+ /**
+ * Create or update the Nginx configuration for given Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @param body The Nginx configuration.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxConfigurationInner createOrUpdate(
+ String resourceGroupName,
+ String deploymentName,
+ String configurationName,
+ NginxConfigurationInner body,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, deploymentName, configurationName, body, context).block();
+ }
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName) {
+ 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ configurationName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName, 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ configurationName,
+ accept,
+ context);
+ }
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, deploymentName, configurationName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, deploymentName, configurationName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName) {
+ return beginDeleteAsync(resourceGroupName, deploymentName, configurationName).getSyncPoller();
+ }
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName, Context context) {
+ return beginDeleteAsync(resourceGroupName, deploymentName, configurationName, context).getSyncPoller();
+ }
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName) {
+ return beginDeleteAsync(resourceGroupName, deploymentName, configurationName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName, Context context) {
+ return beginDeleteAsync(resourceGroupName, deploymentName, configurationName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName) {
+ deleteAsync(resourceGroupName, deploymentName, configurationName).block();
+ }
+
+ /**
+ * Reset the Nginx configuration of given Nginx deployment to default.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
+ * Nginx conf.
+ * @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 deploymentName, String configurationName, Context context) {
+ deleteAsync(resourceGroupName, deploymentName, configurationName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsImpl.java
new file mode 100644
index 000000000000..4221b92bbb3a
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsImpl.java
@@ -0,0 +1,200 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.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.nginx.fluent.ConfigurationsClient;
+import com.azure.resourcemanager.nginx.fluent.models.NginxConfigurationInner;
+import com.azure.resourcemanager.nginx.models.Configurations;
+import com.azure.resourcemanager.nginx.models.NginxConfiguration;
+
+public final class ConfigurationsImpl implements Configurations {
+ private static final ClientLogger LOGGER = new ClientLogger(ConfigurationsImpl.class);
+
+ private final ConfigurationsClient innerClient;
+
+ private final com.azure.resourcemanager.nginx.NginxManager serviceManager;
+
+ public ConfigurationsImpl(
+ ConfigurationsClient innerClient, com.azure.resourcemanager.nginx.NginxManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String deploymentName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, deploymentName);
+ return Utils.mapPage(inner, inner1 -> new NginxConfigurationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String deploymentName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, deploymentName, context);
+ return Utils.mapPage(inner, inner1 -> new NginxConfigurationImpl(inner1, this.manager()));
+ }
+
+ public NginxConfiguration get(String resourceGroupName, String deploymentName, String configurationName) {
+ NginxConfigurationInner inner = this.serviceClient().get(resourceGroupName, deploymentName, configurationName);
+ if (inner != null) {
+ return new NginxConfigurationImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String deploymentName, String configurationName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, deploymentName, configurationName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new NginxConfigurationImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String deploymentName, String configurationName) {
+ this.serviceClient().delete(resourceGroupName, deploymentName, configurationName);
+ }
+
+ public void delete(String resourceGroupName, String deploymentName, String configurationName, Context context) {
+ this.serviceClient().delete(resourceGroupName, deploymentName, configurationName, context);
+ }
+
+ public NginxConfiguration 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 deploymentName = Utils.getValueFromIdByName(id, "nginxDeployments");
+ if (deploymentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id)));
+ }
+ String configurationName = Utils.getValueFromIdByName(id, "configurations");
+ if (configurationName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, deploymentName, configurationName, 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 deploymentName = Utils.getValueFromIdByName(id, "nginxDeployments");
+ if (deploymentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id)));
+ }
+ String configurationName = Utils.getValueFromIdByName(id, "configurations");
+ if (configurationName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, deploymentName, configurationName, 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 deploymentName = Utils.getValueFromIdByName(id, "nginxDeployments");
+ if (deploymentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id)));
+ }
+ String configurationName = Utils.getValueFromIdByName(id, "configurations");
+ if (configurationName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id)));
+ }
+ this.delete(resourceGroupName, deploymentName, configurationName, 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 deploymentName = Utils.getValueFromIdByName(id, "nginxDeployments");
+ if (deploymentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id)));
+ }
+ String configurationName = Utils.getValueFromIdByName(id, "configurations");
+ if (configurationName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id)));
+ }
+ this.delete(resourceGroupName, deploymentName, configurationName, context);
+ }
+
+ private ConfigurationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.nginx.NginxManager manager() {
+ return this.serviceManager;
+ }
+
+ public NginxConfigurationImpl define(String name) {
+ return new NginxConfigurationImpl(name, this.manager());
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsClientImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsClientImpl.java
new file mode 100644
index 000000000000..ea242555a2dc
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsClientImpl.java
@@ -0,0 +1,1552 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.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.nginx.fluent.DeploymentsClient;
+import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentInner;
+import com.azure.resourcemanager.nginx.models.NginxDeploymentListResponse;
+import com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateParameters;
+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 DeploymentsClient. */
+public final class DeploymentsClientImpl implements DeploymentsClient {
+ /** The proxy service used to perform REST calls. */
+ private final DeploymentsService service;
+
+ /** The service client containing this operation class. */
+ private final NginxManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DeploymentsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DeploymentsClientImpl(NginxManagementClientImpl client) {
+ this.service =
+ RestProxy.create(DeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for NginxManagementClientDeployments to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "NginxManagementClien")
+ private interface DeploymentsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus"
+ + "/nginxDeployments/{deploymentName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("deploymentName") String deploymentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus"
+ + "/nginxDeployments/{deploymentName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("deploymentName") String deploymentName,
+ @BodyParam("application/json") NginxDeploymentInner body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus"
+ + "/nginxDeployments/{deploymentName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("deploymentName") String deploymentName,
+ @BodyParam("application/json") NginxDeploymentUpdateParameters body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus"
+ + "/nginxDeployments/{deploymentName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("deploymentName") String deploymentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Nginx.NginxPlus/nginxDeployments")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus"
+ + "/nginxDeployments")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @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> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 Nginx deployment along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String deploymentName) {
+ 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 Nginx deployment along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String deploymentName, 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 Nginx deployment on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String deploymentName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, deploymentName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 Nginx deployment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxDeploymentInner getByResourceGroup(String resourceGroupName, String deploymentName) {
+ return getByResourceGroupAsync(resourceGroupName, deploymentName).block();
+ }
+
+ /**
+ * Get the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 Nginx deployment along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String deploymentName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, deploymentName, context).block();
+ }
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 body along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String deploymentName, NginxDeploymentInner 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ body,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 body along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String deploymentName, NginxDeploymentInner 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, NginxDeploymentInner> beginCreateAsync(
+ String resourceGroupName, String deploymentName, NginxDeploymentInner body) {
+ Mono>> mono = createWithResponseAsync(resourceGroupName, deploymentName, body);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ NginxDeploymentInner.class,
+ NginxDeploymentInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, NginxDeploymentInner> beginCreateAsync(
+ String resourceGroupName, String deploymentName, NginxDeploymentInner body, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, deploymentName, body, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), NginxDeploymentInner.class, NginxDeploymentInner.class, context);
+ }
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, NginxDeploymentInner> beginCreate(
+ String resourceGroupName, String deploymentName, NginxDeploymentInner body) {
+ return beginCreateAsync(resourceGroupName, deploymentName, body).getSyncPoller();
+ }
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, NginxDeploymentInner> beginCreate(
+ String resourceGroupName, String deploymentName, NginxDeploymentInner body, Context context) {
+ return beginCreateAsync(resourceGroupName, deploymentName, body, context).getSyncPoller();
+ }
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String deploymentName, NginxDeploymentInner body) {
+ return beginCreateAsync(resourceGroupName, deploymentName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String deploymentName) {
+ final NginxDeploymentInner body = null;
+ return beginCreateAsync(resourceGroupName, deploymentName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String deploymentName, NginxDeploymentInner body, Context context) {
+ return beginCreateAsync(resourceGroupName, deploymentName, body, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxDeploymentInner create(String resourceGroupName, String deploymentName, NginxDeploymentInner body) {
+ return createAsync(resourceGroupName, deploymentName, body).block();
+ }
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxDeploymentInner create(String resourceGroupName, String deploymentName) {
+ final NginxDeploymentInner body = null;
+ return createAsync(resourceGroupName, deploymentName, body).block();
+ }
+
+ /**
+ * Create or update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxDeploymentInner create(
+ String resourceGroupName, String deploymentName, NginxDeploymentInner body, Context context) {
+ return createAsync(resourceGroupName, deploymentName, body, context).block();
+ }
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 body along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ body,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 body along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, NginxDeploymentInner> beginUpdateAsync(
+ String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body) {
+ Mono>> mono = updateWithResponseAsync(resourceGroupName, deploymentName, body);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ NginxDeploymentInner.class,
+ NginxDeploymentInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, NginxDeploymentInner> beginUpdateAsync(
+ String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, deploymentName, body, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), NginxDeploymentInner.class, NginxDeploymentInner.class, context);
+ }
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, NginxDeploymentInner> beginUpdate(
+ String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body) {
+ return beginUpdateAsync(resourceGroupName, deploymentName, body).getSyncPoller();
+ }
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, NginxDeploymentInner> beginUpdate(
+ String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body, Context context) {
+ return beginUpdateAsync(resourceGroupName, deploymentName, body, context).getSyncPoller();
+ }
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body) {
+ return beginUpdateAsync(resourceGroupName, deploymentName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String deploymentName) {
+ final NginxDeploymentUpdateParameters body = null;
+ return beginUpdateAsync(resourceGroupName, deploymentName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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 body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body, Context context) {
+ return beginUpdateAsync(resourceGroupName, deploymentName, body, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxDeploymentInner update(
+ String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body) {
+ return updateAsync(resourceGroupName, deploymentName, body).block();
+ }
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxDeploymentInner update(String resourceGroupName, String deploymentName) {
+ final NginxDeploymentUpdateParameters body = null;
+ return updateAsync(resourceGroupName, deploymentName, body).block();
+ }
+
+ /**
+ * Update the Nginx deployment.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @param body The body 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NginxDeploymentInner update(
+ String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body, Context context) {
+ return updateAsync(resourceGroupName, deploymentName, body, context).block();
+ }
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName) {
+ 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName, 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 (deploymentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ deploymentName,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, deploymentName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, deploymentName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName) {
+ return beginDeleteAsync(resourceGroupName, deploymentName).getSyncPoller();
+ }
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName, Context context) {
+ return beginDeleteAsync(resourceGroupName, deploymentName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName) {
+ return beginDeleteAsync(resourceGroupName, deploymentName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName, Context context) {
+ return beginDeleteAsync(resourceGroupName, deploymentName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName) {
+ deleteAsync(resourceGroupName, deploymentName).block();
+ }
+
+ /**
+ * Delete the Nginx deployment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param deploymentName The name of targeted Nginx deployment.
+ * @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 deploymentName, Context context) {
+ deleteAsync(resourceGroupName, deploymentName, context).block();
+ }
+
+ /**
+ * List the Nginx deployments resources.
+ *
+ * @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 body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List the Nginx deployments resources.
+ *
+ * @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 body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getSubscriptionId(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List the Nginx deployments resources.
+ *
+ * @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 paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the Nginx deployments resources.
+ *
+ * @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 paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the Nginx deployments resources.
+ *
+ * @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 paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List the Nginx deployments resources.
+ *
+ * @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 paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * List all Nginx deployments under the specified 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 body 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.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 all Nginx deployments under the specified 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 body 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.getSubscriptionId(), resourceGroupName, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List all Nginx deployments under the specified 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 paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all Nginx deployments under the specified 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 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 all Nginx deployments under the specified 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 paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List all Nginx deployments under the specified 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 paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body 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 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 body 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/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsImpl.java
new file mode 100644
index 000000000000..cbc7f17cfc1f
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsImpl.java
@@ -0,0 +1,177 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.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.nginx.fluent.DeploymentsClient;
+import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentInner;
+import com.azure.resourcemanager.nginx.models.Deployments;
+import com.azure.resourcemanager.nginx.models.NginxDeployment;
+
+public final class DeploymentsImpl implements Deployments {
+ private static final ClientLogger LOGGER = new ClientLogger(DeploymentsImpl.class);
+
+ private final DeploymentsClient innerClient;
+
+ private final com.azure.resourcemanager.nginx.NginxManager serviceManager;
+
+ public DeploymentsImpl(DeploymentsClient innerClient, com.azure.resourcemanager.nginx.NginxManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public NginxDeployment getByResourceGroup(String resourceGroupName, String deploymentName) {
+ NginxDeploymentInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, deploymentName);
+ if (inner != null) {
+ return new NginxDeploymentImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String deploymentName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, deploymentName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new NginxDeploymentImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String deploymentName) {
+ this.serviceClient().delete(resourceGroupName, deploymentName);
+ }
+
+ public void delete(String resourceGroupName, String deploymentName, Context context) {
+ this.serviceClient().delete(resourceGroupName, deploymentName, context);
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new NginxDeploymentImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new NginxDeploymentImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new NginxDeploymentImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new NginxDeploymentImpl(inner1, this.manager()));
+ }
+
+ public NginxDeployment 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 deploymentName = Utils.getValueFromIdByName(id, "nginxDeployments");
+ if (deploymentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, deploymentName, 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 deploymentName = Utils.getValueFromIdByName(id, "nginxDeployments");
+ if (deploymentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, deploymentName, 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 deploymentName = Utils.getValueFromIdByName(id, "nginxDeployments");
+ if (deploymentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id)));
+ }
+ this.delete(resourceGroupName, deploymentName, 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 deploymentName = Utils.getValueFromIdByName(id, "nginxDeployments");
+ if (deploymentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id)));
+ }
+ this.delete(resourceGroupName, deploymentName, context);
+ }
+
+ private DeploymentsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.nginx.NginxManager manager() {
+ return this.serviceManager;
+ }
+
+ public NginxDeploymentImpl define(String name) {
+ return new NginxDeploymentImpl(name, this.manager());
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxCertificateImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxCertificateImpl.java
new file mode 100644
index 000000000000..bb68ff852830
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxCertificateImpl.java
@@ -0,0 +1,151 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.nginx.fluent.models.NginxCertificateInner;
+import com.azure.resourcemanager.nginx.models.NginxCertificate;
+import com.azure.resourcemanager.nginx.models.NginxCertificateProperties;
+import java.util.Collections;
+import java.util.Map;
+
+public final class NginxCertificateImpl implements NginxCertificate, NginxCertificate.Definition {
+ private NginxCertificateInner innerObject;
+
+ private final com.azure.resourcemanager.nginx.NginxManager serviceManager;
+
+ NginxCertificateImpl(
+ NginxCertificateInner innerObject, com.azure.resourcemanager.nginx.NginxManager 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 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 NginxCertificateProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public NginxCertificateInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.nginx.NginxManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String deploymentName;
+
+ private String certificateName;
+
+ public NginxCertificateImpl withExistingNginxDeployment(String resourceGroupName, String deploymentName) {
+ this.resourceGroupName = resourceGroupName;
+ this.deploymentName = deploymentName;
+ return this;
+ }
+
+ public NginxCertificate create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCertificates()
+ .create(resourceGroupName, deploymentName, certificateName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public NginxCertificate create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCertificates()
+ .create(resourceGroupName, deploymentName, certificateName, this.innerModel(), context);
+ return this;
+ }
+
+ NginxCertificateImpl(String name, com.azure.resourcemanager.nginx.NginxManager serviceManager) {
+ this.innerObject = new NginxCertificateInner();
+ this.serviceManager = serviceManager;
+ this.certificateName = name;
+ }
+
+ public NginxCertificate refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCertificates()
+ .getWithResponse(resourceGroupName, deploymentName, certificateName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public NginxCertificate refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCertificates()
+ .getWithResponse(resourceGroupName, deploymentName, certificateName, context)
+ .getValue();
+ return this;
+ }
+
+ public NginxCertificateImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public NginxCertificateImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public NginxCertificateImpl withTags(Map tags) {
+ this.innerModel().withTags(tags);
+ return this;
+ }
+
+ public NginxCertificateImpl withProperties(NginxCertificateProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxConfigurationImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxConfigurationImpl.java
new file mode 100644
index 000000000000..bfed32cb0571
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxConfigurationImpl.java
@@ -0,0 +1,181 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.nginx.fluent.models.NginxConfigurationInner;
+import com.azure.resourcemanager.nginx.models.NginxConfiguration;
+import com.azure.resourcemanager.nginx.models.NginxConfigurationProperties;
+import java.util.Collections;
+import java.util.Map;
+
+public final class NginxConfigurationImpl
+ implements NginxConfiguration, NginxConfiguration.Definition, NginxConfiguration.Update {
+ private NginxConfigurationInner innerObject;
+
+ private final com.azure.resourcemanager.nginx.NginxManager 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 NginxConfigurationProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ 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 NginxConfigurationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.nginx.NginxManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String deploymentName;
+
+ private String configurationName;
+
+ public NginxConfigurationImpl withExistingNginxDeployment(String resourceGroupName, String deploymentName) {
+ this.resourceGroupName = resourceGroupName;
+ this.deploymentName = deploymentName;
+ return this;
+ }
+
+ public NginxConfiguration create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .createOrUpdate(resourceGroupName, deploymentName, configurationName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public NginxConfiguration create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .createOrUpdate(resourceGroupName, deploymentName, configurationName, this.innerModel(), context);
+ return this;
+ }
+
+ NginxConfigurationImpl(String name, com.azure.resourcemanager.nginx.NginxManager serviceManager) {
+ this.innerObject = new NginxConfigurationInner();
+ this.serviceManager = serviceManager;
+ this.configurationName = name;
+ }
+
+ public NginxConfigurationImpl update() {
+ return this;
+ }
+
+ public NginxConfiguration apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .createOrUpdate(resourceGroupName, deploymentName, configurationName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public NginxConfiguration apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .createOrUpdate(resourceGroupName, deploymentName, configurationName, this.innerModel(), context);
+ return this;
+ }
+
+ NginxConfigurationImpl(
+ NginxConfigurationInner innerObject, com.azure.resourcemanager.nginx.NginxManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.deploymentName = Utils.getValueFromIdByName(innerObject.id(), "nginxDeployments");
+ this.configurationName = Utils.getValueFromIdByName(innerObject.id(), "configurations");
+ }
+
+ public NginxConfiguration refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .getWithResponse(resourceGroupName, deploymentName, configurationName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public NginxConfiguration refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .getWithResponse(resourceGroupName, deploymentName, configurationName, context)
+ .getValue();
+ return this;
+ }
+
+ public NginxConfigurationImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public NginxConfigurationImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public NginxConfigurationImpl withTags(Map tags) {
+ this.innerModel().withTags(tags);
+ return this;
+ }
+
+ public NginxConfigurationImpl withProperties(NginxConfigurationProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentImpl.java
new file mode 100644
index 000000000000..82336853947d
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentImpl.java
@@ -0,0 +1,224 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentInner;
+import com.azure.resourcemanager.nginx.models.IdentityProperties;
+import com.azure.resourcemanager.nginx.models.NginxDeployment;
+import com.azure.resourcemanager.nginx.models.NginxDeploymentProperties;
+import com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateParameters;
+import com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateProperties;
+import com.azure.resourcemanager.nginx.models.ResourceSku;
+import java.util.Collections;
+import java.util.Map;
+
+public final class NginxDeploymentImpl implements NginxDeployment, NginxDeployment.Definition, NginxDeployment.Update {
+ private NginxDeploymentInner innerObject;
+
+ private final com.azure.resourcemanager.nginx.NginxManager 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 IdentityProperties identity() {
+ return this.innerModel().identity();
+ }
+
+ public NginxDeploymentProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public ResourceSku sku() {
+ return this.innerModel().sku();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public NginxDeploymentInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.nginx.NginxManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String deploymentName;
+
+ private NginxDeploymentUpdateParameters updateBody;
+
+ public NginxDeploymentImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public NginxDeployment create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDeployments()
+ .create(resourceGroupName, deploymentName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public NginxDeployment create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDeployments()
+ .create(resourceGroupName, deploymentName, this.innerModel(), context);
+ return this;
+ }
+
+ NginxDeploymentImpl(String name, com.azure.resourcemanager.nginx.NginxManager serviceManager) {
+ this.innerObject = new NginxDeploymentInner();
+ this.serviceManager = serviceManager;
+ this.deploymentName = name;
+ }
+
+ public NginxDeploymentImpl update() {
+ this.updateBody = new NginxDeploymentUpdateParameters();
+ return this;
+ }
+
+ public NginxDeployment apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDeployments()
+ .update(resourceGroupName, deploymentName, updateBody, Context.NONE);
+ return this;
+ }
+
+ public NginxDeployment apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDeployments()
+ .update(resourceGroupName, deploymentName, updateBody, context);
+ return this;
+ }
+
+ NginxDeploymentImpl(NginxDeploymentInner innerObject, com.azure.resourcemanager.nginx.NginxManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.deploymentName = Utils.getValueFromIdByName(innerObject.id(), "nginxDeployments");
+ }
+
+ public NginxDeployment refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDeployments()
+ .getByResourceGroupWithResponse(resourceGroupName, deploymentName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public NginxDeployment refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDeployments()
+ .getByResourceGroupWithResponse(resourceGroupName, deploymentName, context)
+ .getValue();
+ return this;
+ }
+
+ public NginxDeploymentImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public NginxDeploymentImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public NginxDeploymentImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateBody.withTags(tags);
+ return this;
+ }
+ }
+
+ public NginxDeploymentImpl withIdentity(IdentityProperties identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateBody.withIdentity(identity);
+ return this;
+ }
+ }
+
+ public NginxDeploymentImpl withProperties(NginxDeploymentProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public NginxDeploymentImpl withSku(ResourceSku sku) {
+ if (isInCreateMode()) {
+ this.innerModel().withSku(sku);
+ return this;
+ } else {
+ this.updateBody.withSku(sku);
+ return this;
+ }
+ }
+
+ public NginxDeploymentImpl withProperties(NginxDeploymentUpdateProperties properties) {
+ this.updateBody.withProperties(properties);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientBuilder.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientBuilder.java
new file mode 100644
index 000000000000..bf9a762c2731
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientBuilder.java
@@ -0,0 +1,142 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.implementation;
+
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/** A builder for creating a new instance of the NginxManagementClientImpl type. */
+@ServiceClientBuilder(serviceClients = {NginxManagementClientImpl.class})
+public final class NginxManagementClientBuilder {
+ /*
+ * The ID of the target subscription.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the NginxManagementClientBuilder.
+ */
+ public NginxManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the NginxManagementClientBuilder.
+ */
+ public NginxManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the NginxManagementClientBuilder.
+ */
+ public NginxManagementClientBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the NginxManagementClientBuilder.
+ */
+ public NginxManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the NginxManagementClientBuilder.
+ */
+ public NginxManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the NginxManagementClientBuilder.
+ */
+ public NginxManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of NginxManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of NginxManagementClientImpl.
+ */
+ public NginxManagementClientImpl buildClient() {
+ if (endpoint == null) {
+ this.endpoint = "";
+ }
+ if (environment == null) {
+ this.environment = AzureEnvironment.AZURE;
+ }
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
+ if (defaultPollInterval == null) {
+ this.defaultPollInterval = Duration.ofSeconds(30);
+ }
+ if (serializerAdapter == null) {
+ this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
+ }
+ NginxManagementClientImpl client =
+ new NginxManagementClientImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientImpl.java
new file mode 100644
index 000000000000..a70f393c8224
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientImpl.java
@@ -0,0 +1,332 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.nginx.fluent.CertificatesClient;
+import com.azure.resourcemanager.nginx.fluent.ConfigurationsClient;
+import com.azure.resourcemanager.nginx.fluent.DeploymentsClient;
+import com.azure.resourcemanager.nginx.fluent.NginxManagementClient;
+import com.azure.resourcemanager.nginx.fluent.OperationsClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** Initializes a new instance of the NginxManagementClientImpl type. */
+@ServiceClient(builder = NginxManagementClientBuilder.class)
+public final class NginxManagementClientImpl implements NginxManagementClient {
+ /** The ID of the target subscription. */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /** server parameter. */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /** The HTTP pipeline to send requests through. */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /** The serializer to serialize an object into a string. */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /** The default poll interval for long-running operation. */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /** The CertificatesClient object to access its operations. */
+ private final CertificatesClient certificates;
+
+ /**
+ * Gets the CertificatesClient object to access its operations.
+ *
+ * @return the CertificatesClient object.
+ */
+ public CertificatesClient getCertificates() {
+ return this.certificates;
+ }
+
+ /** The ConfigurationsClient object to access its operations. */
+ private final ConfigurationsClient configurations;
+
+ /**
+ * Gets the ConfigurationsClient object to access its operations.
+ *
+ * @return the ConfigurationsClient object.
+ */
+ public ConfigurationsClient getConfigurations() {
+ return this.configurations;
+ }
+
+ /** The DeploymentsClient object to access its operations. */
+ private final DeploymentsClient deployments;
+
+ /**
+ * Gets the DeploymentsClient object to access its operations.
+ *
+ * @return the DeploymentsClient object.
+ */
+ public DeploymentsClient getDeployments() {
+ return this.deployments;
+ }
+
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /**
+ * Initializes an instance of NginxManagementClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId The ID of the target subscription.
+ * @param endpoint server parameter.
+ */
+ NginxManagementClientImpl(
+ HttpPipeline httpPipeline,
+ SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval,
+ AzureEnvironment environment,
+ String subscriptionId,
+ String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2021-05-01-preview";
+ this.certificates = new CertificatesClientImpl(this);
+ this.configurations = new ConfigurationsClientImpl(this);
+ this.deployments = new DeploymentsClientImpl(this);
+ this.operations = new OperationsClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(
+ Mono>> activationResponse,
+ HttpPipeline httpPipeline,
+ Type pollResultType,
+ Type finalResultType,
+ Context context) {
+ return PollerFactory
+ .create(
+ serializerAdapter,
+ httpPipeline,
+ pollResultType,
+ finalResultType,
+ defaultPollInterval,
+ activationResponse,
+ context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse =
+ new HttpResponseImpl(
+ lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError =
+ this
+ .getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(s);
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(NginxManagementClientImpl.class);
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationResultImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationResultImpl.java
new file mode 100644
index 000000000000..6825039391fc
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationResultImpl.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.nginx.implementation;
+
+import com.azure.resourcemanager.nginx.fluent.models.OperationResultInner;
+import com.azure.resourcemanager.nginx.models.OperationDisplay;
+import com.azure.resourcemanager.nginx.models.OperationResult;
+
+public final class OperationResultImpl implements OperationResult {
+ private OperationResultInner innerObject;
+
+ private final com.azure.resourcemanager.nginx.NginxManager serviceManager;
+
+ OperationResultImpl(OperationResultInner innerObject, com.azure.resourcemanager.nginx.NginxManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public OperationDisplay display() {
+ return this.innerModel().display();
+ }
+
+ public Boolean isDataAction() {
+ return this.innerModel().isDataAction();
+ }
+
+ public OperationResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.nginx.NginxManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsClientImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..75a59351ddc1
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsClientImpl.java
@@ -0,0 +1,272 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.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.nginx.fluent.OperationsClient;
+import com.azure.resourcemanager.nginx.fluent.models.OperationResultInner;
+import com.azure.resourcemanager.nginx.models.OperationListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public final class OperationsClientImpl implements OperationsClient {
+ /** The proxy service used to perform REST calls. */
+ private final OperationsService service;
+
+ /** The service client containing this operation class. */
+ private final NginxManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(NginxManagementClientImpl client) {
+ this.service =
+ RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for NginxManagementClientOperations to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "NginxManagementClien")
+ private interface OperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Nginx.NginxPlus/operations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List all operations provided by Nginx.NginxPlus for the 2021-05-01-preview api version.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of GET request to list Nginx.NginxPlus operations 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."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List all operations provided by Nginx.NginxPlus for the 2021-05-01-preview api version.
+ *
+ * @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 result of GET request to list Nginx.NginxPlus operations 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."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List all operations provided by Nginx.NginxPlus for the 2021-05-01-preview api version.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of GET request to list Nginx.NginxPlus operations as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all operations provided by Nginx.NginxPlus for the 2021-05-01-preview api version.
+ *
+ * @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 result of GET request to list Nginx.NginxPlus operations as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List all operations provided by Nginx.NginxPlus for the 2021-05-01-preview api version.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of GET request to list Nginx.NginxPlus operations as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List all operations provided by Nginx.NginxPlus for the 2021-05-01-preview api version.
+ *
+ * @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 result of GET request to list Nginx.NginxPlus operations as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of GET request to list Nginx.NginxPlus operations along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of GET request to list Nginx.NginxPlus operations along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..6e2a5786004f
--- /dev/null
+++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsImpl.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.nginx.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.nginx.fluent.OperationsClient;
+import com.azure.resourcemanager.nginx.fluent.models.OperationResultInner;
+import com.azure.resourcemanager.nginx.models.OperationResult;
+import com.azure.resourcemanager.nginx.models.Operations;
+
+public final class OperationsImpl implements Operations {
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class);
+
+ private final OperationsClient innerClient;
+
+ private final com.azure.resourcemanager.nginx.NginxManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.nginx.NginxManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable