diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index c5a8e7499fa2..a3b5eb606fbd 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -208,6 +208,7 @@ com.azure.resourcemanager:azure-resourcemanager-storagecache;1.0.0-beta.1;1.0.0-
com.azure.resourcemanager:azure-resourcemanager-redisenterprise;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-hybridkubernetes;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-iothub;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-peering;1.0.0-beta.1;1.0.0-beta.1
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
# version. Unreleased dependencies are only valid for dependency versions.
diff --git a/pom.xml b/pom.xml
index c45b7dcd31ad..31abcf4d3a96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -604,6 +604,7 @@
sdk/monitorsdk/mysqlsdk/netapp
+ sdk/peeringsdk/postgresqlsdk/quantumsdk/recoveryservices
diff --git a/sdk/peering/azure-resourcemanager-peering/CHANGELOG.md b/sdk/peering/azure-resourcemanager-peering/CHANGELOG.md
new file mode 100644
index 000000000000..22f05d094e3d
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-03-03)
+
+- Azure Resource Manager Peering client library for Java. This package contains Microsoft Azure SDK for Peering Management SDK. Peering Client. Package tag package-2021-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/peering/azure-resourcemanager-peering/README.md b/sdk/peering/azure-resourcemanager-peering/README.md
new file mode 100644
index 000000000000..00d3a5d8a383
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/README.md
@@ -0,0 +1,99 @@
+# Azure Resource Manager Peering client library for Java
+
+Azure Resource Manager Peering client library for Java.
+
+This package contains Microsoft Azure SDK for Peering Management SDK. Peering Client. Package tag package-2021-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## We'd love to hear your feedback
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-peering;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-peering
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Include the recommended packages
+
+Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
+
+[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+
+### Authentication
+
+By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+
+- `AZURE_CLIENT_ID` for Azure client ID.
+- `AZURE_TENANT_ID` for Azure tenant ID.
+- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+
+In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+
+With above configuration, `azure` client can be authenticated by following code:
+
+```java
+AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+TokenCredential credential = new DefaultAzureCredentialBuilder()
+ .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
+ .build();
+PeeringManager manager = PeeringManager
+ .authenticate(credential, profile);
+```
+
+The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+
+See [Authentication][authenticate] for more options.
+
+## Key concepts
+
+See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
+
+## Examples
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/master/CONTRIBUTING.md).
+
+1. Fork it
+1. Create your feature branch (`git checkout -b my-new-feature`)
+1. Commit your changes (`git commit -am 'Add some feature'`)
+1. Push to the branch (`git push origin my-new-feature`)
+1. Create new Pull Request
+
+
+[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
+[docs]: https://azure.github.io/azure-sdk-for-java/
+[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/peering/azure-resourcemanager-peering/pom.xml b/sdk/peering/azure-resourcemanager-peering/pom.xml
new file mode 100644
index 000000000000..69914d844c37
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/pom.xml
@@ -0,0 +1,67 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-peering
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for Peering Management
+ This package contains Microsoft Azure SDK for Peering Management SDK. Peering Client. Package tag package-2021-01-01. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core
+ 1.13.0
+
+
+ com.azure
+ azure-core-management
+ 1.1.1
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.5
+
+ true
+
+
+
+
+
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/PeeringManager.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/PeeringManager.java
new file mode 100644
index 000000000000..21f0b4357be5
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/PeeringManager.java
@@ -0,0 +1,385 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.profile.AzureProfile;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.fluent.PeeringManagementClient;
+import com.azure.resourcemanager.peering.implementation.CdnPeeringPrefixesImpl;
+import com.azure.resourcemanager.peering.implementation.LegacyPeeringsImpl;
+import com.azure.resourcemanager.peering.implementation.OperationsImpl;
+import com.azure.resourcemanager.peering.implementation.PeerAsnsImpl;
+import com.azure.resourcemanager.peering.implementation.PeeringLocationsImpl;
+import com.azure.resourcemanager.peering.implementation.PeeringManagementClientBuilder;
+import com.azure.resourcemanager.peering.implementation.PeeringServiceCountriesImpl;
+import com.azure.resourcemanager.peering.implementation.PeeringServiceLocationsImpl;
+import com.azure.resourcemanager.peering.implementation.PeeringServiceProvidersImpl;
+import com.azure.resourcemanager.peering.implementation.PeeringServicesImpl;
+import com.azure.resourcemanager.peering.implementation.PeeringsImpl;
+import com.azure.resourcemanager.peering.implementation.PrefixesImpl;
+import com.azure.resourcemanager.peering.implementation.ReceivedRoutesImpl;
+import com.azure.resourcemanager.peering.implementation.RegisteredAsnsImpl;
+import com.azure.resourcemanager.peering.implementation.RegisteredPrefixesImpl;
+import com.azure.resourcemanager.peering.implementation.ResourceProvidersImpl;
+import com.azure.resourcemanager.peering.models.CdnPeeringPrefixes;
+import com.azure.resourcemanager.peering.models.LegacyPeerings;
+import com.azure.resourcemanager.peering.models.Operations;
+import com.azure.resourcemanager.peering.models.PeerAsns;
+import com.azure.resourcemanager.peering.models.PeeringLocations;
+import com.azure.resourcemanager.peering.models.PeeringServiceCountries;
+import com.azure.resourcemanager.peering.models.PeeringServiceLocations;
+import com.azure.resourcemanager.peering.models.PeeringServiceProviders;
+import com.azure.resourcemanager.peering.models.PeeringServices;
+import com.azure.resourcemanager.peering.models.Peerings;
+import com.azure.resourcemanager.peering.models.Prefixes;
+import com.azure.resourcemanager.peering.models.ReceivedRoutes;
+import com.azure.resourcemanager.peering.models.RegisteredAsns;
+import com.azure.resourcemanager.peering.models.RegisteredPrefixes;
+import com.azure.resourcemanager.peering.models.ResourceProviders;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Entry point to PeeringManager. Peering Client. */
+public final class PeeringManager {
+ private CdnPeeringPrefixes cdnPeeringPrefixes;
+
+ private ResourceProviders resourceProviders;
+
+ private LegacyPeerings legacyPeerings;
+
+ private Operations operations;
+
+ private PeerAsns peerAsns;
+
+ private PeeringLocations peeringLocations;
+
+ private RegisteredAsns registeredAsns;
+
+ private RegisteredPrefixes registeredPrefixes;
+
+ private Peerings peerings;
+
+ private ReceivedRoutes receivedRoutes;
+
+ private PeeringServiceCountries peeringServiceCountries;
+
+ private PeeringServiceLocations peeringServiceLocations;
+
+ private Prefixes prefixes;
+
+ private PeeringServiceProviders peeringServiceProviders;
+
+ private PeeringServices peeringServices;
+
+ private final PeeringManagementClient clientObject;
+
+ private PeeringManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new PeeringManagementClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of Peering service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Peering service API instance.
+ */
+ public static PeeringManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create PeeringManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new PeeringManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private final ClientLogger logger = new ClientLogger(Configurable.class);
+
+ private HttpClient httpClient;
+ private HttpLogOptions httpLogOptions;
+ private final List policies = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ 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;
+ }
+
+ /**
+ * 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 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, "'retryPolicy' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of Peering service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Peering service API instance.
+ */
+ public PeeringManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.peering")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (retryPolicy == null) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new RequestIdPolicy());
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies
+ .add(
+ new BearerTokenAuthenticationPolicy(
+ credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new PeeringManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of CdnPeeringPrefixes. */
+ public CdnPeeringPrefixes cdnPeeringPrefixes() {
+ if (this.cdnPeeringPrefixes == null) {
+ this.cdnPeeringPrefixes = new CdnPeeringPrefixesImpl(clientObject.getCdnPeeringPrefixes(), this);
+ }
+ return cdnPeeringPrefixes;
+ }
+
+ /** @return Resource collection API of ResourceProviders. */
+ public ResourceProviders resourceProviders() {
+ if (this.resourceProviders == null) {
+ this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
+ }
+ return resourceProviders;
+ }
+
+ /** @return Resource collection API of LegacyPeerings. */
+ public LegacyPeerings legacyPeerings() {
+ if (this.legacyPeerings == null) {
+ this.legacyPeerings = new LegacyPeeringsImpl(clientObject.getLegacyPeerings(), this);
+ }
+ return legacyPeerings;
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /** @return Resource collection API of PeerAsns. */
+ public PeerAsns peerAsns() {
+ if (this.peerAsns == null) {
+ this.peerAsns = new PeerAsnsImpl(clientObject.getPeerAsns(), this);
+ }
+ return peerAsns;
+ }
+
+ /** @return Resource collection API of PeeringLocations. */
+ public PeeringLocations peeringLocations() {
+ if (this.peeringLocations == null) {
+ this.peeringLocations = new PeeringLocationsImpl(clientObject.getPeeringLocations(), this);
+ }
+ return peeringLocations;
+ }
+
+ /** @return Resource collection API of RegisteredAsns. */
+ public RegisteredAsns registeredAsns() {
+ if (this.registeredAsns == null) {
+ this.registeredAsns = new RegisteredAsnsImpl(clientObject.getRegisteredAsns(), this);
+ }
+ return registeredAsns;
+ }
+
+ /** @return Resource collection API of RegisteredPrefixes. */
+ public RegisteredPrefixes registeredPrefixes() {
+ if (this.registeredPrefixes == null) {
+ this.registeredPrefixes = new RegisteredPrefixesImpl(clientObject.getRegisteredPrefixes(), this);
+ }
+ return registeredPrefixes;
+ }
+
+ /** @return Resource collection API of Peerings. */
+ public Peerings peerings() {
+ if (this.peerings == null) {
+ this.peerings = new PeeringsImpl(clientObject.getPeerings(), this);
+ }
+ return peerings;
+ }
+
+ /** @return Resource collection API of ReceivedRoutes. */
+ public ReceivedRoutes receivedRoutes() {
+ if (this.receivedRoutes == null) {
+ this.receivedRoutes = new ReceivedRoutesImpl(clientObject.getReceivedRoutes(), this);
+ }
+ return receivedRoutes;
+ }
+
+ /** @return Resource collection API of PeeringServiceCountries. */
+ public PeeringServiceCountries peeringServiceCountries() {
+ if (this.peeringServiceCountries == null) {
+ this.peeringServiceCountries =
+ new PeeringServiceCountriesImpl(clientObject.getPeeringServiceCountries(), this);
+ }
+ return peeringServiceCountries;
+ }
+
+ /** @return Resource collection API of PeeringServiceLocations. */
+ public PeeringServiceLocations peeringServiceLocations() {
+ if (this.peeringServiceLocations == null) {
+ this.peeringServiceLocations =
+ new PeeringServiceLocationsImpl(clientObject.getPeeringServiceLocations(), this);
+ }
+ return peeringServiceLocations;
+ }
+
+ /** @return Resource collection API of Prefixes. */
+ public Prefixes prefixes() {
+ if (this.prefixes == null) {
+ this.prefixes = new PrefixesImpl(clientObject.getPrefixes(), this);
+ }
+ return prefixes;
+ }
+
+ /** @return Resource collection API of PeeringServiceProviders. */
+ public PeeringServiceProviders peeringServiceProviders() {
+ if (this.peeringServiceProviders == null) {
+ this.peeringServiceProviders =
+ new PeeringServiceProvidersImpl(clientObject.getPeeringServiceProviders(), this);
+ }
+ return peeringServiceProviders;
+ }
+
+ /** @return Resource collection API of PeeringServices. */
+ public PeeringServices peeringServices() {
+ if (this.peeringServices == null) {
+ this.peeringServices = new PeeringServicesImpl(clientObject.getPeeringServices(), this);
+ }
+ return peeringServices;
+ }
+
+ /**
+ * @return Wrapped service client PeeringManagementClient providing direct access to the underlying auto-generated
+ * API implementation, based on Azure REST API.
+ */
+ public PeeringManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/CdnPeeringPrefixesClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/CdnPeeringPrefixesClient.java
new file mode 100644
index 000000000000..50ed5b9c39aa
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/CdnPeeringPrefixesClient.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.peering.fluent.models.CdnPeeringPrefixInner;
+
+/** An instance of this class provides access to all the operations defined in CdnPeeringPrefixesClient. */
+public interface CdnPeeringPrefixesClient {
+ /**
+ * Lists all of the advertised prefixes for the specified peering location.
+ *
+ * @param peeringLocation The peering location.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of CDN peering prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String peeringLocation);
+
+ /**
+ * Lists all of the advertised prefixes for the specified peering location.
+ *
+ * @param peeringLocation The peering location.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of CDN peering prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String peeringLocation, Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/LegacyPeeringsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/LegacyPeeringsClient.java
new file mode 100644
index 000000000000..c8cba0bec65e
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/LegacyPeeringsClient.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.peering.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.peering.fluent.models.PeeringInner;
+import com.azure.resourcemanager.peering.models.LegacyPeeringsKind;
+
+/** An instance of this class provides access to all the operations defined in LegacyPeeringsClient. */
+public interface LegacyPeeringsClient {
+ /**
+ * Lists all of the legacy peerings under the given subscription matching the specified kind and location.
+ *
+ * @param peeringLocation The location of the peering.
+ * @param kind The kind of the peering.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String peeringLocation, LegacyPeeringsKind kind);
+
+ /**
+ * Lists all of the legacy peerings under the given subscription matching the specified kind and location.
+ *
+ * @param peeringLocation The location of the peering.
+ * @param kind The kind of the peering.
+ * @param asn The ASN number associated with a legacy peering.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String peeringLocation, LegacyPeeringsKind kind, Integer asn, Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/OperationsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/OperationsClient.java
new file mode 100644
index 000000000000..acbe3f579e2a
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/OperationsClient.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.peering.fluent.models.OperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Lists all of the available API operations for peering resources.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering API operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all of the available API operations for peering resources.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering API operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeerAsnsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeerAsnsClient.java
new file mode 100644
index 000000000000..6f3505ddf197
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeerAsnsClient.java
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.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.peering.fluent.models.PeerAsnInner;
+
+/** An instance of this class provides access to all the operations defined in PeerAsnsClient. */
+public interface PeerAsnsClient {
+ /**
+ * Gets the peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the peer ASN with the specified name under the given subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeerAsnInner get(String peerAsnName);
+
+ /**
+ * Gets the peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the peer ASN with the specified name under the given subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String peerAsnName, Context context);
+
+ /**
+ * Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @param peerAsn The peer ASN.
+ * @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 essential information related to the peer's ASN.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeerAsnInner createOrUpdate(String peerAsnName, PeerAsnInner peerAsn);
+
+ /**
+ * Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @param peerAsn The peer ASN.
+ * @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 essential information related to the peer's ASN.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String peerAsnName, PeerAsnInner peerAsn, Context context);
+
+ /**
+ * Deletes an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String peerAsnName);
+
+ /**
+ * Deletes an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String peerAsnName, Context context);
+
+ /**
+ * Lists all of the peer ASNs under the given 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 paginated list of peer ASNs.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all of the peer ASNs under the given subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peer ASNs.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringLocationsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringLocationsClient.java
new file mode 100644
index 000000000000..0b3945229967
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringLocationsClient.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.peering.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.peering.fluent.models.PeeringLocationInner;
+import com.azure.resourcemanager.peering.models.PeeringLocationsDirectPeeringType;
+import com.azure.resourcemanager.peering.models.PeeringLocationsKind;
+
+/** An instance of this class provides access to all the operations defined in PeeringLocationsClient. */
+public interface PeeringLocationsClient {
+ /**
+ * Lists all of the available peering locations for the specified kind of peering.
+ *
+ * @param kind The kind of the peering.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering locations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(PeeringLocationsKind kind);
+
+ /**
+ * Lists all of the available peering locations for the specified kind of peering.
+ *
+ * @param kind The kind of the peering.
+ * @param directPeeringType The type of direct peering.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering locations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ PeeringLocationsKind kind, PeeringLocationsDirectPeeringType directPeeringType, Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringManagementClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringManagementClient.java
new file mode 100644
index 000000000000..70c527cbb0ea
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringManagementClient.java
@@ -0,0 +1,151 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for PeeringManagementClient class. */
+public interface PeeringManagementClient {
+ /**
+ * Gets The Azure subscription ID.
+ *
+ * @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 CdnPeeringPrefixesClient object to access its operations.
+ *
+ * @return the CdnPeeringPrefixesClient object.
+ */
+ CdnPeeringPrefixesClient getCdnPeeringPrefixes();
+
+ /**
+ * Gets the ResourceProvidersClient object to access its operations.
+ *
+ * @return the ResourceProvidersClient object.
+ */
+ ResourceProvidersClient getResourceProviders();
+
+ /**
+ * Gets the LegacyPeeringsClient object to access its operations.
+ *
+ * @return the LegacyPeeringsClient object.
+ */
+ LegacyPeeringsClient getLegacyPeerings();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the PeerAsnsClient object to access its operations.
+ *
+ * @return the PeerAsnsClient object.
+ */
+ PeerAsnsClient getPeerAsns();
+
+ /**
+ * Gets the PeeringLocationsClient object to access its operations.
+ *
+ * @return the PeeringLocationsClient object.
+ */
+ PeeringLocationsClient getPeeringLocations();
+
+ /**
+ * Gets the RegisteredAsnsClient object to access its operations.
+ *
+ * @return the RegisteredAsnsClient object.
+ */
+ RegisteredAsnsClient getRegisteredAsns();
+
+ /**
+ * Gets the RegisteredPrefixesClient object to access its operations.
+ *
+ * @return the RegisteredPrefixesClient object.
+ */
+ RegisteredPrefixesClient getRegisteredPrefixes();
+
+ /**
+ * Gets the PeeringsClient object to access its operations.
+ *
+ * @return the PeeringsClient object.
+ */
+ PeeringsClient getPeerings();
+
+ /**
+ * Gets the ReceivedRoutesClient object to access its operations.
+ *
+ * @return the ReceivedRoutesClient object.
+ */
+ ReceivedRoutesClient getReceivedRoutes();
+
+ /**
+ * Gets the PeeringServiceCountriesClient object to access its operations.
+ *
+ * @return the PeeringServiceCountriesClient object.
+ */
+ PeeringServiceCountriesClient getPeeringServiceCountries();
+
+ /**
+ * Gets the PeeringServiceLocationsClient object to access its operations.
+ *
+ * @return the PeeringServiceLocationsClient object.
+ */
+ PeeringServiceLocationsClient getPeeringServiceLocations();
+
+ /**
+ * Gets the PrefixesClient object to access its operations.
+ *
+ * @return the PrefixesClient object.
+ */
+ PrefixesClient getPrefixes();
+
+ /**
+ * Gets the PeeringServiceProvidersClient object to access its operations.
+ *
+ * @return the PeeringServiceProvidersClient object.
+ */
+ PeeringServiceProvidersClient getPeeringServiceProviders();
+
+ /**
+ * Gets the PeeringServicesClient object to access its operations.
+ *
+ * @return the PeeringServicesClient object.
+ */
+ PeeringServicesClient getPeeringServices();
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceCountriesClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceCountriesClient.java
new file mode 100644
index 000000000000..9e27c5b6e5c4
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceCountriesClient.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.management.Resource;
+import com.azure.core.util.Context;
+
+/** An instance of this class provides access to all the operations defined in PeeringServiceCountriesClient. */
+public interface PeeringServiceCountriesClient {
+ /**
+ * Lists all of the available countries for peering service.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering service countries.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all of the available countries for peering service.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering service countries.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceLocationsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceLocationsClient.java
new file mode 100644
index 000000000000..69f837fdd14c
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceLocationsClient.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.peering.fluent.models.PeeringServiceLocationInner;
+
+/** An instance of this class provides access to all the operations defined in PeeringServiceLocationsClient. */
+public interface PeeringServiceLocationsClient {
+ /**
+ * Lists all of the available locations for peering service.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering service locations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all of the available locations for peering service.
+ *
+ * @param country The country of interest, in which the locations are to be present.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering service locations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String country, Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceProvidersClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceProvidersClient.java
new file mode 100644
index 000000000000..f09e1f33e5c6
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceProvidersClient.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.peering.fluent.models.PeeringServiceProviderInner;
+
+/** An instance of this class provides access to all the operations defined in PeeringServiceProvidersClient. */
+public interface PeeringServiceProvidersClient {
+ /**
+ * Lists all of the available peering service locations for the specified kind of peering.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering service providers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all of the available peering service locations for the specified kind of peering.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering service providers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServicesClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServicesClient.java
new file mode 100644
index 000000000000..cbbd7b3280ef
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServicesClient.java
@@ -0,0 +1,180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.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.peering.fluent.models.PeeringServiceInner;
+import com.azure.resourcemanager.peering.models.ResourceTags;
+
+/** An instance of this class provides access to all the operations defined in PeeringServicesClient. */
+public interface PeeringServicesClient {
+ /**
+ * Gets an existing peering service with the specified name under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering.
+ * @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 an existing peering service with the specified name under the given subscription and resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeeringServiceInner getByResourceGroup(String resourceGroupName, String peeringServiceName);
+
+ /**
+ * Gets an existing peering service with the specified name under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering.
+ * @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 an existing peering service with the specified name under the given subscription and resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String peeringServiceName, Context context);
+
+ /**
+ * Creates a new peering service or updates an existing peering with the specified name under the given subscription
+ * and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param peeringService The properties needed to create or update a peering service.
+ * @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 peering Service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeeringServiceInner createOrUpdate(
+ String resourceGroupName, String peeringServiceName, PeeringServiceInner peeringService);
+
+ /**
+ * Creates a new peering service or updates an existing peering with the specified name under the given subscription
+ * and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param peeringService The properties needed to create or update a peering service.
+ * @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 peering Service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName, String peeringServiceName, PeeringServiceInner peeringService, Context context);
+
+ /**
+ * Deletes an existing peering service with the specified name under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @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 peeringServiceName);
+
+ /**
+ * Deletes an existing peering service with the specified name under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String peeringServiceName, Context context);
+
+ /**
+ * Updates tags for a peering service with the specified name under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param tags The resource tags.
+ * @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 peering Service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeeringServiceInner update(String resourceGroupName, String peeringServiceName, ResourceTags tags);
+
+ /**
+ * Updates tags for a peering service with the specified name under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param tags The resource tags.
+ * @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 peering Service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String peeringServiceName, ResourceTags tags, Context context);
+
+ /**
+ * Lists all of the peering services under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering services.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Lists all of the peering services under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering services.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Lists all of the peerings under the given 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 paginated list of peering services.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all of the peerings under the given subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering services.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringsClient.java
new file mode 100644
index 000000000000..4813e219c504
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringsClient.java
@@ -0,0 +1,179 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.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.peering.fluent.models.PeeringInner;
+import com.azure.resourcemanager.peering.models.ResourceTags;
+
+/** An instance of this class provides access to all the operations defined in PeeringsClient. */
+public interface PeeringsClient {
+ /**
+ * Gets an existing peering with the specified name under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @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 an existing peering with the specified name under the given subscription and resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeeringInner getByResourceGroup(String resourceGroupName, String peeringName);
+
+ /**
+ * Gets an existing peering with the specified name under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @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 an existing peering with the specified name under the given subscription and resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String peeringName, Context context);
+
+ /**
+ * Creates a new peering or updates an existing peering with the specified name under the given subscription and
+ * resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param peering The properties needed to create or update a peering.
+ * @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 peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeeringInner createOrUpdate(String resourceGroupName, String peeringName, PeeringInner peering);
+
+ /**
+ * Creates a new peering or updates an existing peering with the specified name under the given subscription and
+ * resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param peering The properties needed to create or update a peering.
+ * @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 peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName, String peeringName, PeeringInner peering, Context context);
+
+ /**
+ * Deletes an existing peering with the specified name under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @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 peeringName);
+
+ /**
+ * Deletes an existing peering with the specified name under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String peeringName, Context context);
+
+ /**
+ * Updates tags for a peering with the specified name under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param tags The resource tags.
+ * @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 peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeeringInner update(String resourceGroupName, String peeringName, ResourceTags tags);
+
+ /**
+ * Updates tags for a peering with the specified name under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param tags The resource tags.
+ * @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 peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String peeringName, ResourceTags tags, Context context);
+
+ /**
+ * Lists all of the peerings under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Lists all of the peerings under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Lists all of the peerings under the given 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 paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all of the peerings under the given subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PrefixesClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PrefixesClient.java
new file mode 100644
index 000000000000..ab6755d21576
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PrefixesClient.java
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.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.peering.fluent.models.PeeringServicePrefixInner;
+
+/** An instance of this class provides access to all the operations defined in PrefixesClient. */
+public interface PrefixesClient {
+ /**
+ * Gets an existing prefix with the specified name under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param prefixName The name of the prefix.
+ * @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 an existing prefix with the specified name under the given subscription, resource group and peering
+ * service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeeringServicePrefixInner get(String resourceGroupName, String peeringServiceName, String prefixName);
+
+ /**
+ * Gets an existing prefix with the specified name under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param prefixName The name of the prefix.
+ * @param expand The properties to be expanded.
+ * @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 an existing prefix with the specified name under the given subscription, resource group and peering
+ * service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String peeringServiceName, String prefixName, String expand, Context context);
+
+ /**
+ * Creates a new prefix with the specified name under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param prefixName The name of the prefix.
+ * @param peeringServicePrefix The properties needed to create a prefix.
+ * @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 peering service prefix class.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeeringServicePrefixInner createOrUpdate(
+ String resourceGroupName,
+ String peeringServiceName,
+ String prefixName,
+ PeeringServicePrefixInner peeringServicePrefix);
+
+ /**
+ * Creates a new prefix with the specified name under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param prefixName The name of the prefix.
+ * @param peeringServicePrefix The properties needed to create a prefix.
+ * @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 peering service prefix class.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String peeringServiceName,
+ String prefixName,
+ PeeringServicePrefixInner peeringServicePrefix,
+ Context context);
+
+ /**
+ * Deletes an existing prefix with the specified name under the given subscription, resource group and peering
+ * service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param prefixName The name of the prefix.
+ * @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 peeringServiceName, String prefixName);
+
+ /**
+ * Deletes an existing prefix with the specified name under the given subscription, resource group and peering
+ * service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param prefixName The name of the prefix.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName, String peeringServiceName, String prefixName, Context context);
+
+ /**
+ * Lists all prefixes under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering service prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByPeeringService(String resourceGroupName, String peeringServiceName);
+
+ /**
+ * Lists all prefixes under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param expand The properties to be expanded.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering service prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByPeeringService(
+ String resourceGroupName, String peeringServiceName, String expand, Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ReceivedRoutesClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ReceivedRoutesClient.java
new file mode 100644
index 000000000000..028c632042c3
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ReceivedRoutesClient.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.peering.fluent.models.PeeringReceivedRouteInner;
+
+/** An instance of this class provides access to all the operations defined in ReceivedRoutesClient. */
+public interface ReceivedRoutesClient {
+ /**
+ * Lists the prefixes received over the specified peering under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of received routes for the peering.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByPeering(String resourceGroupName, String peeringName);
+
+ /**
+ * Lists the prefixes received over the specified peering under the given subscription and resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param prefix The optional prefix that can be used to filter the routes.
+ * @param asPath The optional AS path that can be used to filter the routes.
+ * @param originAsValidationState The optional origin AS validation state that can be used to filter the routes.
+ * @param rpkiValidationState The optional RPKI validation state that can be used to filter the routes.
+ * @param skipToken The optional page continuation token that is used in the event of paginated result.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of received routes for the peering.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByPeering(
+ String resourceGroupName,
+ String peeringName,
+ String prefix,
+ String asPath,
+ String originAsValidationState,
+ String rpkiValidationState,
+ String skipToken,
+ Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredAsnsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredAsnsClient.java
new file mode 100644
index 000000000000..36c7448d7392
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredAsnsClient.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.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.peering.fluent.models.PeeringRegisteredAsnInner;
+
+/** An instance of this class provides access to all the operations defined in RegisteredAsnsClient. */
+public interface RegisteredAsnsClient {
+ /**
+ * Gets an existing registered ASN with the specified name under the given subscription, resource group and peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredAsnName The name of the registered ASN.
+ * @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 an existing registered ASN with the specified name under the given subscription, resource group and
+ * peering.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeeringRegisteredAsnInner get(String resourceGroupName, String peeringName, String registeredAsnName);
+
+ /**
+ * Gets an existing registered ASN with the specified name under the given subscription, resource group and peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredAsnName The name of the registered ASN.
+ * @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 an existing registered ASN with the specified name under the given subscription, resource group and
+ * peering.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String peeringName, String registeredAsnName, Context context);
+
+ /**
+ * Creates a new registered ASN with the specified name under the given subscription, resource group and peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredAsnName The name of the ASN.
+ * @param registeredAsn The properties needed to create a registered ASN.
+ * @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 customer's ASN that is registered by the peering service provider.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeeringRegisteredAsnInner createOrUpdate(
+ String resourceGroupName,
+ String peeringName,
+ String registeredAsnName,
+ PeeringRegisteredAsnInner registeredAsn);
+
+ /**
+ * Creates a new registered ASN with the specified name under the given subscription, resource group and peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredAsnName The name of the ASN.
+ * @param registeredAsn The properties needed to create a registered ASN.
+ * @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 customer's ASN that is registered by the peering service provider.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String peeringName,
+ String registeredAsnName,
+ PeeringRegisteredAsnInner registeredAsn,
+ Context context);
+
+ /**
+ * Deletes an existing registered ASN with the specified name under the given subscription, resource group and
+ * peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredAsnName The name of the registered ASN.
+ * @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 peeringName, String registeredAsnName);
+
+ /**
+ * Deletes an existing registered ASN with the specified name under the given subscription, resource group and
+ * peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredAsnName The name of the registered ASN.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName, String peeringName, String registeredAsnName, Context context);
+
+ /**
+ * Lists all registered ASNs under the given subscription, resource group and peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering registered ASNs.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByPeering(String resourceGroupName, String peeringName);
+
+ /**
+ * Lists all registered ASNs under the given subscription, resource group and peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering registered ASNs.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByPeering(
+ String resourceGroupName, String peeringName, Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredPrefixesClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredPrefixesClient.java
new file mode 100644
index 000000000000..fb587e31173e
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredPrefixesClient.java
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.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.peering.fluent.models.PeeringRegisteredPrefixInner;
+
+/** An instance of this class provides access to all the operations defined in RegisteredPrefixesClient. */
+public interface RegisteredPrefixesClient {
+ /**
+ * Gets an existing registered prefix with the specified name under the given subscription, resource group and
+ * peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredPrefixName The name of the registered prefix.
+ * @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 an existing registered prefix with the specified name under the given subscription, resource group and
+ * peering.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeeringRegisteredPrefixInner get(String resourceGroupName, String peeringName, String registeredPrefixName);
+
+ /**
+ * Gets an existing registered prefix with the specified name under the given subscription, resource group and
+ * peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredPrefixName The name of the registered prefix.
+ * @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 an existing registered prefix with the specified name under the given subscription, resource group and
+ * peering.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String peeringName, String registeredPrefixName, Context context);
+
+ /**
+ * Creates a new registered prefix with the specified name under the given subscription, resource group and peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredPrefixName The name of the registered prefix.
+ * @param registeredPrefix The properties needed to create a registered prefix.
+ * @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 customer's prefix that is registered by the peering service provider.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeeringRegisteredPrefixInner createOrUpdate(
+ String resourceGroupName,
+ String peeringName,
+ String registeredPrefixName,
+ PeeringRegisteredPrefixInner registeredPrefix);
+
+ /**
+ * Creates a new registered prefix with the specified name under the given subscription, resource group and peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredPrefixName The name of the registered prefix.
+ * @param registeredPrefix The properties needed to create a registered prefix.
+ * @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 customer's prefix that is registered by the peering service provider.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String peeringName,
+ String registeredPrefixName,
+ PeeringRegisteredPrefixInner registeredPrefix,
+ Context context);
+
+ /**
+ * Deletes an existing registered prefix with the specified name under the given subscription, resource group and
+ * peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredPrefixName The name of the registered prefix.
+ * @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 peeringName, String registeredPrefixName);
+
+ /**
+ * Deletes an existing registered prefix with the specified name under the given subscription, resource group and
+ * peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredPrefixName The name of the registered prefix.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName, String peeringName, String registeredPrefixName, Context context);
+
+ /**
+ * Lists all registered prefixes under the given subscription, resource group and peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering registered prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByPeering(String resourceGroupName, String peeringName);
+
+ /**
+ * Lists all registered prefixes under the given subscription, resource group and peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering registered prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByPeering(
+ String resourceGroupName, String peeringName, Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ResourceProvidersClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ResourceProvidersClient.java
new file mode 100644
index 000000000000..1cc121969cb8
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ResourceProvidersClient.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.peering.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.peering.models.CheckServiceProviderAvailabilityInput;
+import com.azure.resourcemanager.peering.models.Enum0;
+
+/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
+public interface ResourceProvidersClient {
+ /**
+ * Checks if the peering service provider is present within 1000 miles of customer's location.
+ *
+ * @param checkServiceProviderAvailabilityInput The CheckServiceProviderAvailabilityInput indicating customer
+ * location and service provider.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Enum0 checkServiceProviderAvailability(CheckServiceProviderAvailabilityInput checkServiceProviderAvailabilityInput);
+
+ /**
+ * Checks if the peering service provider is present within 1000 miles of customer's location.
+ *
+ * @param checkServiceProviderAvailabilityInput The CheckServiceProviderAvailabilityInput indicating customer
+ * location and service provider.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkServiceProviderAvailabilityWithResponse(
+ CheckServiceProviderAvailabilityInput checkServiceProviderAvailabilityInput, Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/CdnPeeringPrefixInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/CdnPeeringPrefixInner.java
new file mode 100644
index 000000000000..aae2b0bb7dc9
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/CdnPeeringPrefixInner.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The CDN peering prefix. */
+@JsonFlatten
+@Immutable
+public class CdnPeeringPrefixInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CdnPeeringPrefixInner.class);
+
+ /*
+ * The prefix.
+ */
+ @JsonProperty(value = "properties.prefix", access = JsonProperty.Access.WRITE_ONLY)
+ private String prefix;
+
+ /*
+ * The Azure region.
+ */
+ @JsonProperty(value = "properties.azureRegion", access = JsonProperty.Access.WRITE_ONLY)
+ private String azureRegion;
+
+ /*
+ * The Azure service.
+ */
+ @JsonProperty(value = "properties.azureService", access = JsonProperty.Access.WRITE_ONLY)
+ private String azureService;
+
+ /*
+ * The flag that indicates whether or not this is the primary region.
+ */
+ @JsonProperty(value = "properties.isPrimaryRegion", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isPrimaryRegion;
+
+ /*
+ * The BGP Community
+ */
+ @JsonProperty(value = "properties.bgpCommunity", access = JsonProperty.Access.WRITE_ONLY)
+ private String bgpCommunity;
+
+ /**
+ * Get the prefix property: The prefix.
+ *
+ * @return the prefix value.
+ */
+ public String prefix() {
+ return this.prefix;
+ }
+
+ /**
+ * Get the azureRegion property: The Azure region.
+ *
+ * @return the azureRegion value.
+ */
+ public String azureRegion() {
+ return this.azureRegion;
+ }
+
+ /**
+ * Get the azureService property: The Azure service.
+ *
+ * @return the azureService value.
+ */
+ public String azureService() {
+ return this.azureService;
+ }
+
+ /**
+ * Get the isPrimaryRegion property: The flag that indicates whether or not this is the primary region.
+ *
+ * @return the isPrimaryRegion value.
+ */
+ public Boolean isPrimaryRegion() {
+ return this.isPrimaryRegion;
+ }
+
+ /**
+ * Get the bgpCommunity property: The BGP Community.
+ *
+ * @return the bgpCommunity value.
+ */
+ public String bgpCommunity() {
+ return this.bgpCommunity;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/OperationInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..5fad8f5a39bb
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/OperationInner.java
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.models.OperationDisplayInfo;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The peering API operation. */
+@Immutable
+public final class OperationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
+
+ /*
+ * The name of the operation.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The information related to the operation.
+ */
+ @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY)
+ private OperationDisplayInfo display;
+
+ /*
+ * The flag that indicates whether the operation applies to data plane.
+ */
+ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDataAction;
+
+ /**
+ * Get the name property: The name of the operation.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the display property: The information related to the operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplayInfo display() {
+ return this.display;
+ }
+
+ /**
+ * Get the isDataAction property: The flag that indicates whether the operation applies to data plane.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeerAsnInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeerAsnInner.java
new file mode 100644
index 000000000000..562bcd708fd0
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeerAsnInner.java
@@ -0,0 +1,152 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.models.ContactDetail;
+import com.azure.resourcemanager.peering.models.ValidationState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The essential information related to the peer's ASN. */
+@JsonFlatten
+@Fluent
+public class PeerAsnInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PeerAsnInner.class);
+
+ /*
+ * The Autonomous System Number (ASN) of the peer.
+ */
+ @JsonProperty(value = "properties.peerAsn")
+ private Integer peerAsn;
+
+ /*
+ * The contact details of the peer.
+ */
+ @JsonProperty(value = "properties.peerContactDetail")
+ private List peerContactDetail;
+
+ /*
+ * The name of the peer.
+ */
+ @JsonProperty(value = "properties.peerName")
+ private String peerName;
+
+ /*
+ * The validation state of the ASN associated with the peer.
+ */
+ @JsonProperty(value = "properties.validationState")
+ private ValidationState validationState;
+
+ /*
+ * The error message for the validation state
+ */
+ @JsonProperty(value = "properties.errorMessage", access = JsonProperty.Access.WRITE_ONLY)
+ private String errorMessage;
+
+ /**
+ * Get the peerAsn property: The Autonomous System Number (ASN) of the peer.
+ *
+ * @return the peerAsn value.
+ */
+ public Integer peerAsn() {
+ return this.peerAsn;
+ }
+
+ /**
+ * Set the peerAsn property: The Autonomous System Number (ASN) of the peer.
+ *
+ * @param peerAsn the peerAsn value to set.
+ * @return the PeerAsnInner object itself.
+ */
+ public PeerAsnInner withPeerAsn(Integer peerAsn) {
+ this.peerAsn = peerAsn;
+ return this;
+ }
+
+ /**
+ * Get the peerContactDetail property: The contact details of the peer.
+ *
+ * @return the peerContactDetail value.
+ */
+ public List peerContactDetail() {
+ return this.peerContactDetail;
+ }
+
+ /**
+ * Set the peerContactDetail property: The contact details of the peer.
+ *
+ * @param peerContactDetail the peerContactDetail value to set.
+ * @return the PeerAsnInner object itself.
+ */
+ public PeerAsnInner withPeerContactDetail(List peerContactDetail) {
+ this.peerContactDetail = peerContactDetail;
+ return this;
+ }
+
+ /**
+ * Get the peerName property: The name of the peer.
+ *
+ * @return the peerName value.
+ */
+ public String peerName() {
+ return this.peerName;
+ }
+
+ /**
+ * Set the peerName property: The name of the peer.
+ *
+ * @param peerName the peerName value to set.
+ * @return the PeerAsnInner object itself.
+ */
+ public PeerAsnInner withPeerName(String peerName) {
+ this.peerName = peerName;
+ return this;
+ }
+
+ /**
+ * Get the validationState property: The validation state of the ASN associated with the peer.
+ *
+ * @return the validationState value.
+ */
+ public ValidationState validationState() {
+ return this.validationState;
+ }
+
+ /**
+ * Set the validationState property: The validation state of the ASN associated with the peer.
+ *
+ * @param validationState the validationState value to set.
+ * @return the PeerAsnInner object itself.
+ */
+ public PeerAsnInner withValidationState(ValidationState validationState) {
+ this.validationState = validationState;
+ return this;
+ }
+
+ /**
+ * Get the errorMessage property: The error message for the validation state.
+ *
+ * @return the errorMessage value.
+ */
+ public String errorMessage() {
+ return this.errorMessage;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (peerContactDetail() != null) {
+ peerContactDetail().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringInner.java
new file mode 100644
index 000000000000..0298b3c574ec
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringInner.java
@@ -0,0 +1,253 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.models.Kind;
+import com.azure.resourcemanager.peering.models.PeeringPropertiesDirect;
+import com.azure.resourcemanager.peering.models.PeeringPropertiesExchange;
+import com.azure.resourcemanager.peering.models.PeeringSku;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location. */
+@JsonFlatten
+@Fluent
+public class PeeringInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringInner.class);
+
+ /*
+ * The SKU that defines the tier and kind of the peering.
+ */
+ @JsonProperty(value = "sku", required = true)
+ private PeeringSku sku;
+
+ /*
+ * The kind of the peering.
+ */
+ @JsonProperty(value = "kind", required = true)
+ private Kind kind;
+
+ /*
+ * The location of the resource.
+ */
+ @JsonProperty(value = "location", required = true)
+ private String location;
+
+ /*
+ * The resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /*
+ * The properties that define a direct peering.
+ */
+ @JsonProperty(value = "properties.direct")
+ private PeeringPropertiesDirect direct;
+
+ /*
+ * The properties that define an exchange peering.
+ */
+ @JsonProperty(value = "properties.exchange")
+ private PeeringPropertiesExchange exchange;
+
+ /*
+ * The location of the peering.
+ */
+ @JsonProperty(value = "properties.peeringLocation")
+ private String peeringLocation;
+
+ /*
+ * The provisioning state of the resource.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the sku property: The SKU that defines the tier and kind of the peering.
+ *
+ * @return the sku value.
+ */
+ public PeeringSku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The SKU that defines the tier and kind of the peering.
+ *
+ * @param sku the sku value to set.
+ * @return the PeeringInner object itself.
+ */
+ public PeeringInner withSku(PeeringSku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the kind property: The kind of the peering.
+ *
+ * @return the kind value.
+ */
+ public Kind kind() {
+ return this.kind;
+ }
+
+ /**
+ * Set the kind property: The kind of the peering.
+ *
+ * @param kind the kind value to set.
+ * @return the PeeringInner object itself.
+ */
+ public PeeringInner withKind(Kind kind) {
+ this.kind = kind;
+ return this;
+ }
+
+ /**
+ * Get the location property: The location of the resource.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The location of the resource.
+ *
+ * @param location the location value to set.
+ * @return the PeeringInner object itself.
+ */
+ public PeeringInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the tags property: The resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: The resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the PeeringInner object itself.
+ */
+ public PeeringInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the direct property: The properties that define a direct peering.
+ *
+ * @return the direct value.
+ */
+ public PeeringPropertiesDirect direct() {
+ return this.direct;
+ }
+
+ /**
+ * Set the direct property: The properties that define a direct peering.
+ *
+ * @param direct the direct value to set.
+ * @return the PeeringInner object itself.
+ */
+ public PeeringInner withDirect(PeeringPropertiesDirect direct) {
+ this.direct = direct;
+ return this;
+ }
+
+ /**
+ * Get the exchange property: The properties that define an exchange peering.
+ *
+ * @return the exchange value.
+ */
+ public PeeringPropertiesExchange exchange() {
+ return this.exchange;
+ }
+
+ /**
+ * Set the exchange property: The properties that define an exchange peering.
+ *
+ * @param exchange the exchange value to set.
+ * @return the PeeringInner object itself.
+ */
+ public PeeringInner withExchange(PeeringPropertiesExchange exchange) {
+ this.exchange = exchange;
+ return this;
+ }
+
+ /**
+ * Get the peeringLocation property: The location of the peering.
+ *
+ * @return the peeringLocation value.
+ */
+ public String peeringLocation() {
+ return this.peeringLocation;
+ }
+
+ /**
+ * Set the peeringLocation property: The location of the peering.
+ *
+ * @param peeringLocation the peeringLocation value to set.
+ * @return the PeeringInner object itself.
+ */
+ public PeeringInner withPeeringLocation(String peeringLocation) {
+ this.peeringLocation = peeringLocation;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sku() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property sku in model PeeringInner"));
+ } else {
+ sku().validate();
+ }
+ if (kind() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property kind in model PeeringInner"));
+ }
+ if (location() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property location in model PeeringInner"));
+ }
+ if (direct() != null) {
+ direct().validate();
+ }
+ if (exchange() != null) {
+ exchange().validate();
+ }
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringLocationInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringLocationInner.java
new file mode 100644
index 000000000000..66d1113e700a
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringLocationInner.java
@@ -0,0 +1,192 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.models.Kind;
+import com.azure.resourcemanager.peering.models.PeeringLocationPropertiesDirect;
+import com.azure.resourcemanager.peering.models.PeeringLocationPropertiesExchange;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Peering location is where connectivity could be established to the Microsoft Cloud Edge. */
+@JsonFlatten
+@Fluent
+public class PeeringLocationInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringLocationInner.class);
+
+ /*
+ * The kind of peering that the peering location supports.
+ */
+ @JsonProperty(value = "kind")
+ private Kind kind;
+
+ /*
+ * The properties that define a direct peering location.
+ */
+ @JsonProperty(value = "properties.direct")
+ private PeeringLocationPropertiesDirect direct;
+
+ /*
+ * The properties that define an exchange peering location.
+ */
+ @JsonProperty(value = "properties.exchange")
+ private PeeringLocationPropertiesExchange exchange;
+
+ /*
+ * The name of the peering location.
+ */
+ @JsonProperty(value = "properties.peeringLocation")
+ private String peeringLocation;
+
+ /*
+ * The country in which the peering location exists.
+ */
+ @JsonProperty(value = "properties.country")
+ private String country;
+
+ /*
+ * The Azure region associated with the peering location.
+ */
+ @JsonProperty(value = "properties.azureRegion")
+ private String azureRegion;
+
+ /**
+ * Get the kind property: The kind of peering that the peering location supports.
+ *
+ * @return the kind value.
+ */
+ public Kind kind() {
+ return this.kind;
+ }
+
+ /**
+ * Set the kind property: The kind of peering that the peering location supports.
+ *
+ * @param kind the kind value to set.
+ * @return the PeeringLocationInner object itself.
+ */
+ public PeeringLocationInner withKind(Kind kind) {
+ this.kind = kind;
+ return this;
+ }
+
+ /**
+ * Get the direct property: The properties that define a direct peering location.
+ *
+ * @return the direct value.
+ */
+ public PeeringLocationPropertiesDirect direct() {
+ return this.direct;
+ }
+
+ /**
+ * Set the direct property: The properties that define a direct peering location.
+ *
+ * @param direct the direct value to set.
+ * @return the PeeringLocationInner object itself.
+ */
+ public PeeringLocationInner withDirect(PeeringLocationPropertiesDirect direct) {
+ this.direct = direct;
+ return this;
+ }
+
+ /**
+ * Get the exchange property: The properties that define an exchange peering location.
+ *
+ * @return the exchange value.
+ */
+ public PeeringLocationPropertiesExchange exchange() {
+ return this.exchange;
+ }
+
+ /**
+ * Set the exchange property: The properties that define an exchange peering location.
+ *
+ * @param exchange the exchange value to set.
+ * @return the PeeringLocationInner object itself.
+ */
+ public PeeringLocationInner withExchange(PeeringLocationPropertiesExchange exchange) {
+ this.exchange = exchange;
+ return this;
+ }
+
+ /**
+ * Get the peeringLocation property: The name of the peering location.
+ *
+ * @return the peeringLocation value.
+ */
+ public String peeringLocation() {
+ return this.peeringLocation;
+ }
+
+ /**
+ * Set the peeringLocation property: The name of the peering location.
+ *
+ * @param peeringLocation the peeringLocation value to set.
+ * @return the PeeringLocationInner object itself.
+ */
+ public PeeringLocationInner withPeeringLocation(String peeringLocation) {
+ this.peeringLocation = peeringLocation;
+ return this;
+ }
+
+ /**
+ * Get the country property: The country in which the peering location exists.
+ *
+ * @return the country value.
+ */
+ public String country() {
+ return this.country;
+ }
+
+ /**
+ * Set the country property: The country in which the peering location exists.
+ *
+ * @param country the country value to set.
+ * @return the PeeringLocationInner object itself.
+ */
+ public PeeringLocationInner withCountry(String country) {
+ this.country = country;
+ return this;
+ }
+
+ /**
+ * Get the azureRegion property: The Azure region associated with the peering location.
+ *
+ * @return the azureRegion value.
+ */
+ public String azureRegion() {
+ return this.azureRegion;
+ }
+
+ /**
+ * Set the azureRegion property: The Azure region associated with the peering location.
+ *
+ * @param azureRegion the azureRegion value to set.
+ * @return the PeeringLocationInner object itself.
+ */
+ public PeeringLocationInner withAzureRegion(String azureRegion) {
+ this.azureRegion = azureRegion;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (direct() != null) {
+ direct().validate();
+ }
+ if (exchange() != null) {
+ exchange().validate();
+ }
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringReceivedRouteInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringReceivedRouteInner.java
new file mode 100644
index 000000000000..ce5d8d729f52
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringReceivedRouteInner.java
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties that define a received route. */
+@Immutable
+public final class PeeringReceivedRouteInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringReceivedRouteInner.class);
+
+ /*
+ * The prefix.
+ */
+ @JsonProperty(value = "prefix", access = JsonProperty.Access.WRITE_ONLY)
+ private String prefix;
+
+ /*
+ * The next hop for the prefix.
+ */
+ @JsonProperty(value = "nextHop", access = JsonProperty.Access.WRITE_ONLY)
+ private String nextHop;
+
+ /*
+ * The AS path for the prefix.
+ */
+ @JsonProperty(value = "asPath", access = JsonProperty.Access.WRITE_ONLY)
+ private String asPath;
+
+ /*
+ * The origin AS change information for the prefix.
+ */
+ @JsonProperty(value = "originAsValidationState", access = JsonProperty.Access.WRITE_ONLY)
+ private String originAsValidationState;
+
+ /*
+ * The RPKI validation state for the prefix and origin AS that's listed in
+ * the AS path.
+ */
+ @JsonProperty(value = "rpkiValidationState", access = JsonProperty.Access.WRITE_ONLY)
+ private String rpkiValidationState;
+
+ /*
+ * The authority which holds the Route Origin Authorization record for the
+ * prefix, if any.
+ */
+ @JsonProperty(value = "trustAnchor", access = JsonProperty.Access.WRITE_ONLY)
+ private String trustAnchor;
+
+ /*
+ * The received timestamp associated with the prefix.
+ */
+ @JsonProperty(value = "receivedTimestamp", access = JsonProperty.Access.WRITE_ONLY)
+ private String receivedTimestamp;
+
+ /**
+ * Get the prefix property: The prefix.
+ *
+ * @return the prefix value.
+ */
+ public String prefix() {
+ return this.prefix;
+ }
+
+ /**
+ * Get the nextHop property: The next hop for the prefix.
+ *
+ * @return the nextHop value.
+ */
+ public String nextHop() {
+ return this.nextHop;
+ }
+
+ /**
+ * Get the asPath property: The AS path for the prefix.
+ *
+ * @return the asPath value.
+ */
+ public String asPath() {
+ return this.asPath;
+ }
+
+ /**
+ * Get the originAsValidationState property: The origin AS change information for the prefix.
+ *
+ * @return the originAsValidationState value.
+ */
+ public String originAsValidationState() {
+ return this.originAsValidationState;
+ }
+
+ /**
+ * Get the rpkiValidationState property: The RPKI validation state for the prefix and origin AS that's listed in the
+ * AS path.
+ *
+ * @return the rpkiValidationState value.
+ */
+ public String rpkiValidationState() {
+ return this.rpkiValidationState;
+ }
+
+ /**
+ * Get the trustAnchor property: The authority which holds the Route Origin Authorization record for the prefix, if
+ * any.
+ *
+ * @return the trustAnchor value.
+ */
+ public String trustAnchor() {
+ return this.trustAnchor;
+ }
+
+ /**
+ * Get the receivedTimestamp property: The received timestamp associated with the prefix.
+ *
+ * @return the receivedTimestamp value.
+ */
+ public String receivedTimestamp() {
+ return this.receivedTimestamp;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredAsnInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredAsnInner.java
new file mode 100644
index 000000000000..5c842bd1c148
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredAsnInner.java
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The customer's ASN that is registered by the peering service provider. */
+@JsonFlatten
+@Fluent
+public class PeeringRegisteredAsnInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringRegisteredAsnInner.class);
+
+ /*
+ * The customer's ASN from which traffic originates.
+ */
+ @JsonProperty(value = "properties.asn")
+ private Integer asn;
+
+ /*
+ * The peering service prefix key that is to be shared with the customer.
+ */
+ @JsonProperty(value = "properties.peeringServicePrefixKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String peeringServicePrefixKey;
+
+ /*
+ * The provisioning state of the resource.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the asn property: The customer's ASN from which traffic originates.
+ *
+ * @return the asn value.
+ */
+ public Integer asn() {
+ return this.asn;
+ }
+
+ /**
+ * Set the asn property: The customer's ASN from which traffic originates.
+ *
+ * @param asn the asn value to set.
+ * @return the PeeringRegisteredAsnInner object itself.
+ */
+ public PeeringRegisteredAsnInner withAsn(Integer asn) {
+ this.asn = asn;
+ return this;
+ }
+
+ /**
+ * Get the peeringServicePrefixKey property: The peering service prefix key that is to be shared with the customer.
+ *
+ * @return the peeringServicePrefixKey value.
+ */
+ public String peeringServicePrefixKey() {
+ return this.peeringServicePrefixKey;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredPrefixInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredPrefixInner.java
new file mode 100644
index 000000000000..0be2d0ffa58c
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredPrefixInner.java
@@ -0,0 +1,115 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.models.PrefixValidationState;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The customer's prefix that is registered by the peering service provider. */
+@JsonFlatten
+@Fluent
+public class PeeringRegisteredPrefixInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringRegisteredPrefixInner.class);
+
+ /*
+ * The customer's prefix from which traffic originates.
+ */
+ @JsonProperty(value = "properties.prefix")
+ private String prefix;
+
+ /*
+ * The prefix validation state.
+ */
+ @JsonProperty(value = "properties.prefixValidationState", access = JsonProperty.Access.WRITE_ONLY)
+ private PrefixValidationState prefixValidationState;
+
+ /*
+ * The peering service prefix key that is to be shared with the customer.
+ */
+ @JsonProperty(value = "properties.peeringServicePrefixKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String peeringServicePrefixKey;
+
+ /*
+ * The error message associated with the validation state, if any.
+ */
+ @JsonProperty(value = "properties.errorMessage", access = JsonProperty.Access.WRITE_ONLY)
+ private String errorMessage;
+
+ /*
+ * The provisioning state of the resource.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the prefix property: The customer's prefix from which traffic originates.
+ *
+ * @return the prefix value.
+ */
+ public String prefix() {
+ return this.prefix;
+ }
+
+ /**
+ * Set the prefix property: The customer's prefix from which traffic originates.
+ *
+ * @param prefix the prefix value to set.
+ * @return the PeeringRegisteredPrefixInner object itself.
+ */
+ public PeeringRegisteredPrefixInner withPrefix(String prefix) {
+ this.prefix = prefix;
+ return this;
+ }
+
+ /**
+ * Get the prefixValidationState property: The prefix validation state.
+ *
+ * @return the prefixValidationState value.
+ */
+ public PrefixValidationState prefixValidationState() {
+ return this.prefixValidationState;
+ }
+
+ /**
+ * Get the peeringServicePrefixKey property: The peering service prefix key that is to be shared with the customer.
+ *
+ * @return the peeringServicePrefixKey value.
+ */
+ public String peeringServicePrefixKey() {
+ return this.peeringServicePrefixKey;
+ }
+
+ /**
+ * Get the errorMessage property: The error message associated with the validation state, if any.
+ *
+ * @return the errorMessage value.
+ */
+ public String errorMessage() {
+ return this.errorMessage;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceInner.java
new file mode 100644
index 000000000000..749f22d16f86
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceInner.java
@@ -0,0 +1,241 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.models.PeeringServiceSku;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Peering Service. */
+@JsonFlatten
+@Fluent
+public class PeeringServiceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringServiceInner.class);
+
+ /*
+ * The SKU that defines the type of the peering service.
+ */
+ @JsonProperty(value = "sku")
+ private PeeringServiceSku sku;
+
+ /*
+ * The location of the resource.
+ */
+ @JsonProperty(value = "location", required = true)
+ private String location;
+
+ /*
+ * The resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /*
+ * The location (state/province) of the customer.
+ */
+ @JsonProperty(value = "properties.peeringServiceLocation")
+ private String peeringServiceLocation;
+
+ /*
+ * The name of the service provider.
+ */
+ @JsonProperty(value = "properties.peeringServiceProvider")
+ private String peeringServiceProvider;
+
+ /*
+ * The provisioning state of the resource.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * The primary peering (Microsoft/service provider) location to be used for
+ * customer traffic.
+ */
+ @JsonProperty(value = "properties.providerPrimaryPeeringLocation")
+ private String providerPrimaryPeeringLocation;
+
+ /*
+ * The backup peering (Microsoft/service provider) location to be used for
+ * customer traffic.
+ */
+ @JsonProperty(value = "properties.providerBackupPeeringLocation")
+ private String providerBackupPeeringLocation;
+
+ /**
+ * Get the sku property: The SKU that defines the type of the peering service.
+ *
+ * @return the sku value.
+ */
+ public PeeringServiceSku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The SKU that defines the type of the peering service.
+ *
+ * @param sku the sku value to set.
+ * @return the PeeringServiceInner object itself.
+ */
+ public PeeringServiceInner withSku(PeeringServiceSku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the location property: The location of the resource.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The location of the resource.
+ *
+ * @param location the location value to set.
+ * @return the PeeringServiceInner object itself.
+ */
+ public PeeringServiceInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the tags property: The resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: The resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the PeeringServiceInner object itself.
+ */
+ public PeeringServiceInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the peeringServiceLocation property: The location (state/province) of the customer.
+ *
+ * @return the peeringServiceLocation value.
+ */
+ public String peeringServiceLocation() {
+ return this.peeringServiceLocation;
+ }
+
+ /**
+ * Set the peeringServiceLocation property: The location (state/province) of the customer.
+ *
+ * @param peeringServiceLocation the peeringServiceLocation value to set.
+ * @return the PeeringServiceInner object itself.
+ */
+ public PeeringServiceInner withPeeringServiceLocation(String peeringServiceLocation) {
+ this.peeringServiceLocation = peeringServiceLocation;
+ return this;
+ }
+
+ /**
+ * Get the peeringServiceProvider property: The name of the service provider.
+ *
+ * @return the peeringServiceProvider value.
+ */
+ public String peeringServiceProvider() {
+ return this.peeringServiceProvider;
+ }
+
+ /**
+ * Set the peeringServiceProvider property: The name of the service provider.
+ *
+ * @param peeringServiceProvider the peeringServiceProvider value to set.
+ * @return the PeeringServiceInner object itself.
+ */
+ public PeeringServiceInner withPeeringServiceProvider(String peeringServiceProvider) {
+ this.peeringServiceProvider = peeringServiceProvider;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the providerPrimaryPeeringLocation property: The primary peering (Microsoft/service provider) location to be
+ * used for customer traffic.
+ *
+ * @return the providerPrimaryPeeringLocation value.
+ */
+ public String providerPrimaryPeeringLocation() {
+ return this.providerPrimaryPeeringLocation;
+ }
+
+ /**
+ * Set the providerPrimaryPeeringLocation property: The primary peering (Microsoft/service provider) location to be
+ * used for customer traffic.
+ *
+ * @param providerPrimaryPeeringLocation the providerPrimaryPeeringLocation value to set.
+ * @return the PeeringServiceInner object itself.
+ */
+ public PeeringServiceInner withProviderPrimaryPeeringLocation(String providerPrimaryPeeringLocation) {
+ this.providerPrimaryPeeringLocation = providerPrimaryPeeringLocation;
+ return this;
+ }
+
+ /**
+ * Get the providerBackupPeeringLocation property: The backup peering (Microsoft/service provider) location to be
+ * used for customer traffic.
+ *
+ * @return the providerBackupPeeringLocation value.
+ */
+ public String providerBackupPeeringLocation() {
+ return this.providerBackupPeeringLocation;
+ }
+
+ /**
+ * Set the providerBackupPeeringLocation property: The backup peering (Microsoft/service provider) location to be
+ * used for customer traffic.
+ *
+ * @param providerBackupPeeringLocation the providerBackupPeeringLocation value to set.
+ * @return the PeeringServiceInner object itself.
+ */
+ public PeeringServiceInner withProviderBackupPeeringLocation(String providerBackupPeeringLocation) {
+ this.providerBackupPeeringLocation = providerBackupPeeringLocation;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sku() != null) {
+ sku().validate();
+ }
+ if (location() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property location in model PeeringServiceInner"));
+ }
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceLocationInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceLocationInner.java
new file mode 100644
index 000000000000..f8a70650d7e3
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceLocationInner.java
@@ -0,0 +1,105 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The peering service location. */
+@JsonFlatten
+@Fluent
+public class PeeringServiceLocationInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringServiceLocationInner.class);
+
+ /*
+ * Country of the customer
+ */
+ @JsonProperty(value = "properties.country")
+ private String country;
+
+ /*
+ * State of the customer
+ */
+ @JsonProperty(value = "properties.state")
+ private String state;
+
+ /*
+ * Azure region for the location
+ */
+ @JsonProperty(value = "properties.azureRegion")
+ private String azureRegion;
+
+ /**
+ * Get the country property: Country of the customer.
+ *
+ * @return the country value.
+ */
+ public String country() {
+ return this.country;
+ }
+
+ /**
+ * Set the country property: Country of the customer.
+ *
+ * @param country the country value to set.
+ * @return the PeeringServiceLocationInner object itself.
+ */
+ public PeeringServiceLocationInner withCountry(String country) {
+ this.country = country;
+ return this;
+ }
+
+ /**
+ * Get the state property: State of the customer.
+ *
+ * @return the state value.
+ */
+ public String state() {
+ return this.state;
+ }
+
+ /**
+ * Set the state property: State of the customer.
+ *
+ * @param state the state value to set.
+ * @return the PeeringServiceLocationInner object itself.
+ */
+ public PeeringServiceLocationInner withState(String state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Get the azureRegion property: Azure region for the location.
+ *
+ * @return the azureRegion value.
+ */
+ public String azureRegion() {
+ return this.azureRegion;
+ }
+
+ /**
+ * Set the azureRegion property: Azure region for the location.
+ *
+ * @param azureRegion the azureRegion value to set.
+ * @return the PeeringServiceLocationInner object itself.
+ */
+ public PeeringServiceLocationInner withAzureRegion(String azureRegion) {
+ this.azureRegion = azureRegion;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServicePrefixInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServicePrefixInner.java
new file mode 100644
index 000000000000..841e9636f4db
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServicePrefixInner.java
@@ -0,0 +1,162 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.models.LearnedType;
+import com.azure.resourcemanager.peering.models.PeeringServicePrefixEvent;
+import com.azure.resourcemanager.peering.models.PrefixValidationState;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The peering service prefix class. */
+@JsonFlatten
+@Fluent
+public class PeeringServicePrefixInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringServicePrefixInner.class);
+
+ /*
+ * The prefix from which your traffic originates.
+ */
+ @JsonProperty(value = "properties.prefix")
+ private String prefix;
+
+ /*
+ * The prefix validation state
+ */
+ @JsonProperty(value = "properties.prefixValidationState", access = JsonProperty.Access.WRITE_ONLY)
+ private PrefixValidationState prefixValidationState;
+
+ /*
+ * The prefix learned type
+ */
+ @JsonProperty(value = "properties.learnedType", access = JsonProperty.Access.WRITE_ONLY)
+ private LearnedType learnedType;
+
+ /*
+ * The error message for validation state
+ */
+ @JsonProperty(value = "properties.errorMessage", access = JsonProperty.Access.WRITE_ONLY)
+ private String errorMessage;
+
+ /*
+ * The list of events for peering service prefix
+ */
+ @JsonProperty(value = "properties.events", access = JsonProperty.Access.WRITE_ONLY)
+ private List events;
+
+ /*
+ * The peering service prefix key
+ */
+ @JsonProperty(value = "properties.peeringServicePrefixKey")
+ private String peeringServicePrefixKey;
+
+ /*
+ * The provisioning state of the resource.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the prefix property: The prefix from which your traffic originates.
+ *
+ * @return the prefix value.
+ */
+ public String prefix() {
+ return this.prefix;
+ }
+
+ /**
+ * Set the prefix property: The prefix from which your traffic originates.
+ *
+ * @param prefix the prefix value to set.
+ * @return the PeeringServicePrefixInner object itself.
+ */
+ public PeeringServicePrefixInner withPrefix(String prefix) {
+ this.prefix = prefix;
+ return this;
+ }
+
+ /**
+ * Get the prefixValidationState property: The prefix validation state.
+ *
+ * @return the prefixValidationState value.
+ */
+ public PrefixValidationState prefixValidationState() {
+ return this.prefixValidationState;
+ }
+
+ /**
+ * Get the learnedType property: The prefix learned type.
+ *
+ * @return the learnedType value.
+ */
+ public LearnedType learnedType() {
+ return this.learnedType;
+ }
+
+ /**
+ * Get the errorMessage property: The error message for validation state.
+ *
+ * @return the errorMessage value.
+ */
+ public String errorMessage() {
+ return this.errorMessage;
+ }
+
+ /**
+ * Get the events property: The list of events for peering service prefix.
+ *
+ * @return the events value.
+ */
+ public List events() {
+ return this.events;
+ }
+
+ /**
+ * Get the peeringServicePrefixKey property: The peering service prefix key.
+ *
+ * @return the peeringServicePrefixKey value.
+ */
+ public String peeringServicePrefixKey() {
+ return this.peeringServicePrefixKey;
+ }
+
+ /**
+ * Set the peeringServicePrefixKey property: The peering service prefix key.
+ *
+ * @param peeringServicePrefixKey the peeringServicePrefixKey value to set.
+ * @return the PeeringServicePrefixInner object itself.
+ */
+ public PeeringServicePrefixInner withPeeringServicePrefixKey(String peeringServicePrefixKey) {
+ this.peeringServicePrefixKey = peeringServicePrefixKey;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (events() != null) {
+ events().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceProviderInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceProviderInner.java
new file mode 100644
index 000000000000..da060a5aa1da
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceProviderInner.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** PeeringService provider. */
+@JsonFlatten
+@Fluent
+public class PeeringServiceProviderInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringServiceProviderInner.class);
+
+ /*
+ * The name of the service provider.
+ */
+ @JsonProperty(value = "properties.serviceProviderName")
+ private String serviceProviderName;
+
+ /*
+ * The list of locations at which the service provider peers with
+ * Microsoft.
+ */
+ @JsonProperty(value = "properties.peeringLocations")
+ private List peeringLocations;
+
+ /**
+ * Get the serviceProviderName property: The name of the service provider.
+ *
+ * @return the serviceProviderName value.
+ */
+ public String serviceProviderName() {
+ return this.serviceProviderName;
+ }
+
+ /**
+ * Set the serviceProviderName property: The name of the service provider.
+ *
+ * @param serviceProviderName the serviceProviderName value to set.
+ * @return the PeeringServiceProviderInner object itself.
+ */
+ public PeeringServiceProviderInner withServiceProviderName(String serviceProviderName) {
+ this.serviceProviderName = serviceProviderName;
+ return this;
+ }
+
+ /**
+ * Get the peeringLocations property: The list of locations at which the service provider peers with Microsoft.
+ *
+ * @return the peeringLocations value.
+ */
+ public List peeringLocations() {
+ return this.peeringLocations;
+ }
+
+ /**
+ * Set the peeringLocations property: The list of locations at which the service provider peers with Microsoft.
+ *
+ * @param peeringLocations the peeringLocations value to set.
+ * @return the PeeringServiceProviderInner object itself.
+ */
+ public PeeringServiceProviderInner withPeeringLocations(List peeringLocations) {
+ this.peeringLocations = peeringLocations;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/package-info.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/package-info.java
new file mode 100644
index 000000000000..ad3059f785b1
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the inner data models for PeeringManagementClient. Peering Client. */
+package com.azure.resourcemanager.peering.fluent.models;
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/package-info.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/package-info.java
new file mode 100644
index 000000000000..fd1155e34f76
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the service clients for PeeringManagementClient. Peering Client. */
+package com.azure.resourcemanager.peering.fluent;
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixImpl.java
new file mode 100644
index 000000000000..eb36846e4374
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixImpl.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.resourcemanager.peering.PeeringManager;
+import com.azure.resourcemanager.peering.fluent.models.CdnPeeringPrefixInner;
+import com.azure.resourcemanager.peering.models.CdnPeeringPrefix;
+
+public final class CdnPeeringPrefixImpl implements CdnPeeringPrefix {
+ private CdnPeeringPrefixInner innerObject;
+
+ private final PeeringManager serviceManager;
+
+ CdnPeeringPrefixImpl(CdnPeeringPrefixInner innerObject, PeeringManager 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 prefix() {
+ return this.innerModel().prefix();
+ }
+
+ public String azureRegion() {
+ return this.innerModel().azureRegion();
+ }
+
+ public String azureService() {
+ return this.innerModel().azureService();
+ }
+
+ public Boolean isPrimaryRegion() {
+ return this.innerModel().isPrimaryRegion();
+ }
+
+ public String bgpCommunity() {
+ return this.innerModel().bgpCommunity();
+ }
+
+ public CdnPeeringPrefixInner innerModel() {
+ return this.innerObject;
+ }
+
+ private PeeringManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesClientImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesClientImpl.java
new file mode 100644
index 000000000000..4c8344a7dbc1
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesClientImpl.java
@@ -0,0 +1,316 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.fluent.CdnPeeringPrefixesClient;
+import com.azure.resourcemanager.peering.fluent.models.CdnPeeringPrefixInner;
+import com.azure.resourcemanager.peering.models.CdnPeeringPrefixListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in CdnPeeringPrefixesClient. */
+public final class CdnPeeringPrefixesClientImpl implements CdnPeeringPrefixesClient {
+ private final ClientLogger logger = new ClientLogger(CdnPeeringPrefixesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final CdnPeeringPrefixesService service;
+
+ /** The service client containing this operation class. */
+ private final PeeringManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CdnPeeringPrefixesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CdnPeeringPrefixesClientImpl(PeeringManagementClientImpl client) {
+ this.service =
+ RestProxy.create(CdnPeeringPrefixesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PeeringManagementClientCdnPeeringPrefixes to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PeeringManagementCli")
+ private interface CdnPeeringPrefixesService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Peering/cdnPeeringPrefixes")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("peeringLocation") String peeringLocation,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all of the advertised prefixes for the specified peering location.
+ *
+ * @param peeringLocation The peering location.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of CDN peering prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String peeringLocation) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (peeringLocation == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter peeringLocation is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ peeringLocation,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Lists all of the advertised prefixes for the specified peering location.
+ *
+ * @param peeringLocation The peering location.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of CDN peering prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String peeringLocation, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (peeringLocation == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter peeringLocation is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ peeringLocation,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all of the advertised prefixes for the specified peering location.
+ *
+ * @param peeringLocation The peering location.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of CDN peering prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String peeringLocation) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(peeringLocation), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all of the advertised prefixes for the specified peering location.
+ *
+ * @param peeringLocation The peering location.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of CDN peering prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String peeringLocation, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(peeringLocation, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all of the advertised prefixes for the specified peering location.
+ *
+ * @param peeringLocation The peering location.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of CDN peering prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String peeringLocation) {
+ return new PagedIterable<>(listAsync(peeringLocation));
+ }
+
+ /**
+ * Lists all of the advertised prefixes for the specified peering location.
+ *
+ * @param peeringLocation The peering location.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of CDN peering prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String peeringLocation, Context context) {
+ return new PagedIterable<>(listAsync(peeringLocation, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of CDN peering prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of CDN peering prefixes.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesImpl.java
new file mode 100644
index 000000000000..c7e37544b40b
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesImpl.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.PeeringManager;
+import com.azure.resourcemanager.peering.fluent.CdnPeeringPrefixesClient;
+import com.azure.resourcemanager.peering.fluent.models.CdnPeeringPrefixInner;
+import com.azure.resourcemanager.peering.models.CdnPeeringPrefix;
+import com.azure.resourcemanager.peering.models.CdnPeeringPrefixes;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class CdnPeeringPrefixesImpl implements CdnPeeringPrefixes {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CdnPeeringPrefixesImpl.class);
+
+ private final CdnPeeringPrefixesClient innerClient;
+
+ private final PeeringManager serviceManager;
+
+ public CdnPeeringPrefixesImpl(CdnPeeringPrefixesClient innerClient, PeeringManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String peeringLocation) {
+ PagedIterable inner = this.serviceClient().list(peeringLocation);
+ return Utils.mapPage(inner, inner1 -> new CdnPeeringPrefixImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String peeringLocation, Context context) {
+ PagedIterable inner = this.serviceClient().list(peeringLocation, context);
+ return Utils.mapPage(inner, inner1 -> new CdnPeeringPrefixImpl(inner1, this.manager()));
+ }
+
+ private CdnPeeringPrefixesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private PeeringManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsClientImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsClientImpl.java
new file mode 100644
index 000000000000..8b1d9f760d45
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsClientImpl.java
@@ -0,0 +1,362 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.fluent.LegacyPeeringsClient;
+import com.azure.resourcemanager.peering.fluent.models.PeeringInner;
+import com.azure.resourcemanager.peering.models.LegacyPeeringsKind;
+import com.azure.resourcemanager.peering.models.PeeringListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in LegacyPeeringsClient. */
+public final class LegacyPeeringsClientImpl implements LegacyPeeringsClient {
+ private final ClientLogger logger = new ClientLogger(LegacyPeeringsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final LegacyPeeringsService service;
+
+ /** The service client containing this operation class. */
+ private final PeeringManagementClientImpl client;
+
+ /**
+ * Initializes an instance of LegacyPeeringsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ LegacyPeeringsClientImpl(PeeringManagementClientImpl client) {
+ this.service =
+ RestProxy.create(LegacyPeeringsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PeeringManagementClientLegacyPeerings to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PeeringManagementCli")
+ private interface LegacyPeeringsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Peering/legacyPeerings")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("peeringLocation") String peeringLocation,
+ @QueryParam("kind") LegacyPeeringsKind kind,
+ @QueryParam("asn") Integer asn,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all of the legacy peerings under the given subscription matching the specified kind and location.
+ *
+ * @param peeringLocation The location of the peering.
+ * @param kind The kind of the peering.
+ * @param asn The ASN number associated with a legacy peering.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String peeringLocation, LegacyPeeringsKind kind, Integer asn) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (peeringLocation == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter peeringLocation is required and cannot be null."));
+ }
+ if (kind == null) {
+ return Mono.error(new IllegalArgumentException("Parameter kind is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ peeringLocation,
+ kind,
+ asn,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Lists all of the legacy peerings under the given subscription matching the specified kind and location.
+ *
+ * @param peeringLocation The location of the peering.
+ * @param kind The kind of the peering.
+ * @param asn The ASN number associated with a legacy peering.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String peeringLocation, LegacyPeeringsKind kind, Integer asn, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (peeringLocation == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter peeringLocation is required and cannot be null."));
+ }
+ if (kind == null) {
+ return Mono.error(new IllegalArgumentException("Parameter kind is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ peeringLocation,
+ kind,
+ asn,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all of the legacy peerings under the given subscription matching the specified kind and location.
+ *
+ * @param peeringLocation The location of the peering.
+ * @param kind The kind of the peering.
+ * @param asn The ASN number associated with a legacy peering.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String peeringLocation, LegacyPeeringsKind kind, Integer asn) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(peeringLocation, kind, asn), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all of the legacy peerings under the given subscription matching the specified kind and location.
+ *
+ * @param peeringLocation The location of the peering.
+ * @param kind The kind of the peering.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String peeringLocation, LegacyPeeringsKind kind) {
+ final Integer asn = null;
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(peeringLocation, kind, asn), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all of the legacy peerings under the given subscription matching the specified kind and location.
+ *
+ * @param peeringLocation The location of the peering.
+ * @param kind The kind of the peering.
+ * @param asn The ASN number associated with a legacy peering.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String peeringLocation, LegacyPeeringsKind kind, Integer asn, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(peeringLocation, kind, asn, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all of the legacy peerings under the given subscription matching the specified kind and location.
+ *
+ * @param peeringLocation The location of the peering.
+ * @param kind The kind of the peering.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String peeringLocation, LegacyPeeringsKind kind) {
+ final Integer asn = null;
+ return new PagedIterable<>(listAsync(peeringLocation, kind, asn));
+ }
+
+ /**
+ * Lists all of the legacy peerings under the given subscription matching the specified kind and location.
+ *
+ * @param peeringLocation The location of the peering.
+ * @param kind The kind of the peering.
+ * @param asn The ASN number associated with a legacy peering.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String peeringLocation, LegacyPeeringsKind kind, Integer asn, Context context) {
+ return new PagedIterable<>(listAsync(peeringLocation, kind, asn, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peerings.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsImpl.java
new file mode 100644
index 000000000000..d8b98acd2560
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsImpl.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.PeeringManager;
+import com.azure.resourcemanager.peering.fluent.LegacyPeeringsClient;
+import com.azure.resourcemanager.peering.fluent.models.PeeringInner;
+import com.azure.resourcemanager.peering.models.LegacyPeerings;
+import com.azure.resourcemanager.peering.models.LegacyPeeringsKind;
+import com.azure.resourcemanager.peering.models.Peering;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class LegacyPeeringsImpl implements LegacyPeerings {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyPeeringsImpl.class);
+
+ private final LegacyPeeringsClient innerClient;
+
+ private final PeeringManager serviceManager;
+
+ public LegacyPeeringsImpl(LegacyPeeringsClient innerClient, PeeringManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String peeringLocation, LegacyPeeringsKind kind) {
+ PagedIterable inner = this.serviceClient().list(peeringLocation, kind);
+ return Utils.mapPage(inner, inner1 -> new PeeringImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String peeringLocation, LegacyPeeringsKind kind, Integer asn, Context context) {
+ PagedIterable inner = this.serviceClient().list(peeringLocation, kind, asn, context);
+ return Utils.mapPage(inner, inner1 -> new PeeringImpl(inner1, this.manager()));
+ }
+
+ private LegacyPeeringsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private PeeringManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationImpl.java
new file mode 100644
index 000000000000..c1ef91623047
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationImpl.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.resourcemanager.peering.PeeringManager;
+import com.azure.resourcemanager.peering.fluent.models.OperationInner;
+import com.azure.resourcemanager.peering.models.Operation;
+import com.azure.resourcemanager.peering.models.OperationDisplayInfo;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final PeeringManager serviceManager;
+
+ OperationImpl(OperationInner innerObject, PeeringManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public OperationDisplayInfo display() {
+ return this.innerModel().display();
+ }
+
+ public Boolean isDataAction() {
+ return this.innerModel().isDataAction();
+ }
+
+ public OperationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private PeeringManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsClientImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..a89553ade75f
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsClientImpl.java
@@ -0,0 +1,269 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.fluent.OperationsClient;
+import com.azure.resourcemanager.peering.fluent.models.OperationInner;
+import com.azure.resourcemanager.peering.models.OperationListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public final class OperationsClientImpl implements OperationsClient {
+ private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final OperationsService service;
+
+ /** The service client containing this operation class. */
+ private final PeeringManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(PeeringManagementClientImpl client) {
+ this.service =
+ RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PeeringManagementClientOperations to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PeeringManagementCli")
+ private interface OperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.Peering/operations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all of the available API operations for peering resources.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering API operations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Lists all of the available API operations for peering resources.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering API operations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all of the available API operations for peering resources.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering API operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all of the available API operations for peering resources.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering API operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all of the available API operations for peering resources.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering API operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Lists all of the available API operations for peering resources.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering API operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering API operations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering API operations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..839437710585
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsImpl.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.PeeringManager;
+import com.azure.resourcemanager.peering.fluent.OperationsClient;
+import com.azure.resourcemanager.peering.fluent.models.OperationInner;
+import com.azure.resourcemanager.peering.models.Operation;
+import com.azure.resourcemanager.peering.models.Operations;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class OperationsImpl implements Operations {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class);
+
+ private final OperationsClient innerClient;
+
+ private final PeeringManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient, PeeringManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private PeeringManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnImpl.java
new file mode 100644
index 000000000000..b88ab12ddd7a
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnImpl.java
@@ -0,0 +1,155 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.peering.PeeringManager;
+import com.azure.resourcemanager.peering.fluent.models.PeerAsnInner;
+import com.azure.resourcemanager.peering.models.ContactDetail;
+import com.azure.resourcemanager.peering.models.PeerAsn;
+import com.azure.resourcemanager.peering.models.ValidationState;
+import java.util.Collections;
+import java.util.List;
+
+public final class PeerAsnImpl implements PeerAsn, PeerAsn.Definition, PeerAsn.Update {
+ private PeerAsnInner innerObject;
+
+ private final PeeringManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public Integer peerAsn() {
+ return this.innerModel().peerAsn();
+ }
+
+ public List peerContactDetail() {
+ List inner = this.innerModel().peerContactDetail();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String peerName() {
+ return this.innerModel().peerName();
+ }
+
+ public ValidationState validationState() {
+ return this.innerModel().validationState();
+ }
+
+ public String errorMessage() {
+ return this.innerModel().errorMessage();
+ }
+
+ public PeerAsnInner innerModel() {
+ return this.innerObject;
+ }
+
+ private PeeringManager manager() {
+ return this.serviceManager;
+ }
+
+ private String peerAsnName;
+
+ public PeerAsn create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPeerAsns()
+ .createOrUpdateWithResponse(peerAsnName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PeerAsn create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPeerAsns()
+ .createOrUpdateWithResponse(peerAsnName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ PeerAsnImpl(String name, PeeringManager serviceManager) {
+ this.innerObject = new PeerAsnInner();
+ this.serviceManager = serviceManager;
+ this.peerAsnName = name;
+ }
+
+ public PeerAsnImpl update() {
+ return this;
+ }
+
+ public PeerAsn apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPeerAsns()
+ .createOrUpdateWithResponse(peerAsnName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PeerAsn apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPeerAsns()
+ .createOrUpdateWithResponse(peerAsnName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ PeerAsnImpl(PeerAsnInner innerObject, PeeringManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.peerAsnName = Utils.getValueFromIdByName(innerObject.id(), "peerAsns");
+ }
+
+ public PeerAsn refresh() {
+ this.innerObject =
+ serviceManager.serviceClient().getPeerAsns().getWithResponse(peerAsnName, Context.NONE).getValue();
+ return this;
+ }
+
+ public PeerAsn refresh(Context context) {
+ this.innerObject =
+ serviceManager.serviceClient().getPeerAsns().getWithResponse(peerAsnName, context).getValue();
+ return this;
+ }
+
+ public PeerAsnImpl withPeerAsn(Integer peerAsn) {
+ this.innerModel().withPeerAsn(peerAsn);
+ return this;
+ }
+
+ public PeerAsnImpl withPeerContactDetail(List peerContactDetail) {
+ this.innerModel().withPeerContactDetail(peerContactDetail);
+ return this;
+ }
+
+ public PeerAsnImpl withPeerName(String peerName) {
+ this.innerModel().withPeerName(peerName);
+ return this;
+ }
+
+ public PeerAsnImpl withValidationState(ValidationState validationState) {
+ this.innerModel().withValidationState(validationState);
+ return this;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnsClientImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnsClientImpl.java
new file mode 100644
index 000000000000..619a27f8403d
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnsClientImpl.java
@@ -0,0 +1,738 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.fluent.PeerAsnsClient;
+import com.azure.resourcemanager.peering.fluent.models.PeerAsnInner;
+import com.azure.resourcemanager.peering.models.PeerAsnListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in PeerAsnsClient. */
+public final class PeerAsnsClientImpl implements PeerAsnsClient {
+ private final ClientLogger logger = new ClientLogger(PeerAsnsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final PeerAsnsService service;
+
+ /** The service client containing this operation class. */
+ private final PeeringManagementClientImpl client;
+
+ /**
+ * Initializes an instance of PeerAsnsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PeerAsnsClientImpl(PeeringManagementClientImpl client) {
+ this.service = RestProxy.create(PeerAsnsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PeeringManagementClientPeerAsns to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PeeringManagementCli")
+ private interface PeerAsnsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("peerAsnName") String peerAsnName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("peerAsnName") String peerAsnName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") PeerAsnInner peerAsn,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("peerAsnName") String peerAsnName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets the peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the peer ASN with the specified name under the given subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String peerAsnName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (peerAsnName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter peerAsnName 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(),
+ peerAsnName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets the peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the peer ASN with the specified name under the given subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String peerAsnName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (peerAsnName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter peerAsnName 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(),
+ peerAsnName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the peer ASN with the specified name under the given subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String peerAsnName) {
+ return getWithResponseAsync(peerAsnName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the peer ASN with the specified name under the given subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PeerAsnInner get(String peerAsnName) {
+ return getAsync(peerAsnName).block();
+ }
+
+ /**
+ * Gets the peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the peer ASN with the specified name under the given subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String peerAsnName, Context context) {
+ return getWithResponseAsync(peerAsnName, context).block();
+ }
+
+ /**
+ * Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @param peerAsn The peer ASN.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the essential information related to the peer's ASN.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(String peerAsnName, PeerAsnInner peerAsn) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (peerAsnName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter peerAsnName 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 (peerAsn == null) {
+ return Mono.error(new IllegalArgumentException("Parameter peerAsn is required and cannot be null."));
+ } else {
+ peerAsn.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ peerAsnName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ peerAsn,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @param peerAsn The peer ASN.
+ * @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 essential information related to the peer's ASN.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String peerAsnName, PeerAsnInner peerAsn, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (peerAsnName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter peerAsnName 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 (peerAsn == null) {
+ return Mono.error(new IllegalArgumentException("Parameter peerAsn is required and cannot be null."));
+ } else {
+ peerAsn.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ peerAsnName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ peerAsn,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @param peerAsn The peer ASN.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the essential information related to the peer's ASN.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String peerAsnName, PeerAsnInner peerAsn) {
+ return createOrUpdateWithResponseAsync(peerAsnName, peerAsn)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @param peerAsn The peer ASN.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the essential information related to the peer's ASN.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PeerAsnInner createOrUpdate(String peerAsnName, PeerAsnInner peerAsn) {
+ return createOrUpdateAsync(peerAsnName, peerAsn).block();
+ }
+
+ /**
+ * Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @param peerAsn The peer ASN.
+ * @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 essential information related to the peer's ASN.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String peerAsnName, PeerAsnInner peerAsn, Context context) {
+ return createOrUpdateWithResponseAsync(peerAsnName, peerAsn, context).block();
+ }
+
+ /**
+ * Deletes an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String peerAsnName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (peerAsnName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter peerAsnName 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(),
+ peerAsnName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Deletes an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String peerAsnName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (peerAsnName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter peerAsnName 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(),
+ peerAsnName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String peerAsnName) {
+ return deleteWithResponseAsync(peerAsnName).flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Deletes an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String peerAsnName) {
+ deleteAsync(peerAsnName).block();
+ }
+
+ /**
+ * Deletes an existing peer ASN with the specified name under the given subscription.
+ *
+ * @param peerAsnName The peer ASN name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String peerAsnName, Context context) {
+ return deleteWithResponseAsync(peerAsnName, context).block();
+ }
+
+ /**
+ * Lists all of the peer ASNs under the given subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peer ASNs.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Lists all of the peer ASNs under the given subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peer ASNs.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all of the peer ASNs under the given subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peer ASNs.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all of the peer ASNs under the given subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peer ASNs.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all of the peer ASNs under the given subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peer ASNs.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Lists all of the peer ASNs under the given subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peer ASNs.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peer ASNs.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peer ASNs.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnsImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnsImpl.java
new file mode 100644
index 000000000000..44314a48a655
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnsImpl.java
@@ -0,0 +1,126 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.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.peering.PeeringManager;
+import com.azure.resourcemanager.peering.fluent.PeerAsnsClient;
+import com.azure.resourcemanager.peering.fluent.models.PeerAsnInner;
+import com.azure.resourcemanager.peering.models.PeerAsn;
+import com.azure.resourcemanager.peering.models.PeerAsns;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class PeerAsnsImpl implements PeerAsns {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PeerAsnsImpl.class);
+
+ private final PeerAsnsClient innerClient;
+
+ private final PeeringManager serviceManager;
+
+ public PeerAsnsImpl(PeerAsnsClient innerClient, PeeringManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PeerAsn get(String peerAsnName) {
+ PeerAsnInner inner = this.serviceClient().get(peerAsnName);
+ if (inner != null) {
+ return new PeerAsnImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(String peerAsnName, Context context) {
+ Response inner = this.serviceClient().getWithResponse(peerAsnName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new PeerAsnImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String peerAsnName) {
+ this.serviceClient().delete(peerAsnName);
+ }
+
+ public Response deleteWithResponse(String peerAsnName, Context context) {
+ return this.serviceClient().deleteWithResponse(peerAsnName, context);
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new PeerAsnImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new PeerAsnImpl(inner1, this.manager()));
+ }
+
+ public PeerAsn getById(String id) {
+ String peerAsnName = Utils.getValueFromIdByName(id, "peerAsns");
+ if (peerAsnName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'peerAsns'.", id)));
+ }
+ return this.getWithResponse(peerAsnName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String peerAsnName = Utils.getValueFromIdByName(id, "peerAsns");
+ if (peerAsnName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'peerAsns'.", id)));
+ }
+ return this.getWithResponse(peerAsnName, context);
+ }
+
+ public void deleteById(String id) {
+ String peerAsnName = Utils.getValueFromIdByName(id, "peerAsns");
+ if (peerAsnName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'peerAsns'.", id)));
+ }
+ this.deleteWithResponse(peerAsnName, Context.NONE).getValue();
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String peerAsnName = Utils.getValueFromIdByName(id, "peerAsns");
+ if (peerAsnName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'peerAsns'.", id)));
+ }
+ return this.deleteWithResponse(peerAsnName, context);
+ }
+
+ private PeerAsnsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private PeeringManager manager() {
+ return this.serviceManager;
+ }
+
+ public PeerAsnImpl define(String name) {
+ return new PeerAsnImpl(name, this.manager());
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringImpl.java
new file mode 100644
index 000000000000..e0742cc0e2a7
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringImpl.java
@@ -0,0 +1,228 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.peering.PeeringManager;
+import com.azure.resourcemanager.peering.fluent.models.PeeringInner;
+import com.azure.resourcemanager.peering.models.Kind;
+import com.azure.resourcemanager.peering.models.Peering;
+import com.azure.resourcemanager.peering.models.PeeringPropertiesDirect;
+import com.azure.resourcemanager.peering.models.PeeringPropertiesExchange;
+import com.azure.resourcemanager.peering.models.PeeringSku;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import com.azure.resourcemanager.peering.models.ResourceTags;
+import java.util.Collections;
+import java.util.Map;
+
+public final class PeeringImpl implements Peering, Peering.Definition, Peering.Update {
+ private PeeringInner innerObject;
+
+ private final PeeringManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public PeeringSku sku() {
+ return this.innerModel().sku();
+ }
+
+ public Kind kind() {
+ return this.innerModel().kind();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public PeeringPropertiesDirect direct() {
+ return this.innerModel().direct();
+ }
+
+ public PeeringPropertiesExchange exchange() {
+ return this.innerModel().exchange();
+ }
+
+ public String peeringLocation() {
+ return this.innerModel().peeringLocation();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public PeeringInner innerModel() {
+ return this.innerObject;
+ }
+
+ private PeeringManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String peeringName;
+
+ private ResourceTags updateTags;
+
+ public PeeringImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Peering create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPeerings()
+ .createOrUpdateWithResponse(resourceGroupName, peeringName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Peering create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPeerings()
+ .createOrUpdateWithResponse(resourceGroupName, peeringName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ PeeringImpl(String name, PeeringManager serviceManager) {
+ this.innerObject = new PeeringInner();
+ this.serviceManager = serviceManager;
+ this.peeringName = name;
+ }
+
+ public PeeringImpl update() {
+ this.updateTags = new ResourceTags();
+ return this;
+ }
+
+ public Peering apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPeerings()
+ .updateWithResponse(resourceGroupName, peeringName, updateTags, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Peering apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPeerings()
+ .updateWithResponse(resourceGroupName, peeringName, updateTags, context)
+ .getValue();
+ return this;
+ }
+
+ PeeringImpl(PeeringInner innerObject, PeeringManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.peeringName = Utils.getValueFromIdByName(innerObject.id(), "peerings");
+ }
+
+ public Peering refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPeerings()
+ .getByResourceGroupWithResponse(resourceGroupName, peeringName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Peering refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPeerings()
+ .getByResourceGroupWithResponse(resourceGroupName, peeringName, context)
+ .getValue();
+ return this;
+ }
+
+ public PeeringImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public PeeringImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public PeeringImpl withSku(PeeringSku sku) {
+ this.innerModel().withSku(sku);
+ return this;
+ }
+
+ public PeeringImpl withKind(Kind kind) {
+ this.innerModel().withKind(kind);
+ return this;
+ }
+
+ public PeeringImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateTags.withTags(tags);
+ return this;
+ }
+ }
+
+ public PeeringImpl withDirect(PeeringPropertiesDirect direct) {
+ this.innerModel().withDirect(direct);
+ return this;
+ }
+
+ public PeeringImpl withExchange(PeeringPropertiesExchange exchange) {
+ this.innerModel().withExchange(exchange);
+ return this;
+ }
+
+ public PeeringImpl withPeeringLocation(String peeringLocation) {
+ this.innerModel().withPeeringLocation(peeringLocation);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringLocationImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringLocationImpl.java
new file mode 100644
index 000000000000..5eac8002efe2
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringLocationImpl.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.resourcemanager.peering.PeeringManager;
+import com.azure.resourcemanager.peering.fluent.models.PeeringLocationInner;
+import com.azure.resourcemanager.peering.models.Kind;
+import com.azure.resourcemanager.peering.models.PeeringLocation;
+import com.azure.resourcemanager.peering.models.PeeringLocationPropertiesDirect;
+import com.azure.resourcemanager.peering.models.PeeringLocationPropertiesExchange;
+
+public final class PeeringLocationImpl implements PeeringLocation {
+ private PeeringLocationInner innerObject;
+
+ private final PeeringManager serviceManager;
+
+ PeeringLocationImpl(PeeringLocationInner innerObject, PeeringManager 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 Kind kind() {
+ return this.innerModel().kind();
+ }
+
+ public PeeringLocationPropertiesDirect direct() {
+ return this.innerModel().direct();
+ }
+
+ public PeeringLocationPropertiesExchange exchange() {
+ return this.innerModel().exchange();
+ }
+
+ public String peeringLocation() {
+ return this.innerModel().peeringLocation();
+ }
+
+ public String country() {
+ return this.innerModel().country();
+ }
+
+ public String azureRegion() {
+ return this.innerModel().azureRegion();
+ }
+
+ public PeeringLocationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private PeeringManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringLocationsClientImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringLocationsClientImpl.java
new file mode 100644
index 000000000000..83e03dac20c5
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringLocationsClientImpl.java
@@ -0,0 +1,346 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.fluent.PeeringLocationsClient;
+import com.azure.resourcemanager.peering.fluent.models.PeeringLocationInner;
+import com.azure.resourcemanager.peering.models.PeeringLocationListResult;
+import com.azure.resourcemanager.peering.models.PeeringLocationsDirectPeeringType;
+import com.azure.resourcemanager.peering.models.PeeringLocationsKind;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in PeeringLocationsClient. */
+public final class PeeringLocationsClientImpl implements PeeringLocationsClient {
+ private final ClientLogger logger = new ClientLogger(PeeringLocationsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final PeeringLocationsService service;
+
+ /** The service client containing this operation class. */
+ private final PeeringManagementClientImpl client;
+
+ /**
+ * Initializes an instance of PeeringLocationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PeeringLocationsClientImpl(PeeringManagementClientImpl client) {
+ this.service =
+ RestProxy.create(PeeringLocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PeeringManagementClientPeeringLocations to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PeeringManagementCli")
+ private interface PeeringLocationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringLocations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("kind") PeeringLocationsKind kind,
+ @QueryParam("directPeeringType") PeeringLocationsDirectPeeringType directPeeringType,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all of the available peering locations for the specified kind of peering.
+ *
+ * @param kind The kind of the peering.
+ * @param directPeeringType The type of direct peering.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering locations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ PeeringLocationsKind kind, PeeringLocationsDirectPeeringType directPeeringType) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (kind == null) {
+ return Mono.error(new IllegalArgumentException("Parameter kind is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ kind,
+ directPeeringType,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Lists all of the available peering locations for the specified kind of peering.
+ *
+ * @param kind The kind of the peering.
+ * @param directPeeringType The type of direct peering.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering locations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ PeeringLocationsKind kind, PeeringLocationsDirectPeeringType directPeeringType, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (kind == null) {
+ return Mono.error(new IllegalArgumentException("Parameter kind is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ kind,
+ directPeeringType,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all of the available peering locations for the specified kind of peering.
+ *
+ * @param kind The kind of the peering.
+ * @param directPeeringType The type of direct peering.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering locations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ PeeringLocationsKind kind, PeeringLocationsDirectPeeringType directPeeringType) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(kind, directPeeringType), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all of the available peering locations for the specified kind of peering.
+ *
+ * @param kind The kind of the peering.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering locations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(PeeringLocationsKind kind) {
+ final PeeringLocationsDirectPeeringType directPeeringType = null;
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(kind, directPeeringType), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all of the available peering locations for the specified kind of peering.
+ *
+ * @param kind The kind of the peering.
+ * @param directPeeringType The type of direct peering.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering locations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ PeeringLocationsKind kind, PeeringLocationsDirectPeeringType directPeeringType, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(kind, directPeeringType, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all of the available peering locations for the specified kind of peering.
+ *
+ * @param kind The kind of the peering.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering locations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(PeeringLocationsKind kind) {
+ final PeeringLocationsDirectPeeringType directPeeringType = null;
+ return new PagedIterable<>(listAsync(kind, directPeeringType));
+ }
+
+ /**
+ * Lists all of the available peering locations for the specified kind of peering.
+ *
+ * @param kind The kind of the peering.
+ * @param directPeeringType The type of direct peering.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering locations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ PeeringLocationsKind kind, PeeringLocationsDirectPeeringType directPeeringType, Context context) {
+ return new PagedIterable<>(listAsync(kind, directPeeringType, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering locations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of peering locations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringLocationsImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringLocationsImpl.java
new file mode 100644
index 000000000000..cce11e1d75c6
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringLocationsImpl.java
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.PeeringManager;
+import com.azure.resourcemanager.peering.fluent.PeeringLocationsClient;
+import com.azure.resourcemanager.peering.fluent.models.PeeringLocationInner;
+import com.azure.resourcemanager.peering.models.PeeringLocation;
+import com.azure.resourcemanager.peering.models.PeeringLocations;
+import com.azure.resourcemanager.peering.models.PeeringLocationsDirectPeeringType;
+import com.azure.resourcemanager.peering.models.PeeringLocationsKind;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class PeeringLocationsImpl implements PeeringLocations {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringLocationsImpl.class);
+
+ private final PeeringLocationsClient innerClient;
+
+ private final PeeringManager serviceManager;
+
+ public PeeringLocationsImpl(PeeringLocationsClient innerClient, PeeringManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(PeeringLocationsKind kind) {
+ PagedIterable inner = this.serviceClient().list(kind);
+ return Utils.mapPage(inner, inner1 -> new PeeringLocationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ PeeringLocationsKind kind, PeeringLocationsDirectPeeringType directPeeringType, Context context) {
+ PagedIterable inner = this.serviceClient().list(kind, directPeeringType, context);
+ return Utils.mapPage(inner, inner1 -> new PeeringLocationImpl(inner1, this.manager()));
+ }
+
+ private PeeringLocationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private PeeringManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringManagementClientBuilder.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringManagementClientBuilder.java
new file mode 100644
index 000000000000..ac626dc5337d
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringManagementClientBuilder.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.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.CookiePolicy;
+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 PeeringManagementClientImpl type. */
+@ServiceClientBuilder(serviceClients = {PeeringManagementClientImpl.class})
+public final class PeeringManagementClientBuilder {
+ /*
+ * The Azure subscription ID.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The Azure subscription ID.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the PeeringManagementClientBuilder.
+ */
+ public PeeringManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the PeeringManagementClientBuilder.
+ */
+ public PeeringManagementClientBuilder 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 PeeringManagementClientBuilder.
+ */
+ public PeeringManagementClientBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ 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 PeeringManagementClientBuilder.
+ */
+ public PeeringManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ 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 PeeringManagementClientBuilder.
+ */
+ public PeeringManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ 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 PeeringManagementClientBuilder.
+ */
+ public PeeringManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of PeeringManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of PeeringManagementClientImpl.
+ */
+ public PeeringManagementClientImpl buildClient() {
+ if (endpoint == null) {
+ this.endpoint = "https://management.azure.com";
+ }
+ if (environment == null) {
+ this.environment = AzureEnvironment.AZURE;
+ }
+ if (defaultPollInterval == null) {
+ this.defaultPollInterval = Duration.ofSeconds(30);
+ }
+ if (pipeline == null) {
+ this.pipeline =
+ new HttpPipelineBuilder()
+ .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
+ .build();
+ }
+ if (serializerAdapter == null) {
+ this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
+ }
+ PeeringManagementClientImpl client =
+ new PeeringManagementClientImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringManagementClientImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringManagementClientImpl.java
new file mode 100644
index 000000000000..1f10890a52f1
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeeringManagementClientImpl.java
@@ -0,0 +1,489 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.util.Context;
+import com.azure.core.util.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.peering.fluent.CdnPeeringPrefixesClient;
+import com.azure.resourcemanager.peering.fluent.LegacyPeeringsClient;
+import com.azure.resourcemanager.peering.fluent.OperationsClient;
+import com.azure.resourcemanager.peering.fluent.PeerAsnsClient;
+import com.azure.resourcemanager.peering.fluent.PeeringLocationsClient;
+import com.azure.resourcemanager.peering.fluent.PeeringManagementClient;
+import com.azure.resourcemanager.peering.fluent.PeeringServiceCountriesClient;
+import com.azure.resourcemanager.peering.fluent.PeeringServiceLocationsClient;
+import com.azure.resourcemanager.peering.fluent.PeeringServiceProvidersClient;
+import com.azure.resourcemanager.peering.fluent.PeeringServicesClient;
+import com.azure.resourcemanager.peering.fluent.PeeringsClient;
+import com.azure.resourcemanager.peering.fluent.PrefixesClient;
+import com.azure.resourcemanager.peering.fluent.ReceivedRoutesClient;
+import com.azure.resourcemanager.peering.fluent.RegisteredAsnsClient;
+import com.azure.resourcemanager.peering.fluent.RegisteredPrefixesClient;
+import com.azure.resourcemanager.peering.fluent.ResourceProvidersClient;
+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 java.util.Map;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** Initializes a new instance of the PeeringManagementClientImpl type. */
+@ServiceClient(builder = PeeringManagementClientBuilder.class)
+public final class PeeringManagementClientImpl implements PeeringManagementClient {
+ private final ClientLogger logger = new ClientLogger(PeeringManagementClientImpl.class);
+
+ /** The Azure subscription ID. */
+ private final String subscriptionId;
+
+ /**
+ * Gets The Azure subscription ID.
+ *
+ * @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 CdnPeeringPrefixesClient object to access its operations. */
+ private final CdnPeeringPrefixesClient cdnPeeringPrefixes;
+
+ /**
+ * Gets the CdnPeeringPrefixesClient object to access its operations.
+ *
+ * @return the CdnPeeringPrefixesClient object.
+ */
+ public CdnPeeringPrefixesClient getCdnPeeringPrefixes() {
+ return this.cdnPeeringPrefixes;
+ }
+
+ /** The ResourceProvidersClient object to access its operations. */
+ private final ResourceProvidersClient resourceProviders;
+
+ /**
+ * Gets the ResourceProvidersClient object to access its operations.
+ *
+ * @return the ResourceProvidersClient object.
+ */
+ public ResourceProvidersClient getResourceProviders() {
+ return this.resourceProviders;
+ }
+
+ /** The LegacyPeeringsClient object to access its operations. */
+ private final LegacyPeeringsClient legacyPeerings;
+
+ /**
+ * Gets the LegacyPeeringsClient object to access its operations.
+ *
+ * @return the LegacyPeeringsClient object.
+ */
+ public LegacyPeeringsClient getLegacyPeerings() {
+ return this.legacyPeerings;
+ }
+
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /** The PeerAsnsClient object to access its operations. */
+ private final PeerAsnsClient peerAsns;
+
+ /**
+ * Gets the PeerAsnsClient object to access its operations.
+ *
+ * @return the PeerAsnsClient object.
+ */
+ public PeerAsnsClient getPeerAsns() {
+ return this.peerAsns;
+ }
+
+ /** The PeeringLocationsClient object to access its operations. */
+ private final PeeringLocationsClient peeringLocations;
+
+ /**
+ * Gets the PeeringLocationsClient object to access its operations.
+ *
+ * @return the PeeringLocationsClient object.
+ */
+ public PeeringLocationsClient getPeeringLocations() {
+ return this.peeringLocations;
+ }
+
+ /** The RegisteredAsnsClient object to access its operations. */
+ private final RegisteredAsnsClient registeredAsns;
+
+ /**
+ * Gets the RegisteredAsnsClient object to access its operations.
+ *
+ * @return the RegisteredAsnsClient object.
+ */
+ public RegisteredAsnsClient getRegisteredAsns() {
+ return this.registeredAsns;
+ }
+
+ /** The RegisteredPrefixesClient object to access its operations. */
+ private final RegisteredPrefixesClient registeredPrefixes;
+
+ /**
+ * Gets the RegisteredPrefixesClient object to access its operations.
+ *
+ * @return the RegisteredPrefixesClient object.
+ */
+ public RegisteredPrefixesClient getRegisteredPrefixes() {
+ return this.registeredPrefixes;
+ }
+
+ /** The PeeringsClient object to access its operations. */
+ private final PeeringsClient peerings;
+
+ /**
+ * Gets the PeeringsClient object to access its operations.
+ *
+ * @return the PeeringsClient object.
+ */
+ public PeeringsClient getPeerings() {
+ return this.peerings;
+ }
+
+ /** The ReceivedRoutesClient object to access its operations. */
+ private final ReceivedRoutesClient receivedRoutes;
+
+ /**
+ * Gets the ReceivedRoutesClient object to access its operations.
+ *
+ * @return the ReceivedRoutesClient object.
+ */
+ public ReceivedRoutesClient getReceivedRoutes() {
+ return this.receivedRoutes;
+ }
+
+ /** The PeeringServiceCountriesClient object to access its operations. */
+ private final PeeringServiceCountriesClient peeringServiceCountries;
+
+ /**
+ * Gets the PeeringServiceCountriesClient object to access its operations.
+ *
+ * @return the PeeringServiceCountriesClient object.
+ */
+ public PeeringServiceCountriesClient getPeeringServiceCountries() {
+ return this.peeringServiceCountries;
+ }
+
+ /** The PeeringServiceLocationsClient object to access its operations. */
+ private final PeeringServiceLocationsClient peeringServiceLocations;
+
+ /**
+ * Gets the PeeringServiceLocationsClient object to access its operations.
+ *
+ * @return the PeeringServiceLocationsClient object.
+ */
+ public PeeringServiceLocationsClient getPeeringServiceLocations() {
+ return this.peeringServiceLocations;
+ }
+
+ /** The PrefixesClient object to access its operations. */
+ private final PrefixesClient prefixes;
+
+ /**
+ * Gets the PrefixesClient object to access its operations.
+ *
+ * @return the PrefixesClient object.
+ */
+ public PrefixesClient getPrefixes() {
+ return this.prefixes;
+ }
+
+ /** The PeeringServiceProvidersClient object to access its operations. */
+ private final PeeringServiceProvidersClient peeringServiceProviders;
+
+ /**
+ * Gets the PeeringServiceProvidersClient object to access its operations.
+ *
+ * @return the PeeringServiceProvidersClient object.
+ */
+ public PeeringServiceProvidersClient getPeeringServiceProviders() {
+ return this.peeringServiceProviders;
+ }
+
+ /** The PeeringServicesClient object to access its operations. */
+ private final PeeringServicesClient peeringServices;
+
+ /**
+ * Gets the PeeringServicesClient object to access its operations.
+ *
+ * @return the PeeringServicesClient object.
+ */
+ public PeeringServicesClient getPeeringServices() {
+ return this.peeringServices;
+ }
+
+ /**
+ * Initializes an instance of PeeringManagementClient 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 Azure subscription ID.
+ * @param endpoint server parameter.
+ */
+ PeeringManagementClientImpl(
+ HttpPipeline httpPipeline,
+ SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval,
+ AzureEnvironment environment,
+ String subscriptionId,
+ String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2021-01-01";
+ this.cdnPeeringPrefixes = new CdnPeeringPrefixesClientImpl(this);
+ this.resourceProviders = new ResourceProvidersClientImpl(this);
+ this.legacyPeerings = new LegacyPeeringsClientImpl(this);
+ this.operations = new OperationsClientImpl(this);
+ this.peerAsns = new PeerAsnsClientImpl(this);
+ this.peeringLocations = new PeeringLocationsClientImpl(this);
+ this.registeredAsns = new RegisteredAsnsClientImpl(this);
+ this.registeredPrefixes = new RegisteredPrefixesClientImpl(this);
+ this.peerings = new PeeringsClientImpl(this);
+ this.receivedRoutes = new ReceivedRoutesClientImpl(this);
+ this.peeringServiceCountries = new PeeringServiceCountriesClientImpl(this);
+ this.peeringServiceLocations = new PeeringServiceLocationsClientImpl(this);
+ this.prefixes = new PrefixesClientImpl(this);
+ this.peeringServiceProviders = new PeeringServiceProvidersClientImpl(this);
+ this.peeringServices = new PeeringServicesClientImpl(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) {
+ for (Map.Entry