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 Dns service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Dns service API instance.
+ */
+ public DnsManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.dns.generated")
+ .append("/")
+ .append(clientVersion);
+ 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 BearerTokenAuthenticationPolicy(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 DnsManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of DnssecConfigs.
+ *
+ * @return Resource collection API of DnssecConfigs.
+ */
+ public DnssecConfigs dnssecConfigs() {
+ if (this.dnssecConfigs == null) {
+ this.dnssecConfigs = new DnssecConfigsImpl(clientObject.getDnssecConfigs(), this);
+ }
+ return dnssecConfigs;
+ }
+
+ /**
+ * Gets the resource collection API of RecordSets.
+ *
+ * @return Resource collection API of RecordSets.
+ */
+ public RecordSets recordSets() {
+ if (this.recordSets == null) {
+ this.recordSets = new RecordSetsImpl(clientObject.getRecordSets(), this);
+ }
+ return recordSets;
+ }
+
+ /**
+ * Gets the resource collection API of Zones. It manages Zone.
+ *
+ * @return Resource collection API of Zones.
+ */
+ public Zones zones() {
+ if (this.zones == null) {
+ this.zones = new ZonesImpl(clientObject.getZones(), this);
+ }
+ return zones;
+ }
+
+ /**
+ * Gets the resource collection API of DnsResourceReferences.
+ *
+ * @return Resource collection API of DnsResourceReferences.
+ */
+ public DnsResourceReferences dnsResourceReferences() {
+ if (this.dnsResourceReferences == null) {
+ this.dnsResourceReferences = new DnsResourceReferencesImpl(clientObject.getDnsResourceReferences(), this);
+ }
+ return dnsResourceReferences;
+ }
+
+ /**
+ * Gets wrapped service client DnsManagementClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client DnsManagementClient.
+ */
+ public DnsManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/DnsManagementClient.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/DnsManagementClient.java
new file mode 100644
index 000000000000..de83c9c33ec2
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/DnsManagementClient.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for DnsManagementClient class.
+ */
+public interface DnsManagementClient {
+ /**
+ * 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 DnssecConfigsClient object to access its operations.
+ *
+ * @return the DnssecConfigsClient object.
+ */
+ DnssecConfigsClient getDnssecConfigs();
+
+ /**
+ * Gets the RecordSetsClient object to access its operations.
+ *
+ * @return the RecordSetsClient object.
+ */
+ RecordSetsClient getRecordSets();
+
+ /**
+ * Gets the ZonesClient object to access its operations.
+ *
+ * @return the ZonesClient object.
+ */
+ ZonesClient getZones();
+
+ /**
+ * Gets the DnsResourceReferencesClient object to access its operations.
+ *
+ * @return the DnsResourceReferencesClient object.
+ */
+ DnsResourceReferencesClient getDnsResourceReferences();
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/DnsResourceReferencesClient.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/DnsResourceReferencesClient.java
new file mode 100644
index 000000000000..e4a228cabb8f
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/DnsResourceReferencesClient.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dns.generated.fluent.models.DnsResourceReferenceResultInner;
+import com.azure.resourcemanager.dns.generated.models.DnsResourceReferenceRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in DnsResourceReferencesClient.
+ */
+public interface DnsResourceReferencesClient {
+ /**
+ * Returns the DNS records specified by the referencing targetResourceIds.
+ *
+ * @param parameters Properties for dns resource reference request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the properties of the Dns Resource Reference Result along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByTargetResourcesWithResponse(DnsResourceReferenceRequest parameters,
+ Context context);
+
+ /**
+ * Returns the DNS records specified by the referencing targetResourceIds.
+ *
+ * @param parameters Properties for dns resource reference request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the properties of the Dns Resource Reference Result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DnsResourceReferenceResultInner getByTargetResources(DnsResourceReferenceRequest parameters);
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/DnssecConfigsClient.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/DnssecConfigsClient.java
new file mode 100644
index 000000000000..41d003231d4a
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/DnssecConfigsClient.java
@@ -0,0 +1,195 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.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.dns.generated.fluent.models.DnssecConfigInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in DnssecConfigsClient.
+ */
+public interface DnssecConfigsClient {
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 represents the DNSSEC configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DnssecConfigInner> beginCreateOrUpdate(String resourceGroupName,
+ String zoneName);
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of the DNSSEC configuration. Omit this value to always overwrite the DNSSEC
+ * configuration. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow this DNSSEC configuration to be created, but to prevent updating existing
+ * DNSSEC configuration. Other values will be ignored.
+ * @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 represents the DNSSEC configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DnssecConfigInner> beginCreateOrUpdate(String resourceGroupName,
+ String zoneName, String ifMatch, String ifNoneMatch, Context context);
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 represents the DNSSEC configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DnssecConfigInner createOrUpdate(String resourceGroupName, String zoneName);
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of the DNSSEC configuration. Omit this value to always overwrite the DNSSEC
+ * configuration. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow this DNSSEC configuration to be created, but to prevent updating existing
+ * DNSSEC configuration. Other values will be ignored.
+ * @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 represents the DNSSEC configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DnssecConfigInner createOrUpdate(String resourceGroupName, String zoneName, String ifMatch, String ifNoneMatch,
+ Context context);
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 zoneName);
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of this DNSSEC configuration. Omit this value to always delete the DNSSEC configuration.
+ * Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @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 zoneName, String ifMatch,
+ Context context);
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 zoneName);
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of this DNSSEC configuration. Omit this value to always delete the DNSSEC configuration.
+ * Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String zoneName, String ifMatch, Context context);
+
+ /**
+ * Gets the DNSSEC configuration.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 DNSSEC configuration along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String zoneName, Context context);
+
+ /**
+ * Gets the DNSSEC configuration.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 DNSSEC configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DnssecConfigInner get(String resourceGroupName, String zoneName);
+
+ /**
+ * Lists the DNSSEC configurations in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 to a List DNSSEC configurations operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDnsZone(String resourceGroupName, String zoneName);
+
+ /**
+ * Lists the DNSSEC configurations in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 to a List DNSSEC configurations operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDnsZone(String resourceGroupName, String zoneName, Context context);
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/RecordSetsClient.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/RecordSetsClient.java
new file mode 100644
index 000000000000..a7c33a328a15
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/RecordSetsClient.java
@@ -0,0 +1,264 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dns.generated.fluent.models.RecordSetInner;
+import com.azure.resourcemanager.dns.generated.models.RecordType;
+
+/**
+ * An instance of this class provides access to all the operations defined in RecordSetsClient.
+ */
+public interface RecordSetsClient {
+ /**
+ * Updates a record set within a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param relativeRecordSetName The name of the record set, relative to the name of the zone.
+ * @param recordType The type of DNS record in this record set.
+ * @param parameters Parameters supplied to the Update operation.
+ * @param ifMatch The etag of the record set. Omit this value to always overwrite the current record set. Specify
+ * the last-seen etag value to prevent accidentally overwriting concurrent changes.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes a DNS record set (a collection of DNS records with the same name and type) along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName, String zoneName, String relativeRecordSetName,
+ RecordType recordType, RecordSetInner parameters, String ifMatch, Context context);
+
+ /**
+ * Updates a record set within a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param relativeRecordSetName The name of the record set, relative to the name of the zone.
+ * @param recordType The type of DNS record in this record set.
+ * @param parameters Parameters supplied to the Update 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 describes a DNS record set (a collection of DNS records with the same name and type).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RecordSetInner update(String resourceGroupName, String zoneName, String relativeRecordSetName,
+ RecordType recordType, RecordSetInner parameters);
+
+ /**
+ * Creates or updates a record set within a DNS zone. Record sets of type SOA can be updated but not created (they
+ * are created when the DNS zone is created).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param relativeRecordSetName The name of the record set, relative to the name of the zone.
+ * @param recordType The type of DNS record in this record set.
+ * @param parameters Parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The etag of the record set. Omit this value to always overwrite the current record set. Specify
+ * the last-seen etag value to prevent accidentally overwriting any concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing record
+ * set. Other values will be ignored.
+ * @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 describes a DNS record set (a collection of DNS records with the same name and type) along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName, String zoneName,
+ String relativeRecordSetName, RecordType recordType, RecordSetInner parameters, String ifMatch,
+ String ifNoneMatch, Context context);
+
+ /**
+ * Creates or updates a record set within a DNS zone. Record sets of type SOA can be updated but not created (they
+ * are created when the DNS zone is created).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param relativeRecordSetName The name of the record set, relative to the name of the zone.
+ * @param recordType The type of DNS record in this record set.
+ * @param parameters Parameters supplied to the CreateOrUpdate 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 describes a DNS record set (a collection of DNS records with the same name and type).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RecordSetInner createOrUpdate(String resourceGroupName, String zoneName, String relativeRecordSetName,
+ RecordType recordType, RecordSetInner parameters);
+
+ /**
+ * Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted
+ * (they are deleted when the DNS zone is deleted).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param relativeRecordSetName The name of the record set, relative to the name of the zone.
+ * @param recordType The type of DNS record in this record set.
+ * @param ifMatch The etag of the record set. Omit this value to always delete the current record set. Specify the
+ * last-seen etag value to prevent accidentally deleting any concurrent changes.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String zoneName, String relativeRecordSetName,
+ RecordType recordType, String ifMatch, Context context);
+
+ /**
+ * Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted
+ * (they are deleted when the DNS zone is deleted).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param relativeRecordSetName The name of the record set, relative to the name of the zone.
+ * @param recordType The type of DNS record in this record set.
+ * @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 zoneName, String relativeRecordSetName, RecordType recordType);
+
+ /**
+ * Gets a record set.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param relativeRecordSetName The name of the record set, relative to the name of the zone.
+ * @param recordType The type of DNS record in this record set.
+ * @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 record set along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String zoneName, String relativeRecordSetName,
+ RecordType recordType, Context context);
+
+ /**
+ * Gets a record set.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param relativeRecordSetName The name of the record set, relative to the name of the zone.
+ * @param recordType The type of DNS record in this record set.
+ * @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 record set.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RecordSetInner get(String resourceGroupName, String zoneName, String relativeRecordSetName, RecordType recordType);
+
+ /**
+ * Lists the record sets of a specified type in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param recordType The type of DNS record in this record set.
+ * @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 to a record set List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByType(String resourceGroupName, String zoneName, RecordType recordType);
+
+ /**
+ * Lists the record sets of a specified type in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param recordType The type of DNS record in this record set.
+ * @param top The maximum number of record sets to return. If not specified, returns up to 100 record sets.
+ * @param recordsetnamesuffix The suffix label of the record set name that has to be used to filter the record set
+ * enumerations. If this parameter is specified, Enumeration will return only records that end with
+ * .<recordSetNameSuffix>.
+ * @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 to a record set List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByType(String resourceGroupName, String zoneName, RecordType recordType,
+ Integer top, String recordsetnamesuffix, Context context);
+
+ /**
+ * Lists all record sets in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 to a record set List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDnsZone(String resourceGroupName, String zoneName);
+
+ /**
+ * Lists all record sets in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param top The maximum number of record sets to return. If not specified, returns up to 100 record sets.
+ * @param recordsetnamesuffix The suffix label of the record set name that has to be used to filter the record set
+ * enumerations. If this parameter is specified, Enumeration will return only records that end with
+ * .<recordSetNameSuffix>.
+ * @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 to a record set List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDnsZone(String resourceGroupName, String zoneName, Integer top,
+ String recordsetnamesuffix, Context context);
+
+ /**
+ * Lists all record sets in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 to a record set List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAllByDnsZone(String resourceGroupName, String zoneName);
+
+ /**
+ * Lists all record sets in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param top The maximum number of record sets to return. If not specified, returns up to 100 record sets.
+ * @param recordSetNameSuffix The suffix label of the record set name that has to be used to filter the record set
+ * enumerations. If this parameter is specified, Enumeration will return only records that end with
+ * .<recordSetNameSuffix>.
+ * @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 to a record set List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAllByDnsZone(String resourceGroupName, String zoneName, Integer top,
+ String recordSetNameSuffix, Context context);
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/ZonesClient.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/ZonesClient.java
new file mode 100644
index 000000000000..3747b0dd266d
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/ZonesClient.java
@@ -0,0 +1,219 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.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.dns.generated.fluent.models.ZoneInner;
+import com.azure.resourcemanager.dns.generated.models.ZoneUpdate;
+
+/**
+ * An instance of this class provides access to all the operations defined in ZonesClient.
+ */
+public interface ZonesClient {
+ /**
+ * Creates or updates a DNS zone. Does not modify DNS records within the zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param parameters Parameters supplied to the CreateOrUpdate operation.
+ * @param ifMatch The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the
+ * last-seen etag value to prevent accidentally overwriting any concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow a new DNS zone to be created, but to prevent updating an existing zone.
+ * Other values will be ignored.
+ * @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 describes a DNS zone along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName, String zoneName, ZoneInner parameters,
+ String ifMatch, String ifNoneMatch, Context context);
+
+ /**
+ * Creates or updates a DNS zone. Does not modify DNS records within the zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param parameters Parameters supplied to the CreateOrUpdate 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 describes a DNS zone.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ZoneInner createOrUpdate(String resourceGroupName, String zoneName, ZoneInner parameters);
+
+ /**
+ * Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 zoneName);
+
+ /**
+ * Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen
+ * etag value to prevent accidentally deleting any concurrent changes.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @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 zoneName, String ifMatch,
+ Context context);
+
+ /**
+ * Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 zoneName);
+
+ /**
+ * Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen
+ * etag value to prevent accidentally deleting any concurrent changes.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String zoneName, String ifMatch, Context context);
+
+ /**
+ * Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 DNS zone along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String zoneName, Context context);
+
+ /**
+ * Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 DNS zone.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ZoneInner getByResourceGroup(String resourceGroupName, String zoneName);
+
+ /**
+ * Updates a DNS zone. Does not modify DNS records within the zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param parameters Parameters supplied to the Update operation.
+ * @param ifMatch The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the
+ * last-seen etag value to prevent accidentally overwriting any concurrent changes.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes a DNS zone along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName, String zoneName, ZoneUpdate parameters,
+ String ifMatch, Context context);
+
+ /**
+ * Updates a DNS zone. Does not modify DNS records within the zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param parameters Parameters supplied to the Update 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 describes a DNS zone.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ZoneInner update(String resourceGroupName, String zoneName, ZoneUpdate parameters);
+
+ /**
+ * Lists the DNS zones within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response to a Zone List or ListAll operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Lists the DNS zones within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param top The maximum number of record sets to return. If not specified, returns up to 100 record sets.
+ * @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 to a Zone List or ListAll operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Integer top, Context context);
+
+ /**
+ * Lists the DNS zones in all resource groups in a subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response to a Zone List or ListAll operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists the DNS zones in all resource groups in a subscription.
+ *
+ * @param top The maximum number of DNS zones to return. If not specified, returns up to 100 zones.
+ * @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 to a Zone List or ListAll operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Integer top, Context context);
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnsResourceReferenceRequestProperties.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnsResourceReferenceRequestProperties.java
new file mode 100644
index 000000000000..a00af2203415
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnsResourceReferenceRequestProperties.java
@@ -0,0 +1,101 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SubResource;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Represents the properties of the Dns Resource Reference Request.
+ */
+@Fluent
+public final class DnsResourceReferenceRequestProperties
+ implements JsonSerializable {
+ /*
+ * A list of references to azure resources for which referencing dns records need to be queried.
+ */
+ private List targetResources;
+
+ /**
+ * Creates an instance of DnsResourceReferenceRequestProperties class.
+ */
+ public DnsResourceReferenceRequestProperties() {
+ }
+
+ /**
+ * Get the targetResources property: A list of references to azure resources for which referencing dns records need
+ * to be queried.
+ *
+ * @return the targetResources value.
+ */
+ public List targetResources() {
+ return this.targetResources;
+ }
+
+ /**
+ * Set the targetResources property: A list of references to azure resources for which referencing dns records need
+ * to be queried.
+ *
+ * @param targetResources the targetResources value to set.
+ * @return the DnsResourceReferenceRequestProperties object itself.
+ */
+ public DnsResourceReferenceRequestProperties withTargetResources(List targetResources) {
+ this.targetResources = targetResources;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("targetResources", this.targetResources,
+ (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DnsResourceReferenceRequestProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DnsResourceReferenceRequestProperties if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DnsResourceReferenceRequestProperties.
+ */
+ public static DnsResourceReferenceRequestProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DnsResourceReferenceRequestProperties deserializedDnsResourceReferenceRequestProperties
+ = new DnsResourceReferenceRequestProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("targetResources".equals(fieldName)) {
+ List targetResources = reader.readArray(reader1 -> SubResource.fromJson(reader1));
+ deserializedDnsResourceReferenceRequestProperties.targetResources = targetResources;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDnsResourceReferenceRequestProperties;
+ });
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnsResourceReferenceResultInner.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnsResourceReferenceResultInner.java
new file mode 100644
index 000000000000..2e159ab3f127
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnsResourceReferenceResultInner.java
@@ -0,0 +1,116 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.dns.generated.models.DnsResourceReference;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Represents the properties of the Dns Resource Reference Result.
+ */
+@Fluent
+public final class DnsResourceReferenceResultInner implements JsonSerializable {
+ /*
+ * The result of dns resource reference request. Returns a list of dns resource references for each of the azure
+ * resource in the request.
+ */
+ private DnsResourceReferenceResultProperties innerProperties;
+
+ /**
+ * Creates an instance of DnsResourceReferenceResultInner class.
+ */
+ public DnsResourceReferenceResultInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The result of dns resource reference request. Returns a list of dns resource
+ * references for each of the azure resource in the request.
+ *
+ * @return the innerProperties value.
+ */
+ private DnsResourceReferenceResultProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the dnsResourceReferences property: The result of dns resource reference request. A list of dns resource
+ * references for each of the azure resource in the request.
+ *
+ * @return the dnsResourceReferences value.
+ */
+ public List dnsResourceReferences() {
+ return this.innerProperties() == null ? null : this.innerProperties().dnsResourceReferences();
+ }
+
+ /**
+ * Set the dnsResourceReferences property: The result of dns resource reference request. A list of dns resource
+ * references for each of the azure resource in the request.
+ *
+ * @param dnsResourceReferences the dnsResourceReferences value to set.
+ * @return the DnsResourceReferenceResultInner object itself.
+ */
+ public DnsResourceReferenceResultInner withDnsResourceReferences(List dnsResourceReferences) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DnsResourceReferenceResultProperties();
+ }
+ this.innerProperties().withDnsResourceReferences(dnsResourceReferences);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DnsResourceReferenceResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DnsResourceReferenceResultInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DnsResourceReferenceResultInner.
+ */
+ public static DnsResourceReferenceResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DnsResourceReferenceResultInner deserializedDnsResourceReferenceResultInner
+ = new DnsResourceReferenceResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("properties".equals(fieldName)) {
+ deserializedDnsResourceReferenceResultInner.innerProperties
+ = DnsResourceReferenceResultProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDnsResourceReferenceResultInner;
+ });
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnsResourceReferenceResultProperties.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnsResourceReferenceResultProperties.java
new file mode 100644
index 000000000000..54b2ea8dcda0
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnsResourceReferenceResultProperties.java
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.dns.generated.models.DnsResourceReference;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The result of dns resource reference request. Returns a list of dns resource references for each of the azure
+ * resource in the request.
+ */
+@Fluent
+public final class DnsResourceReferenceResultProperties
+ implements JsonSerializable {
+ /*
+ * The result of dns resource reference request. A list of dns resource references for each of the azure resource in
+ * the request
+ */
+ private List dnsResourceReferences;
+
+ /**
+ * Creates an instance of DnsResourceReferenceResultProperties class.
+ */
+ public DnsResourceReferenceResultProperties() {
+ }
+
+ /**
+ * Get the dnsResourceReferences property: The result of dns resource reference request. A list of dns resource
+ * references for each of the azure resource in the request.
+ *
+ * @return the dnsResourceReferences value.
+ */
+ public List dnsResourceReferences() {
+ return this.dnsResourceReferences;
+ }
+
+ /**
+ * Set the dnsResourceReferences property: The result of dns resource reference request. A list of dns resource
+ * references for each of the azure resource in the request.
+ *
+ * @param dnsResourceReferences the dnsResourceReferences value to set.
+ * @return the DnsResourceReferenceResultProperties object itself.
+ */
+ public DnsResourceReferenceResultProperties
+ withDnsResourceReferences(List dnsResourceReferences) {
+ this.dnsResourceReferences = dnsResourceReferences;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (dnsResourceReferences() != null) {
+ dnsResourceReferences().forEach(e -> e.validate());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("dnsResourceReferences", this.dnsResourceReferences,
+ (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DnsResourceReferenceResultProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DnsResourceReferenceResultProperties if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DnsResourceReferenceResultProperties.
+ */
+ public static DnsResourceReferenceResultProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DnsResourceReferenceResultProperties deserializedDnsResourceReferenceResultProperties
+ = new DnsResourceReferenceResultProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("dnsResourceReferences".equals(fieldName)) {
+ List dnsResourceReferences
+ = reader.readArray(reader1 -> DnsResourceReference.fromJson(reader1));
+ deserializedDnsResourceReferenceResultProperties.dnsResourceReferences = dnsResourceReferences;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDnsResourceReferenceResultProperties;
+ });
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnssecConfigInner.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnssecConfigInner.java
new file mode 100644
index 000000000000..71dd498f9f2a
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnssecConfigInner.java
@@ -0,0 +1,201 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.dns.generated.models.SigningKey;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Represents the DNSSEC configuration.
+ */
+@Fluent
+public final class DnssecConfigInner extends ProxyResource {
+ /*
+ * The DNSSEC properties.
+ */
+ private DnssecProperties innerProperties;
+
+ /*
+ * The etag of the DNSSEC configuration.
+ */
+ private String etag;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of DnssecConfigInner class.
+ */
+ public DnssecConfigInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The DNSSEC properties.
+ *
+ * @return the innerProperties value.
+ */
+ private DnssecProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the etag property: The etag of the DNSSEC configuration.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: The etag of the DNSSEC configuration.
+ *
+ * @param etag the etag value to set.
+ * @return the DnssecConfigInner object itself.
+ */
+ public DnssecConfigInner withEtag(String etag) {
+ this.etag = etag;
+ 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;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning State of the DNSSEC configuration.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the signingKeys property: The list of signing keys.
+ *
+ * @return the signingKeys value.
+ */
+ public List signingKeys() {
+ return this.innerProperties() == null ? null : this.innerProperties().signingKeys();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("etag", this.etag);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DnssecConfigInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DnssecConfigInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the DnssecConfigInner.
+ */
+ public static DnssecConfigInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DnssecConfigInner deserializedDnssecConfigInner = new DnssecConfigInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedDnssecConfigInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedDnssecConfigInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedDnssecConfigInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedDnssecConfigInner.innerProperties = DnssecProperties.fromJson(reader);
+ } else if ("etag".equals(fieldName)) {
+ deserializedDnssecConfigInner.etag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedDnssecConfigInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDnssecConfigInner;
+ });
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnssecProperties.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnssecProperties.java
new file mode 100644
index 000000000000..5e3d0fc9f973
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/DnssecProperties.java
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.dns.generated.models.SigningKey;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Represents the DNSSEC properties.
+ */
+@Immutable
+public final class DnssecProperties implements JsonSerializable {
+ /*
+ * Provisioning State of the DNSSEC configuration.
+ */
+ private String provisioningState;
+
+ /*
+ * The list of signing keys.
+ */
+ private List signingKeys;
+
+ /**
+ * Creates an instance of DnssecProperties class.
+ */
+ public DnssecProperties() {
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning State of the DNSSEC configuration.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the signingKeys property: The list of signing keys.
+ *
+ * @return the signingKeys value.
+ */
+ public List signingKeys() {
+ return this.signingKeys;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (signingKeys() != null) {
+ signingKeys().forEach(e -> e.validate());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DnssecProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DnssecProperties if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DnssecProperties.
+ */
+ public static DnssecProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DnssecProperties deserializedDnssecProperties = new DnssecProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("provisioningState".equals(fieldName)) {
+ deserializedDnssecProperties.provisioningState = reader.getString();
+ } else if ("signingKeys".equals(fieldName)) {
+ List signingKeys = reader.readArray(reader1 -> SigningKey.fromJson(reader1));
+ deserializedDnssecProperties.signingKeys = signingKeys;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDnssecProperties;
+ });
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/RecordSetInner.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/RecordSetInner.java
new file mode 100644
index 000000000000..b495a0a146f3
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/RecordSetInner.java
@@ -0,0 +1,592 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SubResource;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.dns.generated.models.ARecord;
+import com.azure.resourcemanager.dns.generated.models.AaaaRecord;
+import com.azure.resourcemanager.dns.generated.models.CaaRecord;
+import com.azure.resourcemanager.dns.generated.models.CnameRecord;
+import com.azure.resourcemanager.dns.generated.models.DsRecord;
+import com.azure.resourcemanager.dns.generated.models.MxRecord;
+import com.azure.resourcemanager.dns.generated.models.NaptrRecord;
+import com.azure.resourcemanager.dns.generated.models.NsRecord;
+import com.azure.resourcemanager.dns.generated.models.PtrRecord;
+import com.azure.resourcemanager.dns.generated.models.SoaRecord;
+import com.azure.resourcemanager.dns.generated.models.SrvRecord;
+import com.azure.resourcemanager.dns.generated.models.TlsaRecord;
+import com.azure.resourcemanager.dns.generated.models.TxtRecord;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Describes a DNS record set (a collection of DNS records with the same name and type).
+ */
+@Fluent
+public final class RecordSetInner extends ProxyResource {
+ /*
+ * The etag of the record set.
+ */
+ private String etag;
+
+ /*
+ * The properties of the record set.
+ */
+ private RecordSetProperties innerProperties;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of RecordSetInner class.
+ */
+ public RecordSetInner() {
+ }
+
+ /**
+ * Get the etag property: The etag of the record set.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: The etag of the record set.
+ *
+ * @param etag the etag value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /**
+ * Get the innerProperties property: The properties of the record set.
+ *
+ * @return the innerProperties value.
+ */
+ private RecordSetProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the metadata property: The metadata attached to the record set.
+ *
+ * @return the metadata value.
+ */
+ public Map metadata() {
+ return this.innerProperties() == null ? null : this.innerProperties().metadata();
+ }
+
+ /**
+ * Set the metadata property: The metadata attached to the record set.
+ *
+ * @param metadata the metadata value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withMetadata(Map metadata) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withMetadata(metadata);
+ return this;
+ }
+
+ /**
+ * Get the ttl property: The TTL (time-to-live) of the records in the record set.
+ *
+ * @return the ttl value.
+ */
+ public Long ttl() {
+ return this.innerProperties() == null ? null : this.innerProperties().ttl();
+ }
+
+ /**
+ * Set the ttl property: The TTL (time-to-live) of the records in the record set.
+ *
+ * @param ttl the ttl value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withTtl(Long ttl) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withTtl(ttl);
+ return this;
+ }
+
+ /**
+ * Get the fqdn property: Fully qualified domain name of the record set.
+ *
+ * @return the fqdn value.
+ */
+ public String fqdn() {
+ return this.innerProperties() == null ? null : this.innerProperties().fqdn();
+ }
+
+ /**
+ * Get the provisioningState property: provisioning State of the record set.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the targetResource property: A reference to an azure resource from where the dns resource value is taken.
+ *
+ * @return the targetResource value.
+ */
+ public SubResource targetResource() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetResource();
+ }
+
+ /**
+ * Set the targetResource property: A reference to an azure resource from where the dns resource value is taken.
+ *
+ * @param targetResource the targetResource value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withTargetResource(SubResource targetResource) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withTargetResource(targetResource);
+ return this;
+ }
+
+ /**
+ * Get the trafficManagementProfile property: A reference to an azure traffic manager profile resource from where
+ * the dns resource value is taken.
+ *
+ * @return the trafficManagementProfile value.
+ */
+ public SubResource trafficManagementProfile() {
+ return this.innerProperties() == null ? null : this.innerProperties().trafficManagementProfile();
+ }
+
+ /**
+ * Set the trafficManagementProfile property: A reference to an azure traffic manager profile resource from where
+ * the dns resource value is taken.
+ *
+ * @param trafficManagementProfile the trafficManagementProfile value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withTrafficManagementProfile(SubResource trafficManagementProfile) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withTrafficManagementProfile(trafficManagementProfile);
+ return this;
+ }
+
+ /**
+ * Get the aRecords property: The list of A records in the record set.
+ *
+ * @return the aRecords value.
+ */
+ public List aRecords() {
+ return this.innerProperties() == null ? null : this.innerProperties().aRecords();
+ }
+
+ /**
+ * Set the aRecords property: The list of A records in the record set.
+ *
+ * @param aRecords the aRecords value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withARecords(List aRecords) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withARecords(aRecords);
+ return this;
+ }
+
+ /**
+ * Get the aaaaRecords property: The list of AAAA records in the record set.
+ *
+ * @return the aaaaRecords value.
+ */
+ public List aaaaRecords() {
+ return this.innerProperties() == null ? null : this.innerProperties().aaaaRecords();
+ }
+
+ /**
+ * Set the aaaaRecords property: The list of AAAA records in the record set.
+ *
+ * @param aaaaRecords the aaaaRecords value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withAaaaRecords(List aaaaRecords) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withAaaaRecords(aaaaRecords);
+ return this;
+ }
+
+ /**
+ * Get the mxRecords property: The list of MX records in the record set.
+ *
+ * @return the mxRecords value.
+ */
+ public List mxRecords() {
+ return this.innerProperties() == null ? null : this.innerProperties().mxRecords();
+ }
+
+ /**
+ * Set the mxRecords property: The list of MX records in the record set.
+ *
+ * @param mxRecords the mxRecords value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withMxRecords(List mxRecords) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withMxRecords(mxRecords);
+ return this;
+ }
+
+ /**
+ * Get the nsRecords property: The list of NS records in the record set.
+ *
+ * @return the nsRecords value.
+ */
+ public List nsRecords() {
+ return this.innerProperties() == null ? null : this.innerProperties().nsRecords();
+ }
+
+ /**
+ * Set the nsRecords property: The list of NS records in the record set.
+ *
+ * @param nsRecords the nsRecords value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withNsRecords(List nsRecords) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withNsRecords(nsRecords);
+ return this;
+ }
+
+ /**
+ * Get the ptrRecords property: The list of PTR records in the record set.
+ *
+ * @return the ptrRecords value.
+ */
+ public List ptrRecords() {
+ return this.innerProperties() == null ? null : this.innerProperties().ptrRecords();
+ }
+
+ /**
+ * Set the ptrRecords property: The list of PTR records in the record set.
+ *
+ * @param ptrRecords the ptrRecords value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withPtrRecords(List ptrRecords) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withPtrRecords(ptrRecords);
+ return this;
+ }
+
+ /**
+ * Get the srvRecords property: The list of SRV records in the record set.
+ *
+ * @return the srvRecords value.
+ */
+ public List srvRecords() {
+ return this.innerProperties() == null ? null : this.innerProperties().srvRecords();
+ }
+
+ /**
+ * Set the srvRecords property: The list of SRV records in the record set.
+ *
+ * @param srvRecords the srvRecords value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withSrvRecords(List srvRecords) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withSrvRecords(srvRecords);
+ return this;
+ }
+
+ /**
+ * Get the txtRecords property: The list of TXT records in the record set.
+ *
+ * @return the txtRecords value.
+ */
+ public List txtRecords() {
+ return this.innerProperties() == null ? null : this.innerProperties().txtRecords();
+ }
+
+ /**
+ * Set the txtRecords property: The list of TXT records in the record set.
+ *
+ * @param txtRecords the txtRecords value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withTxtRecords(List txtRecords) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withTxtRecords(txtRecords);
+ return this;
+ }
+
+ /**
+ * Get the cnameRecord property: The CNAME record in the record set.
+ *
+ * @return the cnameRecord value.
+ */
+ public CnameRecord cnameRecord() {
+ return this.innerProperties() == null ? null : this.innerProperties().cnameRecord();
+ }
+
+ /**
+ * Set the cnameRecord property: The CNAME record in the record set.
+ *
+ * @param cnameRecord the cnameRecord value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withCnameRecord(CnameRecord cnameRecord) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withCnameRecord(cnameRecord);
+ return this;
+ }
+
+ /**
+ * Get the soaRecord property: The SOA record in the record set.
+ *
+ * @return the soaRecord value.
+ */
+ public SoaRecord soaRecord() {
+ return this.innerProperties() == null ? null : this.innerProperties().soaRecord();
+ }
+
+ /**
+ * Set the soaRecord property: The SOA record in the record set.
+ *
+ * @param soaRecord the soaRecord value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withSoaRecord(SoaRecord soaRecord) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withSoaRecord(soaRecord);
+ return this;
+ }
+
+ /**
+ * Get the caaRecords property: The list of CAA records in the record set.
+ *
+ * @return the caaRecords value.
+ */
+ public List caaRecords() {
+ return this.innerProperties() == null ? null : this.innerProperties().caaRecords();
+ }
+
+ /**
+ * Set the caaRecords property: The list of CAA records in the record set.
+ *
+ * @param caaRecords the caaRecords value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withCaaRecords(List caaRecords) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withCaaRecords(caaRecords);
+ return this;
+ }
+
+ /**
+ * Get the dsRecords property: The list of DS records in the record set.
+ *
+ * @return the dsRecords value.
+ */
+ public List dsRecords() {
+ return this.innerProperties() == null ? null : this.innerProperties().dsRecords();
+ }
+
+ /**
+ * Set the dsRecords property: The list of DS records in the record set.
+ *
+ * @param dsRecords the dsRecords value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withDsRecords(List dsRecords) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withDsRecords(dsRecords);
+ return this;
+ }
+
+ /**
+ * Get the tlsaRecords property: The list of TLSA records in the record set.
+ *
+ * @return the tlsaRecords value.
+ */
+ public List tlsaRecords() {
+ return this.innerProperties() == null ? null : this.innerProperties().tlsaRecords();
+ }
+
+ /**
+ * Set the tlsaRecords property: The list of TLSA records in the record set.
+ *
+ * @param tlsaRecords the tlsaRecords value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withTlsaRecords(List tlsaRecords) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withTlsaRecords(tlsaRecords);
+ return this;
+ }
+
+ /**
+ * Get the naptrRecords property: The list of NAPTR records in the record set.
+ *
+ * @return the naptrRecords value.
+ */
+ public List naptrRecords() {
+ return this.innerProperties() == null ? null : this.innerProperties().naptrRecords();
+ }
+
+ /**
+ * Set the naptrRecords property: The list of NAPTR records in the record set.
+ *
+ * @param naptrRecords the naptrRecords value to set.
+ * @return the RecordSetInner object itself.
+ */
+ public RecordSetInner withNaptrRecords(List naptrRecords) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RecordSetProperties();
+ }
+ this.innerProperties().withNaptrRecords(naptrRecords);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("etag", this.etag);
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of RecordSetInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of RecordSetInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the RecordSetInner.
+ */
+ public static RecordSetInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ RecordSetInner deserializedRecordSetInner = new RecordSetInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedRecordSetInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedRecordSetInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedRecordSetInner.type = reader.getString();
+ } else if ("etag".equals(fieldName)) {
+ deserializedRecordSetInner.etag = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedRecordSetInner.innerProperties = RecordSetProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedRecordSetInner;
+ });
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/RecordSetProperties.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/RecordSetProperties.java
new file mode 100644
index 000000000000..f9779a02466e
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/RecordSetProperties.java
@@ -0,0 +1,642 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SubResource;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.dns.generated.models.ARecord;
+import com.azure.resourcemanager.dns.generated.models.AaaaRecord;
+import com.azure.resourcemanager.dns.generated.models.CaaRecord;
+import com.azure.resourcemanager.dns.generated.models.CnameRecord;
+import com.azure.resourcemanager.dns.generated.models.DsRecord;
+import com.azure.resourcemanager.dns.generated.models.MxRecord;
+import com.azure.resourcemanager.dns.generated.models.NaptrRecord;
+import com.azure.resourcemanager.dns.generated.models.NsRecord;
+import com.azure.resourcemanager.dns.generated.models.PtrRecord;
+import com.azure.resourcemanager.dns.generated.models.SoaRecord;
+import com.azure.resourcemanager.dns.generated.models.SrvRecord;
+import com.azure.resourcemanager.dns.generated.models.TlsaRecord;
+import com.azure.resourcemanager.dns.generated.models.TxtRecord;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Represents the properties of the records in the record set.
+ */
+@Fluent
+public final class RecordSetProperties implements JsonSerializable {
+ /*
+ * The metadata attached to the record set.
+ */
+ private Map metadata;
+
+ /*
+ * The TTL (time-to-live) of the records in the record set.
+ */
+ private Long ttl;
+
+ /*
+ * Fully qualified domain name of the record set.
+ */
+ private String fqdn;
+
+ /*
+ * provisioning State of the record set.
+ */
+ private String provisioningState;
+
+ /*
+ * A reference to an azure resource from where the dns resource value is taken.
+ */
+ private SubResource targetResource;
+
+ /*
+ * A reference to an azure traffic manager profile resource from where the dns resource value is taken.
+ */
+ private SubResource trafficManagementProfile;
+
+ /*
+ * The list of A records in the record set.
+ */
+ private List aRecords;
+
+ /*
+ * The list of AAAA records in the record set.
+ */
+ private List aaaaRecords;
+
+ /*
+ * The list of MX records in the record set.
+ */
+ private List mxRecords;
+
+ /*
+ * The list of NS records in the record set.
+ */
+ private List nsRecords;
+
+ /*
+ * The list of PTR records in the record set.
+ */
+ private List ptrRecords;
+
+ /*
+ * The list of SRV records in the record set.
+ */
+ private List srvRecords;
+
+ /*
+ * The list of TXT records in the record set.
+ */
+ private List txtRecords;
+
+ /*
+ * The CNAME record in the record set.
+ */
+ private CnameRecord cnameRecord;
+
+ /*
+ * The SOA record in the record set.
+ */
+ private SoaRecord soaRecord;
+
+ /*
+ * The list of CAA records in the record set.
+ */
+ private List caaRecords;
+
+ /*
+ * The list of DS records in the record set.
+ */
+ private List dsRecords;
+
+ /*
+ * The list of TLSA records in the record set.
+ */
+ private List tlsaRecords;
+
+ /*
+ * The list of NAPTR records in the record set.
+ */
+ private List naptrRecords;
+
+ /**
+ * Creates an instance of RecordSetProperties class.
+ */
+ public RecordSetProperties() {
+ }
+
+ /**
+ * Get the metadata property: The metadata attached to the record set.
+ *
+ * @return the metadata value.
+ */
+ public Map metadata() {
+ return this.metadata;
+ }
+
+ /**
+ * Set the metadata property: The metadata attached to the record set.
+ *
+ * @param metadata the metadata value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withMetadata(Map metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Get the ttl property: The TTL (time-to-live) of the records in the record set.
+ *
+ * @return the ttl value.
+ */
+ public Long ttl() {
+ return this.ttl;
+ }
+
+ /**
+ * Set the ttl property: The TTL (time-to-live) of the records in the record set.
+ *
+ * @param ttl the ttl value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withTtl(Long ttl) {
+ this.ttl = ttl;
+ return this;
+ }
+
+ /**
+ * Get the fqdn property: Fully qualified domain name of the record set.
+ *
+ * @return the fqdn value.
+ */
+ public String fqdn() {
+ return this.fqdn;
+ }
+
+ /**
+ * Get the provisioningState property: provisioning State of the record set.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the targetResource property: A reference to an azure resource from where the dns resource value is taken.
+ *
+ * @return the targetResource value.
+ */
+ public SubResource targetResource() {
+ return this.targetResource;
+ }
+
+ /**
+ * Set the targetResource property: A reference to an azure resource from where the dns resource value is taken.
+ *
+ * @param targetResource the targetResource value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withTargetResource(SubResource targetResource) {
+ this.targetResource = targetResource;
+ return this;
+ }
+
+ /**
+ * Get the trafficManagementProfile property: A reference to an azure traffic manager profile resource from where
+ * the dns resource value is taken.
+ *
+ * @return the trafficManagementProfile value.
+ */
+ public SubResource trafficManagementProfile() {
+ return this.trafficManagementProfile;
+ }
+
+ /**
+ * Set the trafficManagementProfile property: A reference to an azure traffic manager profile resource from where
+ * the dns resource value is taken.
+ *
+ * @param trafficManagementProfile the trafficManagementProfile value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withTrafficManagementProfile(SubResource trafficManagementProfile) {
+ this.trafficManagementProfile = trafficManagementProfile;
+ return this;
+ }
+
+ /**
+ * Get the aRecords property: The list of A records in the record set.
+ *
+ * @return the aRecords value.
+ */
+ public List aRecords() {
+ return this.aRecords;
+ }
+
+ /**
+ * Set the aRecords property: The list of A records in the record set.
+ *
+ * @param aRecords the aRecords value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withARecords(List aRecords) {
+ this.aRecords = aRecords;
+ return this;
+ }
+
+ /**
+ * Get the aaaaRecords property: The list of AAAA records in the record set.
+ *
+ * @return the aaaaRecords value.
+ */
+ public List aaaaRecords() {
+ return this.aaaaRecords;
+ }
+
+ /**
+ * Set the aaaaRecords property: The list of AAAA records in the record set.
+ *
+ * @param aaaaRecords the aaaaRecords value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withAaaaRecords(List aaaaRecords) {
+ this.aaaaRecords = aaaaRecords;
+ return this;
+ }
+
+ /**
+ * Get the mxRecords property: The list of MX records in the record set.
+ *
+ * @return the mxRecords value.
+ */
+ public List mxRecords() {
+ return this.mxRecords;
+ }
+
+ /**
+ * Set the mxRecords property: The list of MX records in the record set.
+ *
+ * @param mxRecords the mxRecords value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withMxRecords(List mxRecords) {
+ this.mxRecords = mxRecords;
+ return this;
+ }
+
+ /**
+ * Get the nsRecords property: The list of NS records in the record set.
+ *
+ * @return the nsRecords value.
+ */
+ public List nsRecords() {
+ return this.nsRecords;
+ }
+
+ /**
+ * Set the nsRecords property: The list of NS records in the record set.
+ *
+ * @param nsRecords the nsRecords value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withNsRecords(List nsRecords) {
+ this.nsRecords = nsRecords;
+ return this;
+ }
+
+ /**
+ * Get the ptrRecords property: The list of PTR records in the record set.
+ *
+ * @return the ptrRecords value.
+ */
+ public List ptrRecords() {
+ return this.ptrRecords;
+ }
+
+ /**
+ * Set the ptrRecords property: The list of PTR records in the record set.
+ *
+ * @param ptrRecords the ptrRecords value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withPtrRecords(List ptrRecords) {
+ this.ptrRecords = ptrRecords;
+ return this;
+ }
+
+ /**
+ * Get the srvRecords property: The list of SRV records in the record set.
+ *
+ * @return the srvRecords value.
+ */
+ public List srvRecords() {
+ return this.srvRecords;
+ }
+
+ /**
+ * Set the srvRecords property: The list of SRV records in the record set.
+ *
+ * @param srvRecords the srvRecords value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withSrvRecords(List srvRecords) {
+ this.srvRecords = srvRecords;
+ return this;
+ }
+
+ /**
+ * Get the txtRecords property: The list of TXT records in the record set.
+ *
+ * @return the txtRecords value.
+ */
+ public List txtRecords() {
+ return this.txtRecords;
+ }
+
+ /**
+ * Set the txtRecords property: The list of TXT records in the record set.
+ *
+ * @param txtRecords the txtRecords value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withTxtRecords(List txtRecords) {
+ this.txtRecords = txtRecords;
+ return this;
+ }
+
+ /**
+ * Get the cnameRecord property: The CNAME record in the record set.
+ *
+ * @return the cnameRecord value.
+ */
+ public CnameRecord cnameRecord() {
+ return this.cnameRecord;
+ }
+
+ /**
+ * Set the cnameRecord property: The CNAME record in the record set.
+ *
+ * @param cnameRecord the cnameRecord value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withCnameRecord(CnameRecord cnameRecord) {
+ this.cnameRecord = cnameRecord;
+ return this;
+ }
+
+ /**
+ * Get the soaRecord property: The SOA record in the record set.
+ *
+ * @return the soaRecord value.
+ */
+ public SoaRecord soaRecord() {
+ return this.soaRecord;
+ }
+
+ /**
+ * Set the soaRecord property: The SOA record in the record set.
+ *
+ * @param soaRecord the soaRecord value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withSoaRecord(SoaRecord soaRecord) {
+ this.soaRecord = soaRecord;
+ return this;
+ }
+
+ /**
+ * Get the caaRecords property: The list of CAA records in the record set.
+ *
+ * @return the caaRecords value.
+ */
+ public List caaRecords() {
+ return this.caaRecords;
+ }
+
+ /**
+ * Set the caaRecords property: The list of CAA records in the record set.
+ *
+ * @param caaRecords the caaRecords value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withCaaRecords(List caaRecords) {
+ this.caaRecords = caaRecords;
+ return this;
+ }
+
+ /**
+ * Get the dsRecords property: The list of DS records in the record set.
+ *
+ * @return the dsRecords value.
+ */
+ public List dsRecords() {
+ return this.dsRecords;
+ }
+
+ /**
+ * Set the dsRecords property: The list of DS records in the record set.
+ *
+ * @param dsRecords the dsRecords value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withDsRecords(List dsRecords) {
+ this.dsRecords = dsRecords;
+ return this;
+ }
+
+ /**
+ * Get the tlsaRecords property: The list of TLSA records in the record set.
+ *
+ * @return the tlsaRecords value.
+ */
+ public List tlsaRecords() {
+ return this.tlsaRecords;
+ }
+
+ /**
+ * Set the tlsaRecords property: The list of TLSA records in the record set.
+ *
+ * @param tlsaRecords the tlsaRecords value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withTlsaRecords(List tlsaRecords) {
+ this.tlsaRecords = tlsaRecords;
+ return this;
+ }
+
+ /**
+ * Get the naptrRecords property: The list of NAPTR records in the record set.
+ *
+ * @return the naptrRecords value.
+ */
+ public List naptrRecords() {
+ return this.naptrRecords;
+ }
+
+ /**
+ * Set the naptrRecords property: The list of NAPTR records in the record set.
+ *
+ * @param naptrRecords the naptrRecords value to set.
+ * @return the RecordSetProperties object itself.
+ */
+ public RecordSetProperties withNaptrRecords(List naptrRecords) {
+ this.naptrRecords = naptrRecords;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (aRecords() != null) {
+ aRecords().forEach(e -> e.validate());
+ }
+ if (aaaaRecords() != null) {
+ aaaaRecords().forEach(e -> e.validate());
+ }
+ if (mxRecords() != null) {
+ mxRecords().forEach(e -> e.validate());
+ }
+ if (nsRecords() != null) {
+ nsRecords().forEach(e -> e.validate());
+ }
+ if (ptrRecords() != null) {
+ ptrRecords().forEach(e -> e.validate());
+ }
+ if (srvRecords() != null) {
+ srvRecords().forEach(e -> e.validate());
+ }
+ if (txtRecords() != null) {
+ txtRecords().forEach(e -> e.validate());
+ }
+ if (cnameRecord() != null) {
+ cnameRecord().validate();
+ }
+ if (soaRecord() != null) {
+ soaRecord().validate();
+ }
+ if (caaRecords() != null) {
+ caaRecords().forEach(e -> e.validate());
+ }
+ if (dsRecords() != null) {
+ dsRecords().forEach(e -> e.validate());
+ }
+ if (tlsaRecords() != null) {
+ tlsaRecords().forEach(e -> e.validate());
+ }
+ if (naptrRecords() != null) {
+ naptrRecords().forEach(e -> e.validate());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeNumberField("TTL", this.ttl);
+ jsonWriter.writeJsonField("targetResource", this.targetResource);
+ jsonWriter.writeJsonField("trafficManagementProfile", this.trafficManagementProfile);
+ jsonWriter.writeArrayField("ARecords", this.aRecords, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("AAAARecords", this.aaaaRecords, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("MXRecords", this.mxRecords, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("NSRecords", this.nsRecords, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("PTRRecords", this.ptrRecords, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("SRVRecords", this.srvRecords, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("TXTRecords", this.txtRecords, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeJsonField("CNAMERecord", this.cnameRecord);
+ jsonWriter.writeJsonField("SOARecord", this.soaRecord);
+ jsonWriter.writeArrayField("caaRecords", this.caaRecords, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("DSRecords", this.dsRecords, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("TLSARecords", this.tlsaRecords, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("NAPTRRecords", this.naptrRecords, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of RecordSetProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of RecordSetProperties if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the RecordSetProperties.
+ */
+ public static RecordSetProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ RecordSetProperties deserializedRecordSetProperties = new RecordSetProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("metadata".equals(fieldName)) {
+ Map metadata = reader.readMap(reader1 -> reader1.getString());
+ deserializedRecordSetProperties.metadata = metadata;
+ } else if ("TTL".equals(fieldName)) {
+ deserializedRecordSetProperties.ttl = reader.getNullable(JsonReader::getLong);
+ } else if ("fqdn".equals(fieldName)) {
+ deserializedRecordSetProperties.fqdn = reader.getString();
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedRecordSetProperties.provisioningState = reader.getString();
+ } else if ("targetResource".equals(fieldName)) {
+ deserializedRecordSetProperties.targetResource = SubResource.fromJson(reader);
+ } else if ("trafficManagementProfile".equals(fieldName)) {
+ deserializedRecordSetProperties.trafficManagementProfile = SubResource.fromJson(reader);
+ } else if ("ARecords".equals(fieldName)) {
+ List aRecords = reader.readArray(reader1 -> ARecord.fromJson(reader1));
+ deserializedRecordSetProperties.aRecords = aRecords;
+ } else if ("AAAARecords".equals(fieldName)) {
+ List aaaaRecords = reader.readArray(reader1 -> AaaaRecord.fromJson(reader1));
+ deserializedRecordSetProperties.aaaaRecords = aaaaRecords;
+ } else if ("MXRecords".equals(fieldName)) {
+ List mxRecords = reader.readArray(reader1 -> MxRecord.fromJson(reader1));
+ deserializedRecordSetProperties.mxRecords = mxRecords;
+ } else if ("NSRecords".equals(fieldName)) {
+ List nsRecords = reader.readArray(reader1 -> NsRecord.fromJson(reader1));
+ deserializedRecordSetProperties.nsRecords = nsRecords;
+ } else if ("PTRRecords".equals(fieldName)) {
+ List ptrRecords = reader.readArray(reader1 -> PtrRecord.fromJson(reader1));
+ deserializedRecordSetProperties.ptrRecords = ptrRecords;
+ } else if ("SRVRecords".equals(fieldName)) {
+ List srvRecords = reader.readArray(reader1 -> SrvRecord.fromJson(reader1));
+ deserializedRecordSetProperties.srvRecords = srvRecords;
+ } else if ("TXTRecords".equals(fieldName)) {
+ List txtRecords = reader.readArray(reader1 -> TxtRecord.fromJson(reader1));
+ deserializedRecordSetProperties.txtRecords = txtRecords;
+ } else if ("CNAMERecord".equals(fieldName)) {
+ deserializedRecordSetProperties.cnameRecord = CnameRecord.fromJson(reader);
+ } else if ("SOARecord".equals(fieldName)) {
+ deserializedRecordSetProperties.soaRecord = SoaRecord.fromJson(reader);
+ } else if ("caaRecords".equals(fieldName)) {
+ List caaRecords = reader.readArray(reader1 -> CaaRecord.fromJson(reader1));
+ deserializedRecordSetProperties.caaRecords = caaRecords;
+ } else if ("DSRecords".equals(fieldName)) {
+ List dsRecords = reader.readArray(reader1 -> DsRecord.fromJson(reader1));
+ deserializedRecordSetProperties.dsRecords = dsRecords;
+ } else if ("TLSARecords".equals(fieldName)) {
+ List tlsaRecords = reader.readArray(reader1 -> TlsaRecord.fromJson(reader1));
+ deserializedRecordSetProperties.tlsaRecords = tlsaRecords;
+ } else if ("NAPTRRecords".equals(fieldName)) {
+ List naptrRecords = reader.readArray(reader1 -> NaptrRecord.fromJson(reader1));
+ deserializedRecordSetProperties.naptrRecords = naptrRecords;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedRecordSetProperties;
+ });
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/ZoneInner.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/ZoneInner.java
new file mode 100644
index 000000000000..09a72a7e02fd
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/ZoneInner.java
@@ -0,0 +1,334 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SubResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.dns.generated.models.SigningKey;
+import com.azure.resourcemanager.dns.generated.models.ZoneType;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Describes a DNS zone.
+ */
+@Fluent
+public final class ZoneInner extends Resource {
+ /*
+ * The etag of the zone.
+ */
+ private String etag;
+
+ /*
+ * The properties of the zone.
+ */
+ private ZoneProperties innerProperties;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of ZoneInner class.
+ */
+ public ZoneInner() {
+ }
+
+ /**
+ * Get the etag property: The etag of the zone.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: The etag of the zone.
+ *
+ * @param etag the etag value to set.
+ * @return the ZoneInner object itself.
+ */
+ public ZoneInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /**
+ * Get the innerProperties property: The properties of the zone.
+ *
+ * @return the innerProperties value.
+ */
+ private ZoneProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ZoneInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ZoneInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the maxNumberOfRecordSets property: The maximum number of record sets that can be created in this DNS zone.
+ * This is a read-only property and any attempt to set this value will be ignored.
+ *
+ * @return the maxNumberOfRecordSets value.
+ */
+ public Long maxNumberOfRecordSets() {
+ return this.innerProperties() == null ? null : this.innerProperties().maxNumberOfRecordSets();
+ }
+
+ /**
+ * Get the maxNumberOfRecordsPerRecordSet property: The maximum number of records per record set that can be created
+ * in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
+ *
+ * @return the maxNumberOfRecordsPerRecordSet value.
+ */
+ public Long maxNumberOfRecordsPerRecordSet() {
+ return this.innerProperties() == null ? null : this.innerProperties().maxNumberOfRecordsPerRecordSet();
+ }
+
+ /**
+ * Get the numberOfRecordSets property: The current number of record sets in this DNS zone. This is a read-only
+ * property and any attempt to set this value will be ignored.
+ *
+ * @return the numberOfRecordSets value.
+ */
+ public Long numberOfRecordSets() {
+ return this.innerProperties() == null ? null : this.innerProperties().numberOfRecordSets();
+ }
+
+ /**
+ * Get the nameServers property: The name servers for this DNS zone. This is a read-only property and any attempt to
+ * set this value will be ignored.
+ *
+ * @return the nameServers value.
+ */
+ public List nameServers() {
+ return this.innerProperties() == null ? null : this.innerProperties().nameServers();
+ }
+
+ /**
+ * Get the zoneType property: The type of this DNS zone (Public or Private).
+ *
+ * @return the zoneType value.
+ */
+ public ZoneType zoneType() {
+ return this.innerProperties() == null ? null : this.innerProperties().zoneType();
+ }
+
+ /**
+ * Set the zoneType property: The type of this DNS zone (Public or Private).
+ *
+ * @param zoneType the zoneType value to set.
+ * @return the ZoneInner object itself.
+ */
+ public ZoneInner withZoneType(ZoneType zoneType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ZoneProperties();
+ }
+ this.innerProperties().withZoneType(zoneType);
+ return this;
+ }
+
+ /**
+ * Get the registrationVirtualNetworks property: A list of references to virtual networks that register hostnames in
+ * this DNS zone. This is a only when ZoneType is Private.
+ *
+ * @return the registrationVirtualNetworks value.
+ */
+ public List registrationVirtualNetworks() {
+ return this.innerProperties() == null ? null : this.innerProperties().registrationVirtualNetworks();
+ }
+
+ /**
+ * Set the registrationVirtualNetworks property: A list of references to virtual networks that register hostnames in
+ * this DNS zone. This is a only when ZoneType is Private.
+ *
+ * @param registrationVirtualNetworks the registrationVirtualNetworks value to set.
+ * @return the ZoneInner object itself.
+ */
+ public ZoneInner withRegistrationVirtualNetworks(List registrationVirtualNetworks) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ZoneProperties();
+ }
+ this.innerProperties().withRegistrationVirtualNetworks(registrationVirtualNetworks);
+ return this;
+ }
+
+ /**
+ * Get the resolutionVirtualNetworks property: A list of references to virtual networks that resolve records in this
+ * DNS zone. This is a only when ZoneType is Private.
+ *
+ * @return the resolutionVirtualNetworks value.
+ */
+ public List resolutionVirtualNetworks() {
+ return this.innerProperties() == null ? null : this.innerProperties().resolutionVirtualNetworks();
+ }
+
+ /**
+ * Set the resolutionVirtualNetworks property: A list of references to virtual networks that resolve records in this
+ * DNS zone. This is a only when ZoneType is Private.
+ *
+ * @param resolutionVirtualNetworks the resolutionVirtualNetworks value to set.
+ * @return the ZoneInner object itself.
+ */
+ public ZoneInner withResolutionVirtualNetworks(List resolutionVirtualNetworks) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ZoneProperties();
+ }
+ this.innerProperties().withResolutionVirtualNetworks(resolutionVirtualNetworks);
+ return this;
+ }
+
+ /**
+ * Get the signingKeys property: The list of signing keys.
+ *
+ * @return the signingKeys value.
+ */
+ public List signingKeys() {
+ return this.innerProperties() == null ? null : this.innerProperties().signingKeys();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("etag", this.etag);
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ZoneInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ZoneInner if the JsonReader was pointing to an instance of it, or null if it was pointing
+ * to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ZoneInner.
+ */
+ public static ZoneInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ZoneInner deserializedZoneInner = new ZoneInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedZoneInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedZoneInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedZoneInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedZoneInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedZoneInner.withTags(tags);
+ } else if ("etag".equals(fieldName)) {
+ deserializedZoneInner.etag = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedZoneInner.innerProperties = ZoneProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedZoneInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedZoneInner;
+ });
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/ZoneProperties.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/ZoneProperties.java
new file mode 100644
index 000000000000..27aeda05fa74
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/ZoneProperties.java
@@ -0,0 +1,258 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SubResource;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.dns.generated.models.SigningKey;
+import com.azure.resourcemanager.dns.generated.models.ZoneType;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Represents the properties of the zone.
+ */
+@Fluent
+public final class ZoneProperties implements JsonSerializable {
+ /*
+ * The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any
+ * attempt to set this value will be ignored.
+ */
+ private Long maxNumberOfRecordSets;
+
+ /*
+ * The maximum number of records per record set that can be created in this DNS zone. This is a read-only property
+ * and any attempt to set this value will be ignored.
+ */
+ private Long maxNumberOfRecordsPerRecordSet;
+
+ /*
+ * The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this
+ * value will be ignored.
+ */
+ private Long numberOfRecordSets;
+
+ /*
+ * The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be
+ * ignored.
+ */
+ private List nameServers;
+
+ /*
+ * The type of this DNS zone (Public or Private).
+ */
+ private ZoneType zoneType;
+
+ /*
+ * A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType
+ * is Private.
+ */
+ private List registrationVirtualNetworks;
+
+ /*
+ * A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is
+ * Private.
+ */
+ private List resolutionVirtualNetworks;
+
+ /*
+ * The list of signing keys.
+ */
+ private List signingKeys;
+
+ /**
+ * Creates an instance of ZoneProperties class.
+ */
+ public ZoneProperties() {
+ }
+
+ /**
+ * Get the maxNumberOfRecordSets property: The maximum number of record sets that can be created in this DNS zone.
+ * This is a read-only property and any attempt to set this value will be ignored.
+ *
+ * @return the maxNumberOfRecordSets value.
+ */
+ public Long maxNumberOfRecordSets() {
+ return this.maxNumberOfRecordSets;
+ }
+
+ /**
+ * Get the maxNumberOfRecordsPerRecordSet property: The maximum number of records per record set that can be created
+ * in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
+ *
+ * @return the maxNumberOfRecordsPerRecordSet value.
+ */
+ public Long maxNumberOfRecordsPerRecordSet() {
+ return this.maxNumberOfRecordsPerRecordSet;
+ }
+
+ /**
+ * Get the numberOfRecordSets property: The current number of record sets in this DNS zone. This is a read-only
+ * property and any attempt to set this value will be ignored.
+ *
+ * @return the numberOfRecordSets value.
+ */
+ public Long numberOfRecordSets() {
+ return this.numberOfRecordSets;
+ }
+
+ /**
+ * Get the nameServers property: The name servers for this DNS zone. This is a read-only property and any attempt to
+ * set this value will be ignored.
+ *
+ * @return the nameServers value.
+ */
+ public List nameServers() {
+ return this.nameServers;
+ }
+
+ /**
+ * Get the zoneType property: The type of this DNS zone (Public or Private).
+ *
+ * @return the zoneType value.
+ */
+ public ZoneType zoneType() {
+ return this.zoneType;
+ }
+
+ /**
+ * Set the zoneType property: The type of this DNS zone (Public or Private).
+ *
+ * @param zoneType the zoneType value to set.
+ * @return the ZoneProperties object itself.
+ */
+ public ZoneProperties withZoneType(ZoneType zoneType) {
+ this.zoneType = zoneType;
+ return this;
+ }
+
+ /**
+ * Get the registrationVirtualNetworks property: A list of references to virtual networks that register hostnames in
+ * this DNS zone. This is a only when ZoneType is Private.
+ *
+ * @return the registrationVirtualNetworks value.
+ */
+ public List registrationVirtualNetworks() {
+ return this.registrationVirtualNetworks;
+ }
+
+ /**
+ * Set the registrationVirtualNetworks property: A list of references to virtual networks that register hostnames in
+ * this DNS zone. This is a only when ZoneType is Private.
+ *
+ * @param registrationVirtualNetworks the registrationVirtualNetworks value to set.
+ * @return the ZoneProperties object itself.
+ */
+ public ZoneProperties withRegistrationVirtualNetworks(List registrationVirtualNetworks) {
+ this.registrationVirtualNetworks = registrationVirtualNetworks;
+ return this;
+ }
+
+ /**
+ * Get the resolutionVirtualNetworks property: A list of references to virtual networks that resolve records in this
+ * DNS zone. This is a only when ZoneType is Private.
+ *
+ * @return the resolutionVirtualNetworks value.
+ */
+ public List resolutionVirtualNetworks() {
+ return this.resolutionVirtualNetworks;
+ }
+
+ /**
+ * Set the resolutionVirtualNetworks property: A list of references to virtual networks that resolve records in this
+ * DNS zone. This is a only when ZoneType is Private.
+ *
+ * @param resolutionVirtualNetworks the resolutionVirtualNetworks value to set.
+ * @return the ZoneProperties object itself.
+ */
+ public ZoneProperties withResolutionVirtualNetworks(List resolutionVirtualNetworks) {
+ this.resolutionVirtualNetworks = resolutionVirtualNetworks;
+ return this;
+ }
+
+ /**
+ * Get the signingKeys property: The list of signing keys.
+ *
+ * @return the signingKeys value.
+ */
+ public List signingKeys() {
+ return this.signingKeys;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (signingKeys() != null) {
+ signingKeys().forEach(e -> e.validate());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("zoneType", this.zoneType == null ? null : this.zoneType.toString());
+ jsonWriter.writeArrayField("registrationVirtualNetworks", this.registrationVirtualNetworks,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("resolutionVirtualNetworks", this.resolutionVirtualNetworks,
+ (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ZoneProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ZoneProperties if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ZoneProperties.
+ */
+ public static ZoneProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ZoneProperties deserializedZoneProperties = new ZoneProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("maxNumberOfRecordSets".equals(fieldName)) {
+ deserializedZoneProperties.maxNumberOfRecordSets = reader.getNullable(JsonReader::getLong);
+ } else if ("maxNumberOfRecordsPerRecordSet".equals(fieldName)) {
+ deserializedZoneProperties.maxNumberOfRecordsPerRecordSet = reader.getNullable(JsonReader::getLong);
+ } else if ("numberOfRecordSets".equals(fieldName)) {
+ deserializedZoneProperties.numberOfRecordSets = reader.getNullable(JsonReader::getLong);
+ } else if ("nameServers".equals(fieldName)) {
+ List nameServers = reader.readArray(reader1 -> reader1.getString());
+ deserializedZoneProperties.nameServers = nameServers;
+ } else if ("zoneType".equals(fieldName)) {
+ deserializedZoneProperties.zoneType = ZoneType.fromString(reader.getString());
+ } else if ("registrationVirtualNetworks".equals(fieldName)) {
+ List registrationVirtualNetworks
+ = reader.readArray(reader1 -> SubResource.fromJson(reader1));
+ deserializedZoneProperties.registrationVirtualNetworks = registrationVirtualNetworks;
+ } else if ("resolutionVirtualNetworks".equals(fieldName)) {
+ List resolutionVirtualNetworks
+ = reader.readArray(reader1 -> SubResource.fromJson(reader1));
+ deserializedZoneProperties.resolutionVirtualNetworks = resolutionVirtualNetworks;
+ } else if ("signingKeys".equals(fieldName)) {
+ List signingKeys = reader.readArray(reader1 -> SigningKey.fromJson(reader1));
+ deserializedZoneProperties.signingKeys = signingKeys;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedZoneProperties;
+ });
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/package-info.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/package-info.java
new file mode 100644
index 000000000000..255559d285c9
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for DnsManagementClient.
+ * The DNS Management Client.
+ */
+package com.azure.resourcemanager.dns.generated.fluent.models;
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/package-info.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/package-info.java
new file mode 100644
index 000000000000..e47b75d4b3f7
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for DnsManagementClient.
+ * The DNS Management Client.
+ */
+package com.azure.resourcemanager.dns.generated.fluent;
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsManagementClientBuilder.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsManagementClientBuilder.java
new file mode 100644
index 000000000000..10c9dcbf1ca8
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsManagementClientBuilder.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.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 DnsManagementClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { DnsManagementClientImpl.class })
+public final class DnsManagementClientBuilder {
+ /*
+ * The ID of the target subscription.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the DnsManagementClientBuilder.
+ */
+ public DnsManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the DnsManagementClientBuilder.
+ */
+ public DnsManagementClientBuilder 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 DnsManagementClientBuilder.
+ */
+ public DnsManagementClientBuilder 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 DnsManagementClientBuilder.
+ */
+ public DnsManagementClientBuilder 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 DnsManagementClientBuilder.
+ */
+ public DnsManagementClientBuilder 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 DnsManagementClientBuilder.
+ */
+ public DnsManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of DnsManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of DnsManagementClientImpl.
+ */
+ public DnsManagementClientImpl buildClient() {
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline = (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval
+ = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ DnsManagementClientImpl client = new DnsManagementClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ return client;
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsManagementClientImpl.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsManagementClientImpl.java
new file mode 100644
index 000000000000..5cfef2c1747f
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsManagementClientImpl.java
@@ -0,0 +1,336 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaderName;
+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.dns.generated.fluent.DnsManagementClient;
+import com.azure.resourcemanager.dns.generated.fluent.DnsResourceReferencesClient;
+import com.azure.resourcemanager.dns.generated.fluent.DnssecConfigsClient;
+import com.azure.resourcemanager.dns.generated.fluent.RecordSetsClient;
+import com.azure.resourcemanager.dns.generated.fluent.ZonesClient;
+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 DnsManagementClientImpl type.
+ */
+@ServiceClient(builder = DnsManagementClientBuilder.class)
+public final class DnsManagementClientImpl implements DnsManagementClient {
+ /**
+ * 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 DnssecConfigsClient object to access its operations.
+ */
+ private final DnssecConfigsClient dnssecConfigs;
+
+ /**
+ * Gets the DnssecConfigsClient object to access its operations.
+ *
+ * @return the DnssecConfigsClient object.
+ */
+ public DnssecConfigsClient getDnssecConfigs() {
+ return this.dnssecConfigs;
+ }
+
+ /**
+ * The RecordSetsClient object to access its operations.
+ */
+ private final RecordSetsClient recordSets;
+
+ /**
+ * Gets the RecordSetsClient object to access its operations.
+ *
+ * @return the RecordSetsClient object.
+ */
+ public RecordSetsClient getRecordSets() {
+ return this.recordSets;
+ }
+
+ /**
+ * The ZonesClient object to access its operations.
+ */
+ private final ZonesClient zones;
+
+ /**
+ * Gets the ZonesClient object to access its operations.
+ *
+ * @return the ZonesClient object.
+ */
+ public ZonesClient getZones() {
+ return this.zones;
+ }
+
+ /**
+ * The DnsResourceReferencesClient object to access its operations.
+ */
+ private final DnsResourceReferencesClient dnsResourceReferences;
+
+ /**
+ * Gets the DnsResourceReferencesClient object to access its operations.
+ *
+ * @return the DnsResourceReferencesClient object.
+ */
+ public DnsResourceReferencesClient getDnsResourceReferences() {
+ return this.dnsResourceReferences;
+ }
+
+ /**
+ * Initializes an instance of DnsManagementClient 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.
+ */
+ DnsManagementClientImpl(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 = "2023-07-01-preview";
+ this.dnssecConfigs = new DnssecConfigsClientImpl(this);
+ this.recordSets = new RecordSetsClientImpl(this);
+ this.zones = new ZonesClientImpl(this);
+ this.dnsResourceReferences = new DnsResourceReferencesClientImpl(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(HttpHeaderName.fromString(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(DnsManagementClientImpl.class);
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsResourceReferenceResultImpl.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsResourceReferenceResultImpl.java
new file mode 100644
index 000000000000..91141787ef2b
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsResourceReferenceResultImpl.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.dns.generated.implementation;
+
+import com.azure.resourcemanager.dns.generated.fluent.models.DnsResourceReferenceResultInner;
+import com.azure.resourcemanager.dns.generated.models.DnsResourceReference;
+import com.azure.resourcemanager.dns.generated.models.DnsResourceReferenceResult;
+import java.util.Collections;
+import java.util.List;
+
+public final class DnsResourceReferenceResultImpl implements DnsResourceReferenceResult {
+ private DnsResourceReferenceResultInner innerObject;
+
+ private final com.azure.resourcemanager.dns.generated.DnsManager serviceManager;
+
+ DnsResourceReferenceResultImpl(DnsResourceReferenceResultInner innerObject,
+ com.azure.resourcemanager.dns.generated.DnsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List dnsResourceReferences() {
+ List inner = this.innerModel().dnsResourceReferences();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public DnsResourceReferenceResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.dns.generated.DnsManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsResourceReferencesClientImpl.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsResourceReferencesClientImpl.java
new file mode 100644
index 000000000000..3a47d165ff63
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsResourceReferencesClientImpl.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.dns.generated.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+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.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.dns.generated.fluent.DnsResourceReferencesClient;
+import com.azure.resourcemanager.dns.generated.fluent.models.DnsResourceReferenceResultInner;
+import com.azure.resourcemanager.dns.generated.models.DnsResourceReferenceRequest;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in DnsResourceReferencesClient.
+ */
+public final class DnsResourceReferencesClientImpl implements DnsResourceReferencesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final DnsResourceReferencesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DnsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DnsResourceReferencesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DnsResourceReferencesClientImpl(DnsManagementClientImpl client) {
+ this.service = RestProxy.create(DnsResourceReferencesService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DnsManagementClientDnsResourceReferences to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DnsManagementClientD")
+ public interface DnsResourceReferencesService {
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Network/getDnsResourceReference")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByTargetResources(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") DnsResourceReferenceRequest parameters, @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Returns the DNS records specified by the referencing targetResourceIds.
+ *
+ * @param parameters Properties for dns resource reference request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the properties of the Dns Resource Reference Result along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ getByTargetResourcesWithResponseAsync(DnsResourceReferenceRequest parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByTargetResources(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), parameters, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Returns the DNS records specified by the referencing targetResourceIds.
+ *
+ * @param parameters Properties for dns resource reference request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the properties of the Dns Resource Reference Result along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ getByTargetResourcesWithResponseAsync(DnsResourceReferenceRequest parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getByTargetResources(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), parameters, accept, context);
+ }
+
+ /**
+ * Returns the DNS records specified by the referencing targetResourceIds.
+ *
+ * @param parameters Properties for dns resource reference request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the properties of the Dns Resource Reference Result on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByTargetResourcesAsync(DnsResourceReferenceRequest parameters) {
+ return getByTargetResourcesWithResponseAsync(parameters).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Returns the DNS records specified by the referencing targetResourceIds.
+ *
+ * @param parameters Properties for dns resource reference request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the properties of the Dns Resource Reference Result along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response
+ getByTargetResourcesWithResponse(DnsResourceReferenceRequest parameters, Context context) {
+ return getByTargetResourcesWithResponseAsync(parameters, context).block();
+ }
+
+ /**
+ * Returns the DNS records specified by the referencing targetResourceIds.
+ *
+ * @param parameters Properties for dns resource reference request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the properties of the Dns Resource Reference Result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DnsResourceReferenceResultInner getByTargetResources(DnsResourceReferenceRequest parameters) {
+ return getByTargetResourcesWithResponse(parameters, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsResourceReferencesImpl.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsResourceReferencesImpl.java
new file mode 100644
index 000000000000..3d83ab467076
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnsResourceReferencesImpl.java
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dns.generated.fluent.DnsResourceReferencesClient;
+import com.azure.resourcemanager.dns.generated.fluent.models.DnsResourceReferenceResultInner;
+import com.azure.resourcemanager.dns.generated.models.DnsResourceReferenceRequest;
+import com.azure.resourcemanager.dns.generated.models.DnsResourceReferenceResult;
+import com.azure.resourcemanager.dns.generated.models.DnsResourceReferences;
+
+public final class DnsResourceReferencesImpl implements DnsResourceReferences {
+ private static final ClientLogger LOGGER = new ClientLogger(DnsResourceReferencesImpl.class);
+
+ private final DnsResourceReferencesClient innerClient;
+
+ private final com.azure.resourcemanager.dns.generated.DnsManager serviceManager;
+
+ public DnsResourceReferencesImpl(DnsResourceReferencesClient innerClient,
+ com.azure.resourcemanager.dns.generated.DnsManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getByTargetResourcesWithResponse(DnsResourceReferenceRequest parameters,
+ Context context) {
+ Response inner
+ = this.serviceClient().getByTargetResourcesWithResponse(parameters, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new DnsResourceReferenceResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public DnsResourceReferenceResult getByTargetResources(DnsResourceReferenceRequest parameters) {
+ DnsResourceReferenceResultInner inner = this.serviceClient().getByTargetResources(parameters);
+ if (inner != null) {
+ return new DnsResourceReferenceResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private DnsResourceReferencesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.dns.generated.DnsManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnssecConfigImpl.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnssecConfigImpl.java
new file mode 100644
index 000000000000..63860beb6042
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnssecConfigImpl.java
@@ -0,0 +1,64 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.dns.generated.fluent.models.DnssecConfigInner;
+import com.azure.resourcemanager.dns.generated.models.DnssecConfig;
+import com.azure.resourcemanager.dns.generated.models.SigningKey;
+import java.util.Collections;
+import java.util.List;
+
+public final class DnssecConfigImpl implements DnssecConfig {
+ private DnssecConfigInner innerObject;
+
+ private final com.azure.resourcemanager.dns.generated.DnsManager serviceManager;
+
+ DnssecConfigImpl(DnssecConfigInner innerObject, com.azure.resourcemanager.dns.generated.DnsManager 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 etag() {
+ return this.innerModel().etag();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public List signingKeys() {
+ List inner = this.innerModel().signingKeys();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public DnssecConfigInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.dns.generated.DnsManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnssecConfigsClientImpl.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnssecConfigsClientImpl.java
new file mode 100644
index 000000000000..4ecd89e1263e
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnssecConfigsClientImpl.java
@@ -0,0 +1,969 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.implementation;
+
+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.dns.generated.fluent.DnssecConfigsClient;
+import com.azure.resourcemanager.dns.generated.fluent.models.DnssecConfigInner;
+import com.azure.resourcemanager.dns.generated.models.DnssecConfigListResult;
+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 DnssecConfigsClient.
+ */
+public final class DnssecConfigsClientImpl implements DnssecConfigsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final DnssecConfigsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DnsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DnssecConfigsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DnssecConfigsClientImpl(DnsManagementClientImpl client) {
+ this.service
+ = RestProxy.create(DnssecConfigsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DnsManagementClientDnssecConfigs to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DnsManagementClientD")
+ public interface DnssecConfigsService {
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/dnssecConfigs/default")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("zoneName") String zoneName,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/dnssecConfigs/default")
+ @ExpectedResponses({ 200, 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("zoneName") String zoneName,
+ @HeaderParam("If-Match") String ifMatch, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/dnssecConfigs/default")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("zoneName") String zoneName,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/dnssecConfigs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByDnsZone(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("zoneName") String zoneName,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByDnsZoneNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of the DNSSEC configuration. Omit this value to always overwrite the DNSSEC
+ * configuration. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow this DNSSEC configuration to be created, but to prevent updating existing
+ * DNSSEC configuration. Other values will be ignored.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the DNSSEC configuration along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String zoneName,
+ String ifMatch, String ifNoneMatch) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (zoneName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter zoneName 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.createOrUpdate(this.client.getEndpoint(), resourceGroupName, zoneName,
+ ifMatch, ifNoneMatch, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of the DNSSEC configuration. Omit this value to always overwrite the DNSSEC
+ * configuration. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow this DNSSEC configuration to be created, but to prevent updating existing
+ * DNSSEC configuration. Other values will be ignored.
+ * @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 represents the DNSSEC configuration along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String zoneName,
+ String ifMatch, String ifNoneMatch, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (zoneName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter zoneName 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.createOrUpdate(this.client.getEndpoint(), resourceGroupName, zoneName, ifMatch, ifNoneMatch,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);
+ }
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of the DNSSEC configuration. Omit this value to always overwrite the DNSSEC
+ * configuration. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow this DNSSEC configuration to be created, but to prevent updating existing
+ * DNSSEC configuration. Other values will be ignored.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 represents the DNSSEC configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DnssecConfigInner>
+ beginCreateOrUpdateAsync(String resourceGroupName, String zoneName, String ifMatch, String ifNoneMatch) {
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, zoneName, ifMatch, ifNoneMatch);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DnssecConfigInner.class, DnssecConfigInner.class, this.client.getContext());
+ }
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 represents the DNSSEC configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DnssecConfigInner>
+ beginCreateOrUpdateAsync(String resourceGroupName, String zoneName) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, zoneName, ifMatch, ifNoneMatch);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DnssecConfigInner.class, DnssecConfigInner.class, this.client.getContext());
+ }
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of the DNSSEC configuration. Omit this value to always overwrite the DNSSEC
+ * configuration. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow this DNSSEC configuration to be created, but to prevent updating existing
+ * DNSSEC configuration. Other values will be ignored.
+ * @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 represents the DNSSEC configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DnssecConfigInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String zoneName, String ifMatch, String ifNoneMatch, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, zoneName, ifMatch, ifNoneMatch, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DnssecConfigInner.class, DnssecConfigInner.class, context);
+ }
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 represents the DNSSEC configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DnssecConfigInner> beginCreateOrUpdate(String resourceGroupName,
+ String zoneName) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return this.beginCreateOrUpdateAsync(resourceGroupName, zoneName, ifMatch, ifNoneMatch).getSyncPoller();
+ }
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of the DNSSEC configuration. Omit this value to always overwrite the DNSSEC
+ * configuration. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow this DNSSEC configuration to be created, but to prevent updating existing
+ * DNSSEC configuration. Other values will be ignored.
+ * @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 represents the DNSSEC configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DnssecConfigInner> beginCreateOrUpdate(String resourceGroupName,
+ String zoneName, String ifMatch, String ifNoneMatch, Context context) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, zoneName, ifMatch, ifNoneMatch, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of the DNSSEC configuration. Omit this value to always overwrite the DNSSEC
+ * configuration. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow this DNSSEC configuration to be created, but to prevent updating existing
+ * DNSSEC configuration. Other values will be ignored.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the DNSSEC configuration on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String zoneName, String ifMatch,
+ String ifNoneMatch) {
+ return beginCreateOrUpdateAsync(resourceGroupName, zoneName, ifMatch, ifNoneMatch).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the DNSSEC configuration on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String zoneName) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return beginCreateOrUpdateAsync(resourceGroupName, zoneName, ifMatch, ifNoneMatch).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of the DNSSEC configuration. Omit this value to always overwrite the DNSSEC
+ * configuration. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow this DNSSEC configuration to be created, but to prevent updating existing
+ * DNSSEC configuration. Other values will be ignored.
+ * @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 represents the DNSSEC configuration on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String zoneName, String ifMatch,
+ String ifNoneMatch, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, zoneName, ifMatch, ifNoneMatch, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the DNSSEC configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DnssecConfigInner createOrUpdate(String resourceGroupName, String zoneName) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return createOrUpdateAsync(resourceGroupName, zoneName, ifMatch, ifNoneMatch).block();
+ }
+
+ /**
+ * Creates or updates the DNSSEC configuration on a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of the DNSSEC configuration. Omit this value to always overwrite the DNSSEC
+ * configuration. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.
+ * @param ifNoneMatch Set to '*' to allow this DNSSEC configuration to be created, but to prevent updating existing
+ * DNSSEC configuration. Other values will be ignored.
+ * @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 represents the DNSSEC configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DnssecConfigInner createOrUpdate(String resourceGroupName, String zoneName, String ifMatch,
+ String ifNoneMatch, Context context) {
+ return createOrUpdateAsync(resourceGroupName, zoneName, ifMatch, ifNoneMatch, context).block();
+ }
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of this DNSSEC configuration. Omit this value to always delete the DNSSEC configuration.
+ * Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String zoneName,
+ String ifMatch) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (zoneName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter zoneName 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.delete(this.client.getEndpoint(), resourceGroupName, zoneName, ifMatch,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of this DNSSEC configuration. Omit this value to always delete the DNSSEC configuration.
+ * Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @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 zoneName,
+ String ifMatch, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (zoneName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter zoneName 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.delete(this.client.getEndpoint(), resourceGroupName, zoneName, ifMatch,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);
+ }
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of this DNSSEC configuration. Omit this value to always delete the DNSSEC configuration.
+ * Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String zoneName,
+ String ifMatch) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, zoneName, ifMatch);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 zoneName) {
+ final String ifMatch = null;
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, zoneName, ifMatch);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of this DNSSEC configuration. Omit this value to always delete the DNSSEC configuration.
+ * Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @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 zoneName,
+ String ifMatch, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, zoneName, ifMatch, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 zoneName) {
+ final String ifMatch = null;
+ return this.beginDeleteAsync(resourceGroupName, zoneName, ifMatch).getSyncPoller();
+ }
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of this DNSSEC configuration. Omit this value to always delete the DNSSEC configuration.
+ * Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @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 zoneName, String ifMatch,
+ Context context) {
+ return this.beginDeleteAsync(resourceGroupName, zoneName, ifMatch, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of this DNSSEC configuration. Omit this value to always delete the DNSSEC configuration.
+ * Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String zoneName, String ifMatch) {
+ return beginDeleteAsync(resourceGroupName, zoneName, ifMatch).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 zoneName) {
+ final String ifMatch = null;
+ return beginDeleteAsync(resourceGroupName, zoneName, ifMatch).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of this DNSSEC configuration. Omit this value to always delete the DNSSEC configuration.
+ * Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @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 zoneName, String ifMatch, Context context) {
+ return beginDeleteAsync(resourceGroupName, zoneName, ifMatch, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 zoneName) {
+ final String ifMatch = null;
+ deleteAsync(resourceGroupName, zoneName, ifMatch).block();
+ }
+
+ /**
+ * Deletes the DNSSEC configuration on a DNS zone. This operation cannot be undone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @param ifMatch The etag of this DNSSEC configuration. Omit this value to always delete the DNSSEC configuration.
+ * Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String zoneName, String ifMatch, Context context) {
+ deleteAsync(resourceGroupName, zoneName, ifMatch, context).block();
+ }
+
+ /**
+ * Gets the DNSSEC configuration.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the DNSSEC configuration along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String zoneName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (zoneName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter zoneName 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.get(this.client.getEndpoint(), resourceGroupName, zoneName,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the DNSSEC configuration.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 DNSSEC configuration along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String zoneName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (zoneName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter zoneName 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.get(this.client.getEndpoint(), resourceGroupName, zoneName, this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context);
+ }
+
+ /**
+ * Gets the DNSSEC configuration.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the DNSSEC configuration on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String zoneName) {
+ return getWithResponseAsync(resourceGroupName, zoneName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the DNSSEC configuration.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 DNSSEC configuration along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String zoneName, Context context) {
+ return getWithResponseAsync(resourceGroupName, zoneName, context).block();
+ }
+
+ /**
+ * Gets the DNSSEC configuration.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the DNSSEC configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DnssecConfigInner get(String resourceGroupName, String zoneName) {
+ return getWithResponse(resourceGroupName, zoneName, Context.NONE).getValue();
+ }
+
+ /**
+ * Lists the DNSSEC configurations in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 to a List DNSSEC configurations operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByDnsZoneSinglePageAsync(String resourceGroupName,
+ String zoneName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (zoneName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter zoneName 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.listByDnsZone(this.client.getEndpoint(), resourceGroupName, zoneName,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists the DNSSEC configurations in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 to a List DNSSEC configurations operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByDnsZoneSinglePageAsync(String resourceGroupName,
+ String zoneName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (zoneName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter zoneName 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
+ .listByDnsZone(this.client.getEndpoint(), resourceGroupName, zoneName, this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Lists the DNSSEC configurations in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 to a List DNSSEC configurations operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByDnsZoneAsync(String resourceGroupName, String zoneName) {
+ return new PagedFlux<>(() -> listByDnsZoneSinglePageAsync(resourceGroupName, zoneName),
+ nextLink -> listByDnsZoneNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the DNSSEC configurations in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 to a List DNSSEC configurations operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByDnsZoneAsync(String resourceGroupName, String zoneName,
+ Context context) {
+ return new PagedFlux<>(() -> listByDnsZoneSinglePageAsync(resourceGroupName, zoneName, context),
+ nextLink -> listByDnsZoneNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists the DNSSEC configurations in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 to a List DNSSEC configurations operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByDnsZone(String resourceGroupName, String zoneName) {
+ return new PagedIterable<>(listByDnsZoneAsync(resourceGroupName, zoneName));
+ }
+
+ /**
+ * Lists the DNSSEC configurations in a DNS zone.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param zoneName The name of the DNS zone (without a terminating dot).
+ * @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 to a List DNSSEC configurations operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByDnsZone(String resourceGroupName, String zoneName, Context context) {
+ return new PagedIterable<>(listByDnsZoneAsync(resourceGroupName, zoneName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 to a List DNSSEC configurations operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByDnsZoneNextSinglePageAsync(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.listByDnsZoneNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 to a List DNSSEC configurations operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByDnsZoneNextSinglePageAsync(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.listByDnsZoneNext(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/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnssecConfigsImpl.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnssecConfigsImpl.java
new file mode 100644
index 000000000000..03355ae2a79d
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/DnssecConfigsImpl.java
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dns.generated.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.dns.generated.fluent.DnssecConfigsClient;
+import com.azure.resourcemanager.dns.generated.fluent.models.DnssecConfigInner;
+import com.azure.resourcemanager.dns.generated.models.DnssecConfig;
+import com.azure.resourcemanager.dns.generated.models.DnssecConfigs;
+
+public final class DnssecConfigsImpl implements DnssecConfigs {
+ private static final ClientLogger LOGGER = new ClientLogger(DnssecConfigsImpl.class);
+
+ private final DnssecConfigsClient innerClient;
+
+ private final com.azure.resourcemanager.dns.generated.DnsManager serviceManager;
+
+ public DnssecConfigsImpl(DnssecConfigsClient innerClient,
+ com.azure.resourcemanager.dns.generated.DnsManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public DnssecConfig createOrUpdate(String resourceGroupName, String zoneName) {
+ DnssecConfigInner inner = this.serviceClient().createOrUpdate(resourceGroupName, zoneName);
+ if (inner != null) {
+ return new DnssecConfigImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public DnssecConfig createOrUpdate(String resourceGroupName, String zoneName, String ifMatch, String ifNoneMatch,
+ Context context) {
+ DnssecConfigInner inner
+ = this.serviceClient().createOrUpdate(resourceGroupName, zoneName, ifMatch, ifNoneMatch, context);
+ if (inner != null) {
+ return new DnssecConfigImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String zoneName) {
+ this.serviceClient().delete(resourceGroupName, zoneName);
+ }
+
+ public void delete(String resourceGroupName, String zoneName, String ifMatch, Context context) {
+ this.serviceClient().delete(resourceGroupName, zoneName, ifMatch, context);
+ }
+
+ public Response getWithResponse(String resourceGroupName, String zoneName, Context context) {
+ Response inner = this.serviceClient().getWithResponse(resourceGroupName, zoneName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new DnssecConfigImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public DnssecConfig get(String resourceGroupName, String zoneName) {
+ DnssecConfigInner inner = this.serviceClient().get(resourceGroupName, zoneName);
+ if (inner != null) {
+ return new DnssecConfigImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listByDnsZone(String resourceGroupName, String zoneName) {
+ PagedIterable inner = this.serviceClient().listByDnsZone(resourceGroupName, zoneName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DnssecConfigImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByDnsZone(String resourceGroupName, String zoneName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByDnsZone(resourceGroupName, zoneName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DnssecConfigImpl(inner1, this.manager()));
+ }
+
+ private DnssecConfigsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.dns.generated.DnsManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/RecordSetImpl.java b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/RecordSetImpl.java
new file mode 100644
index 000000000000..2900c22956c2
--- /dev/null
+++ b/sdk/dns/azure-resourcemanager-dns-generated/src/main/java/com/azure/resourcemanager/dns/generated/implementation/RecordSetImpl.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.dns.generated.implementation;
+
+import com.azure.core.management.SubResource;
+import com.azure.resourcemanager.dns.generated.fluent.models.RecordSetInner;
+import com.azure.resourcemanager.dns.generated.models.ARecord;
+import com.azure.resourcemanager.dns.generated.models.AaaaRecord;
+import com.azure.resourcemanager.dns.generated.models.CaaRecord;
+import com.azure.resourcemanager.dns.generated.models.CnameRecord;
+import com.azure.resourcemanager.dns.generated.models.DsRecord;
+import com.azure.resourcemanager.dns.generated.models.MxRecord;
+import com.azure.resourcemanager.dns.generated.models.NaptrRecord;
+import com.azure.resourcemanager.dns.generated.models.NsRecord;
+import com.azure.resourcemanager.dns.generated.models.PtrRecord;
+import com.azure.resourcemanager.dns.generated.models.RecordSet;
+import com.azure.resourcemanager.dns.generated.models.SoaRecord;
+import com.azure.resourcemanager.dns.generated.models.SrvRecord;
+import com.azure.resourcemanager.dns.generated.models.TlsaRecord;
+import com.azure.resourcemanager.dns.generated.models.TxtRecord;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class RecordSetImpl implements RecordSet {
+ private RecordSetInner innerObject;
+
+ private final com.azure.resourcemanager.dns.generated.DnsManager serviceManager;
+
+ RecordSetImpl(RecordSetInner innerObject, com.azure.resourcemanager.dns.generated.DnsManager 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 etag() {
+ return this.innerModel().etag();
+ }
+
+ public Map metadata() {
+ Map inner = this.innerModel().metadata();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public Long ttl() {
+ return this.innerModel().ttl();
+ }
+
+ public String fqdn() {
+ return this.innerModel().fqdn();
+ }
+
+ public String provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public SubResource targetResource() {
+ return this.innerModel().targetResource();
+ }
+
+ public SubResource trafficManagementProfile() {
+ return this.innerModel().trafficManagementProfile();
+ }
+
+ public List aRecords() {
+ List inner = this.innerModel().aRecords();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List aaaaRecords() {
+ List inner = this.innerModel().aaaaRecords();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List mxRecords() {
+ List inner = this.innerModel().mxRecords();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List nsRecords() {
+ List inner = this.innerModel().nsRecords();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List ptrRecords() {
+ List inner = this.innerModel().ptrRecords();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List