diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index ef902ccc52f49..a912d22a30055 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -337,6 +337,7 @@ com.azure.resourcemanager:azure-resourcemanager-securityinsights;1.0.0-beta.1;1.
com.azure.resourcemanager:azure-resourcemanager-oep;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-dnsresolver;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-mobilenetwork;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-customproviders;1.0.0-beta.1;1.0.0-beta.1
com.azure.tools:azure-sdk-archetype;1.0.0;1.0.0
com.azure.tools:azure-sdk-build-tool;1.0.0-beta.1;1.0.0-beta.1
diff --git a/pom.xml b/pom.xml
index 0ce586ceb6e74..4dcb489820e94 100644
--- a/pom.xml
+++ b/pom.xml
@@ -871,6 +871,7 @@
sdk/cosmossdk/costmanagementsdk/customerinsights
+ sdk/customproviderssdk/databoxsdk/databoxedgesdk/databricks
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/CHANGELOG.md b/sdk/customproviders/azure-resourcemanager-customproviders/CHANGELOG.md
new file mode 100644
index 0000000000000..d21e4f002518c
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2022-03-02)
+
+- Azure Resource Manager Customproviders client library for Java. This package contains Microsoft Azure SDK for Customproviders Management SDK. Allows extension of ARM control plane with custom resource providers. Package tag package-2018-09-01-preview. 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/customproviders/azure-resourcemanager-customproviders/README.md b/sdk/customproviders/azure-resourcemanager-customproviders/README.md
new file mode 100644
index 0000000000000..784e88c4379b9
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/README.md
@@ -0,0 +1,102 @@
+# Azure Resource Manager Customproviders client library for Java
+
+Azure Resource Manager Customproviders client library for Java.
+
+This package contains Microsoft Azure SDK for Customproviders Management SDK. Allows extension of ARM control plane with custom resource providers. Package tag package-2018-09-01-preview. 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-customproviders;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-customproviders
+ 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();
+CustomprovidersManager manager = CustomprovidersManager
+ .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
+
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/customproviders/azure-resourcemanager-customproviders/SAMPLE.md)
+
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/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/main/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/SAMPLE.md b/sdk/customproviders/azure-resourcemanager-customproviders/SAMPLE.md
new file mode 100644
index 0000000000000..257d85466a6c5
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/SAMPLE.md
@@ -0,0 +1,307 @@
+# Code snippets and samples
+
+
+## Associations
+
+- [CreateOrUpdate](#associations_createorupdate)
+- [Delete](#associations_delete)
+- [Get](#associations_get)
+- [ListAll](#associations_listall)
+
+## CustomResourceProvider
+
+- [CreateOrUpdate](#customresourceprovider_createorupdate)
+- [Delete](#customresourceprovider_delete)
+- [GetByResourceGroup](#customresourceprovider_getbyresourcegroup)
+- [List](#customresourceprovider_list)
+- [ListByResourceGroup](#customresourceprovider_listbyresourcegroup)
+- [Update](#customresourceprovider_update)
+
+## Operations
+
+- [List](#operations_list)
+### Associations_CreateOrUpdate
+
+```java
+/** Samples for Associations CreateOrUpdate. */
+public final class AssociationsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/customproviders/resource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/createOrUpdateAssociation.json
+ */
+ /**
+ * Sample code: Create or update an association.
+ *
+ * @param manager Entry point to CustomprovidersManager.
+ */
+ public static void createOrUpdateAnAssociation(
+ com.azure.resourcemanager.customproviders.CustomprovidersManager manager) {
+ manager
+ .associations()
+ .define("associationName")
+ .withExistingScope("scope")
+ .withTargetResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/appRG/providers/Microsoft.Solutions/applications/applicationName")
+ .create();
+ }
+}
+```
+
+### Associations_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Associations Delete. */
+public final class AssociationsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/customproviders/resource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/deleteAssociation.json
+ */
+ /**
+ * Sample code: Delete an association.
+ *
+ * @param manager Entry point to CustomprovidersManager.
+ */
+ public static void deleteAnAssociation(com.azure.resourcemanager.customproviders.CustomprovidersManager manager) {
+ manager.associations().delete("scope", "associationName", Context.NONE);
+ }
+}
+```
+
+### Associations_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Associations Get. */
+public final class AssociationsGetSamples {
+ /*
+ * x-ms-original-file: specification/customproviders/resource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/getAssociation.json
+ */
+ /**
+ * Sample code: Get an association.
+ *
+ * @param manager Entry point to CustomprovidersManager.
+ */
+ public static void getAnAssociation(com.azure.resourcemanager.customproviders.CustomprovidersManager manager) {
+ manager.associations().getWithResponse("scope", "associationName", Context.NONE);
+ }
+}
+```
+
+### Associations_ListAll
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Associations ListAll. */
+public final class AssociationsListAllSamples {
+ /*
+ * x-ms-original-file: specification/customproviders/resource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/getAllAssociations.json
+ */
+ /**
+ * Sample code: Get all associations.
+ *
+ * @param manager Entry point to CustomprovidersManager.
+ */
+ public static void getAllAssociations(com.azure.resourcemanager.customproviders.CustomprovidersManager manager) {
+ manager.associations().listAll("scope", Context.NONE);
+ }
+}
+```
+
+### CustomResourceProvider_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.customproviders.models.ActionRouting;
+import com.azure.resourcemanager.customproviders.models.CustomRPActionRouteDefinition;
+import com.azure.resourcemanager.customproviders.models.CustomRPResourceTypeRouteDefinition;
+import com.azure.resourcemanager.customproviders.models.ResourceTypeRouting;
+import java.util.Arrays;
+
+/** Samples for CustomResourceProvider CreateOrUpdate. */
+public final class CustomResourceProviderCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/customproviders/resource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/createOrUpdateCustomRP.json
+ */
+ /**
+ * Sample code: Create or update the custom resource provider.
+ *
+ * @param manager Entry point to CustomprovidersManager.
+ */
+ public static void createOrUpdateTheCustomResourceProvider(
+ com.azure.resourcemanager.customproviders.CustomprovidersManager manager) {
+ manager
+ .customResourceProviders()
+ .define("newrp")
+ .withRegion("eastus")
+ .withExistingResourceGroup("testRG")
+ .withActions(
+ Arrays
+ .asList(
+ new CustomRPActionRouteDefinition()
+ .withName("TestAction")
+ .withEndpoint("https://mytestendpoint/")
+ .withRoutingType(ActionRouting.PROXY)))
+ .withResourceTypes(
+ Arrays
+ .asList(
+ new CustomRPResourceTypeRouteDefinition()
+ .withName("TestResource")
+ .withEndpoint("https://mytestendpoint2/")
+ .withRoutingType(ResourceTypeRouting.PROXY_CACHE)))
+ .create();
+ }
+}
+```
+
+### CustomResourceProvider_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CustomResourceProvider Delete. */
+public final class CustomResourceProviderDeleteSamples {
+ /*
+ * x-ms-original-file: specification/customproviders/resource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/deleteCustomRP.json
+ */
+ /**
+ * Sample code: Delete a custom resource provider.
+ *
+ * @param manager Entry point to CustomprovidersManager.
+ */
+ public static void deleteACustomResourceProvider(
+ com.azure.resourcemanager.customproviders.CustomprovidersManager manager) {
+ manager.customResourceProviders().delete("testRG", "newrp", Context.NONE);
+ }
+}
+```
+
+### CustomResourceProvider_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CustomResourceProvider GetByResourceGroup. */
+public final class CustomResourceProviderGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/customproviders/resource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/getCustomRP.json
+ */
+ /**
+ * Sample code: Get a custom resource provider.
+ *
+ * @param manager Entry point to CustomprovidersManager.
+ */
+ public static void getACustomResourceProvider(
+ com.azure.resourcemanager.customproviders.CustomprovidersManager manager) {
+ manager.customResourceProviders().getByResourceGroupWithResponse("testRG", "newrp", Context.NONE);
+ }
+}
+```
+
+### CustomResourceProvider_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CustomResourceProvider List. */
+public final class CustomResourceProviderListSamples {
+ /*
+ * x-ms-original-file: specification/customproviders/resource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/listCustomRPsBySubscription.json
+ */
+ /**
+ * Sample code: List all custom resource providers on the subscription.
+ *
+ * @param manager Entry point to CustomprovidersManager.
+ */
+ public static void listAllCustomResourceProvidersOnTheSubscription(
+ com.azure.resourcemanager.customproviders.CustomprovidersManager manager) {
+ manager.customResourceProviders().list(Context.NONE);
+ }
+}
+```
+
+### CustomResourceProvider_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CustomResourceProvider ListByResourceGroup. */
+public final class CustomResourceProviderListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/customproviders/resource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/listCustomRPsByResourceGroup.json
+ */
+ /**
+ * Sample code: List all custom resource providers on the resourceGroup.
+ *
+ * @param manager Entry point to CustomprovidersManager.
+ */
+ public static void listAllCustomResourceProvidersOnTheResourceGroup(
+ com.azure.resourcemanager.customproviders.CustomprovidersManager manager) {
+ manager.customResourceProviders().listByResourceGroup("testRG", Context.NONE);
+ }
+}
+```
+
+### CustomResourceProvider_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.customproviders.models.CustomRPManifest;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for CustomResourceProvider Update. */
+public final class CustomResourceProviderUpdateSamples {
+ /*
+ * x-ms-original-file: specification/customproviders/resource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/updateCustomRP.json
+ */
+ /**
+ * Sample code: Update a custom resource provider.
+ *
+ * @param manager Entry point to CustomprovidersManager.
+ */
+ public static void updateACustomResourceProvider(
+ com.azure.resourcemanager.customproviders.CustomprovidersManager manager) {
+ CustomRPManifest resource =
+ manager
+ .customResourceProviders()
+ .getByResourceGroupWithResponse("testRG", "newrp", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf()).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/customproviders/resource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/operationsList.json
+ */
+ /**
+ * Sample code: List the custom providers operations.
+ *
+ * @param manager Entry point to CustomprovidersManager.
+ */
+ public static void listTheCustomProvidersOperations(
+ com.azure.resourcemanager.customproviders.CustomprovidersManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/pom.xml b/sdk/customproviders/azure-resourcemanager-customproviders/pom.xml
new file mode 100644
index 0000000000000..73a2d1c2e9246
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/pom.xml
@@ -0,0 +1,55 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-customproviders
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for Customproviders Management
+ This package contains Microsoft Azure SDK for Customproviders Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Allows extension of ARM control plane with custom resource providers. Package tag package-2018-09-01-preview.
+ 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
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.25.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.2
+
+
+
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/CustomprovidersManager.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/CustomprovidersManager.java
new file mode 100644
index 0000000000000..787fcabe84721
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/CustomprovidersManager.java
@@ -0,0 +1,267 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders;
+
+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.HttpPipelinePosition;
+import com.azure.core.http.policy.AddDatePolicy;
+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.http.policy.ArmChallengeAuthenticationPolicy;
+import com.azure.core.management.profile.AzureProfile;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.customproviders.fluent.Customproviders;
+import com.azure.resourcemanager.customproviders.implementation.AssociationsImpl;
+import com.azure.resourcemanager.customproviders.implementation.CustomResourceProvidersImpl;
+import com.azure.resourcemanager.customproviders.implementation.CustomprovidersBuilder;
+import com.azure.resourcemanager.customproviders.implementation.OperationsImpl;
+import com.azure.resourcemanager.customproviders.models.Associations;
+import com.azure.resourcemanager.customproviders.models.CustomResourceProviders;
+import com.azure.resourcemanager.customproviders.models.Operations;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/** Entry point to CustomprovidersManager. Allows extension of ARM control plane with custom resource providers. */
+public final class CustomprovidersManager {
+ private Operations operations;
+
+ private CustomResourceProviders customResourceProviders;
+
+ private Associations associations;
+
+ private final Customproviders clientObject;
+
+ private CustomprovidersManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new CustomprovidersBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of Customproviders service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Customproviders service API instance.
+ */
+ public static CustomprovidersManager 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 CustomprovidersManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new CustomprovidersManager.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 final List scopes = 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;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the 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 Customproviders service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Customproviders service API instance.
+ */
+ public CustomprovidersManager 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.customproviders")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new CustomprovidersManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @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 CustomResourceProviders. */
+ public CustomResourceProviders customResourceProviders() {
+ if (this.customResourceProviders == null) {
+ this.customResourceProviders =
+ new CustomResourceProvidersImpl(clientObject.getCustomResourceProviders(), this);
+ }
+ return customResourceProviders;
+ }
+
+ /** @return Resource collection API of Associations. */
+ public Associations associations() {
+ if (this.associations == null) {
+ this.associations = new AssociationsImpl(clientObject.getAssociations(), this);
+ }
+ return associations;
+ }
+
+ /**
+ * @return Wrapped service client Customproviders providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public Customproviders serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/AssociationsClient.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/AssociationsClient.java
new file mode 100644
index 0000000000000..bb1aac3b9b978
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/AssociationsClient.java
@@ -0,0 +1,190 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.customproviders.fluent.models.AssociationInner;
+
+/** An instance of this class provides access to all the operations defined in AssociationsClient. */
+public interface AssociationsClient {
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of the resource definition of this association.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, AssociationInner> beginCreateOrUpdate(
+ String scope, String associationName, AssociationInner association);
+
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of the resource definition of this association.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, AssociationInner> beginCreateOrUpdate(
+ String scope, String associationName, AssociationInner association, Context context);
+
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 resource definition of this association.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AssociationInner createOrUpdate(String scope, String associationName, AssociationInner association);
+
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @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 resource definition of this association.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AssociationInner createOrUpdate(
+ String scope, String associationName, AssociationInner association, Context context);
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String scope, String associationName);
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String scope, String associationName, Context context);
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 scope, String associationName);
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String scope, String associationName, Context context);
+
+ /**
+ * Get an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 association.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AssociationInner get(String scope, String associationName);
+
+ /**
+ * Get an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @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 association along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String scope, String associationName, Context context);
+
+ /**
+ * Gets all association for the given scope.
+ *
+ * @param scope The scope of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all association for the given scope as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAll(String scope);
+
+ /**
+ * Gets all association for the given scope.
+ *
+ * @param scope The scope of the association.
+ * @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 all association for the given scope as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAll(String scope, Context context);
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/CustomResourceProvidersClient.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/CustomResourceProvidersClient.java
new file mode 100644
index 0000000000000..278e3201b4e05
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/CustomResourceProvidersClient.java
@@ -0,0 +1,246 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.customproviders.fluent.models.CustomRPManifestInner;
+import com.azure.resourcemanager.customproviders.models.ResourceProvidersUpdate;
+
+/** An instance of this class provides access to all the operations defined in CustomResourceProvidersClient. */
+public interface CustomResourceProvidersClient {
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a manifest file that defines the custom resource provider
+ * resources.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CustomRPManifestInner> beginCreateOrUpdate(
+ String resourceGroupName, String resourceProviderName, CustomRPManifestInner resourceProvider);
+
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a manifest file that defines the custom resource provider
+ * resources.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CustomRPManifestInner> beginCreateOrUpdate(
+ String resourceGroupName, String resourceProviderName, CustomRPManifestInner resourceProvider, Context context);
+
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CustomRPManifestInner createOrUpdate(
+ String resourceGroupName, String resourceProviderName, CustomRPManifestInner resourceProvider);
+
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CustomRPManifestInner createOrUpdate(
+ String resourceGroupName, String resourceProviderName, CustomRPManifestInner resourceProvider, Context context);
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String resourceProviderName);
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String resourceProviderName, Context context);
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String resourceProviderName);
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String resourceProviderName, Context context);
+
+ /**
+ * Gets the custom resource provider manifest.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource 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 custom resource provider manifest.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CustomRPManifestInner getByResourceGroup(String resourceGroupName, String resourceProviderName);
+
+ /**
+ * Gets the custom resource provider manifest.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource 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 custom resource provider manifest along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String resourceProviderName, Context context);
+
+ /**
+ * Updates an existing custom resource provider. The only value that can be updated via PATCH currently is the tags.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param patchableResource The updatable fields of a custom resource 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 a manifest file that defines the custom resource provider resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CustomRPManifestInner update(
+ String resourceGroupName, String resourceProviderName, ResourceProvidersUpdate patchableResource);
+
+ /**
+ * Updates an existing custom resource provider. The only value that can be updated via PATCH currently is the tags.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param patchableResource The updatable fields of a custom resource provider.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String resourceProviderName,
+ ResourceProvidersUpdate patchableResource,
+ Context context);
+
+ /**
+ * Gets all the custom resource providers within a 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 all the custom resource providers within a resource group as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Gets all the custom resource providers within a 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 all the custom resource providers within a resource group as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Gets all the custom resource providers within a subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the custom resource providers within a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets all the custom resource providers within a 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 all the custom resource providers within a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/Customproviders.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/Customproviders.java
new file mode 100644
index 0000000000000..b97a1ab68c778
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/Customproviders.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.customproviders.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for Customproviders class. */
+public interface Customproviders {
+ /**
+ * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the CustomResourceProvidersClient object to access its operations.
+ *
+ * @return the CustomResourceProvidersClient object.
+ */
+ CustomResourceProvidersClient getCustomResourceProviders();
+
+ /**
+ * Gets the AssociationsClient object to access its operations.
+ *
+ * @return the AssociationsClient object.
+ */
+ AssociationsClient getAssociations();
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/OperationsClient.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/OperationsClient.java
new file mode 100644
index 0000000000000..16402ca37acfc
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/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.customproviders.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.customproviders.fluent.models.ResourceProviderOperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * The list of operations provided by Microsoft CustomProviders.
+ *
+ * @throws com.azure.core.management.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 results of the request to list operations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * The list of operations provided by Microsoft CustomProviders.
+ *
+ * @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 results of the request to list operations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/AssociationInner.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/AssociationInner.java
new file mode 100644
index 0000000000000..c9062db6ef93e
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/AssociationInner.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.customproviders.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The resource definition of this association. */
+@Fluent
+public final class AssociationInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AssociationInner.class);
+
+ /*
+ * The properties of the association.
+ */
+ @JsonProperty(value = "properties")
+ private AssociationProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: The properties of the association.
+ *
+ * @return the innerProperties value.
+ */
+ private AssociationProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the targetResourceId property: The REST resource instance of the target resource for this association.
+ *
+ * @return the targetResourceId value.
+ */
+ public String targetResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetResourceId();
+ }
+
+ /**
+ * Set the targetResourceId property: The REST resource instance of the target resource for this association.
+ *
+ * @param targetResourceId the targetResourceId value to set.
+ * @return the AssociationInner object itself.
+ */
+ public AssociationInner withTargetResourceId(String targetResourceId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AssociationProperties();
+ }
+ this.innerProperties().withTargetResourceId(targetResourceId);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the association.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/AssociationProperties.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/AssociationProperties.java
new file mode 100644
index 0000000000000..5461e717248f2
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/AssociationProperties.java
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.customproviders.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of the association. */
+@Fluent
+public final class AssociationProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AssociationProperties.class);
+
+ /*
+ * The REST resource instance of the target resource for this association.
+ */
+ @JsonProperty(value = "targetResourceId")
+ private String targetResourceId;
+
+ /*
+ * The provisioning state of the association.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the targetResourceId property: The REST resource instance of the target resource for this association.
+ *
+ * @return the targetResourceId value.
+ */
+ public String targetResourceId() {
+ return this.targetResourceId;
+ }
+
+ /**
+ * Set the targetResourceId property: The REST resource instance of the target resource for this association.
+ *
+ * @param targetResourceId the targetResourceId value to set.
+ * @return the AssociationProperties object itself.
+ */
+ public AssociationProperties withTargetResourceId(String targetResourceId) {
+ this.targetResourceId = targetResourceId;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the association.
+ *
+ * @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/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/CustomRPManifestInner.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/CustomRPManifestInner.java
new file mode 100644
index 0000000000000..388baaaef1665
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/CustomRPManifestInner.java
@@ -0,0 +1,141 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.customproviders.models.CustomRPActionRouteDefinition;
+import com.azure.resourcemanager.customproviders.models.CustomRPResourceTypeRouteDefinition;
+import com.azure.resourcemanager.customproviders.models.CustomRPValidations;
+import com.azure.resourcemanager.customproviders.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** A manifest file that defines the custom resource provider resources. */
+@Fluent
+public final class CustomRPManifestInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomRPManifestInner.class);
+
+ /*
+ * The manifest for the custom resource provider
+ */
+ @JsonProperty(value = "properties")
+ private CustomRPManifestProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: The manifest for the custom resource provider.
+ *
+ * @return the innerProperties value.
+ */
+ private CustomRPManifestProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public CustomRPManifestInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public CustomRPManifestInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the actions property: A list of actions that the custom resource provider implements.
+ *
+ * @return the actions value.
+ */
+ public List actions() {
+ return this.innerProperties() == null ? null : this.innerProperties().actions();
+ }
+
+ /**
+ * Set the actions property: A list of actions that the custom resource provider implements.
+ *
+ * @param actions the actions value to set.
+ * @return the CustomRPManifestInner object itself.
+ */
+ public CustomRPManifestInner withActions(List actions) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CustomRPManifestProperties();
+ }
+ this.innerProperties().withActions(actions);
+ return this;
+ }
+
+ /**
+ * Get the resourceTypes property: A list of resource types that the custom resource provider implements.
+ *
+ * @return the resourceTypes value.
+ */
+ public List resourceTypes() {
+ return this.innerProperties() == null ? null : this.innerProperties().resourceTypes();
+ }
+
+ /**
+ * Set the resourceTypes property: A list of resource types that the custom resource provider implements.
+ *
+ * @param resourceTypes the resourceTypes value to set.
+ * @return the CustomRPManifestInner object itself.
+ */
+ public CustomRPManifestInner withResourceTypes(List resourceTypes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CustomRPManifestProperties();
+ }
+ this.innerProperties().withResourceTypes(resourceTypes);
+ return this;
+ }
+
+ /**
+ * Get the validations property: A list of validations to run on the custom resource provider's requests.
+ *
+ * @return the validations value.
+ */
+ public List validations() {
+ return this.innerProperties() == null ? null : this.innerProperties().validations();
+ }
+
+ /**
+ * Set the validations property: A list of validations to run on the custom resource provider's requests.
+ *
+ * @param validations the validations value to set.
+ * @return the CustomRPManifestInner object itself.
+ */
+ public CustomRPManifestInner withValidations(List validations) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CustomRPManifestProperties();
+ }
+ this.innerProperties().withValidations(validations);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource provider.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/CustomRPManifestProperties.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/CustomRPManifestProperties.java
new file mode 100644
index 0000000000000..49eef638e3491
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/CustomRPManifestProperties.java
@@ -0,0 +1,131 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.customproviders.models.CustomRPActionRouteDefinition;
+import com.azure.resourcemanager.customproviders.models.CustomRPResourceTypeRouteDefinition;
+import com.azure.resourcemanager.customproviders.models.CustomRPValidations;
+import com.azure.resourcemanager.customproviders.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The manifest for the custom resource provider. */
+@Fluent
+public final class CustomRPManifestProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomRPManifestProperties.class);
+
+ /*
+ * A list of actions that the custom resource provider implements.
+ */
+ @JsonProperty(value = "actions")
+ private List actions;
+
+ /*
+ * A list of resource types that the custom resource provider implements.
+ */
+ @JsonProperty(value = "resourceTypes")
+ private List resourceTypes;
+
+ /*
+ * A list of validations to run on the custom resource provider's requests.
+ */
+ @JsonProperty(value = "validations")
+ private List validations;
+
+ /*
+ * The provisioning state of the resource provider.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the actions property: A list of actions that the custom resource provider implements.
+ *
+ * @return the actions value.
+ */
+ public List actions() {
+ return this.actions;
+ }
+
+ /**
+ * Set the actions property: A list of actions that the custom resource provider implements.
+ *
+ * @param actions the actions value to set.
+ * @return the CustomRPManifestProperties object itself.
+ */
+ public CustomRPManifestProperties withActions(List actions) {
+ this.actions = actions;
+ return this;
+ }
+
+ /**
+ * Get the resourceTypes property: A list of resource types that the custom resource provider implements.
+ *
+ * @return the resourceTypes value.
+ */
+ public List resourceTypes() {
+ return this.resourceTypes;
+ }
+
+ /**
+ * Set the resourceTypes property: A list of resource types that the custom resource provider implements.
+ *
+ * @param resourceTypes the resourceTypes value to set.
+ * @return the CustomRPManifestProperties object itself.
+ */
+ public CustomRPManifestProperties withResourceTypes(List resourceTypes) {
+ this.resourceTypes = resourceTypes;
+ return this;
+ }
+
+ /**
+ * Get the validations property: A list of validations to run on the custom resource provider's requests.
+ *
+ * @return the validations value.
+ */
+ public List validations() {
+ return this.validations;
+ }
+
+ /**
+ * Set the validations property: A list of validations to run on the custom resource provider's requests.
+ *
+ * @param validations the validations value to set.
+ * @return the CustomRPManifestProperties object itself.
+ */
+ public CustomRPManifestProperties withValidations(List validations) {
+ this.validations = validations;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource provider.
+ *
+ * @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 (actions() != null) {
+ actions().forEach(e -> e.validate());
+ }
+ if (resourceTypes() != null) {
+ resourceTypes().forEach(e -> e.validate());
+ }
+ if (validations() != null) {
+ validations().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/ResourceProviderOperationInner.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/ResourceProviderOperationInner.java
new file mode 100644
index 0000000000000..cd557f81d5fce
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/ResourceProviderOperationInner.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.customproviders.models.ResourceProviderOperationDisplay;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Supported operations of this resource provider. */
+@Fluent
+public final class ResourceProviderOperationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProviderOperationInner.class);
+
+ /*
+ * Operation name, in format of {provider}/{resource}/{operation}
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Display metadata associated with the operation.
+ */
+ @JsonProperty(value = "display")
+ private ResourceProviderOperationDisplay display;
+
+ /**
+ * Get the name property: Operation name, in format of {provider}/{resource}/{operation}.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Operation name, in format of {provider}/{resource}/{operation}.
+ *
+ * @param name the name value to set.
+ * @return the ResourceProviderOperationInner object itself.
+ */
+ public ResourceProviderOperationInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the display property: Display metadata associated with the operation.
+ *
+ * @return the display value.
+ */
+ public ResourceProviderOperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Display metadata associated with the operation.
+ *
+ * @param display the display value to set.
+ * @return the ResourceProviderOperationInner object itself.
+ */
+ public ResourceProviderOperationInner withDisplay(ResourceProviderOperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/package-info.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/package-info.java
new file mode 100644
index 0000000000000..77cffc103e825
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for Customproviders. Allows extension of ARM control plane with custom
+ * resource providers.
+ */
+package com.azure.resourcemanager.customproviders.fluent.models;
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/package-info.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/package-info.java
new file mode 100644
index 0000000000000..ec20594332fe7
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for Customproviders. Allows extension of ARM control plane with custom
+ * resource providers.
+ */
+package com.azure.resourcemanager.customproviders.fluent;
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/AssociationImpl.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/AssociationImpl.java
new file mode 100644
index 0000000000000..631345393d571
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/AssociationImpl.java
@@ -0,0 +1,142 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.customproviders.fluent.models.AssociationInner;
+import com.azure.resourcemanager.customproviders.models.Association;
+import com.azure.resourcemanager.customproviders.models.ProvisioningState;
+
+public final class AssociationImpl implements Association, Association.Definition, Association.Update {
+ private AssociationInner innerObject;
+
+ private final com.azure.resourcemanager.customproviders.CustomprovidersManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String targetResourceId() {
+ return this.innerModel().targetResourceId();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public AssociationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.customproviders.CustomprovidersManager manager() {
+ return this.serviceManager;
+ }
+
+ private String scope;
+
+ private String associationName;
+
+ public AssociationImpl withExistingScope(String scope) {
+ this.scope = scope;
+ return this;
+ }
+
+ public Association create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAssociations()
+ .createOrUpdate(scope, associationName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Association create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAssociations()
+ .createOrUpdate(scope, associationName, this.innerModel(), context);
+ return this;
+ }
+
+ AssociationImpl(String name, com.azure.resourcemanager.customproviders.CustomprovidersManager serviceManager) {
+ this.innerObject = new AssociationInner();
+ this.serviceManager = serviceManager;
+ this.associationName = name;
+ }
+
+ public AssociationImpl update() {
+ return this;
+ }
+
+ public Association apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAssociations()
+ .createOrUpdate(scope, associationName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Association apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAssociations()
+ .createOrUpdate(scope, associationName, this.innerModel(), context);
+ return this;
+ }
+
+ AssociationImpl(
+ AssociationInner innerObject, com.azure.resourcemanager.customproviders.CustomprovidersManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.scope =
+ Utils
+ .getValueFromIdByParameterName(
+ innerObject.id(),
+ "/{scope}/providers/Microsoft.CustomProviders/associations/{associationName}",
+ "scope");
+ this.associationName =
+ Utils
+ .getValueFromIdByParameterName(
+ innerObject.id(),
+ "/{scope}/providers/Microsoft.CustomProviders/associations/{associationName}",
+ "associationName");
+ }
+
+ public Association refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAssociations()
+ .getWithResponse(scope, associationName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Association refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAssociations()
+ .getWithResponse(scope, associationName, context)
+ .getValue();
+ return this;
+ }
+
+ public AssociationImpl withTargetResourceId(String targetResourceId) {
+ this.innerModel().withTargetResourceId(targetResourceId);
+ return this;
+ }
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/AssociationsClientImpl.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/AssociationsClientImpl.java
new file mode 100644
index 0000000000000..c4f1d5216b515
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/AssociationsClientImpl.java
@@ -0,0 +1,936 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.customproviders.fluent.AssociationsClient;
+import com.azure.resourcemanager.customproviders.fluent.models.AssociationInner;
+import com.azure.resourcemanager.customproviders.models.AssociationsList;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in AssociationsClient. */
+public final class AssociationsClientImpl implements AssociationsClient {
+ private final ClientLogger logger = new ClientLogger(AssociationsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final AssociationsService service;
+
+ /** The service client containing this operation class. */
+ private final CustomprovidersImpl client;
+
+ /**
+ * Initializes an instance of AssociationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AssociationsClientImpl(CustomprovidersImpl client) {
+ this.service =
+ RestProxy.create(AssociationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CustomprovidersAssociations to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "CustomprovidersAssoc")
+ private interface AssociationsService {
+ @Headers({"Content-Type: application/json"})
+ @Put("/{scope}/providers/Microsoft.CustomProviders/associations/{associationName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam(value = "scope", encoded = true) String scope,
+ @PathParam("associationName") String associationName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") AssociationInner association,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete("/{scope}/providers/Microsoft.CustomProviders/associations/{associationName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam(value = "scope", encoded = true) String scope,
+ @PathParam("associationName") String associationName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/{scope}/providers/Microsoft.CustomProviders/associations/{associationName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam(value = "scope", encoded = true) String scope,
+ @PathParam("associationName") String associationName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/{scope}/providers/Microsoft.CustomProviders/associations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listAll(
+ @HostParam("$host") String endpoint,
+ @PathParam(value = "scope", encoded = true) String scope,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listAllNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the resource definition of this association along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String scope, String associationName, AssociationInner association) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ if (associationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter associationName is required and cannot be null."));
+ }
+ if (association == null) {
+ return Mono.error(new IllegalArgumentException("Parameter association is required and cannot be null."));
+ } else {
+ association.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ scope,
+ associationName,
+ this.client.getApiVersion(),
+ association,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @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 resource definition of this association along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String scope, String associationName, AssociationInner association, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ if (associationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter associationName is required and cannot be null."));
+ }
+ if (association == null) {
+ return Mono.error(new IllegalArgumentException("Parameter association is required and cannot be null."));
+ } else {
+ association.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ scope,
+ associationName,
+ this.client.getApiVersion(),
+ association,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of the resource definition of this association.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, AssociationInner> beginCreateOrUpdateAsync(
+ String scope, String associationName, AssociationInner association) {
+ Mono>> mono = createOrUpdateWithResponseAsync(scope, associationName, association);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ AssociationInner.class,
+ AssociationInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of the resource definition of this association.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, AssociationInner> beginCreateOrUpdateAsync(
+ String scope, String associationName, AssociationInner association, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(scope, associationName, association, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), AssociationInner.class, AssociationInner.class, context);
+ }
+
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of the resource definition of this association.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, AssociationInner> beginCreateOrUpdate(
+ String scope, String associationName, AssociationInner association) {
+ return beginCreateOrUpdateAsync(scope, associationName, association).getSyncPoller();
+ }
+
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of the resource definition of this association.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, AssociationInner> beginCreateOrUpdate(
+ String scope, String associationName, AssociationInner association, Context context) {
+ return beginCreateOrUpdateAsync(scope, associationName, association, context).getSyncPoller();
+ }
+
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the resource definition of this association on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String scope, String associationName, AssociationInner association) {
+ return beginCreateOrUpdateAsync(scope, associationName, association)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @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 resource definition of this association on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String scope, String associationName, AssociationInner association, Context context) {
+ return beginCreateOrUpdateAsync(scope, associationName, association, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the resource definition of this association.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AssociationInner createOrUpdate(String scope, String associationName, AssociationInner association) {
+ return createOrUpdateAsync(scope, associationName, association).block();
+ }
+
+ /**
+ * Create or update an association.
+ *
+ * @param scope The scope of the association. The scope can be any valid REST resource instance. For example, use
+ * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}'
+ * for a virtual machine resource.
+ * @param associationName The name of the association.
+ * @param association The parameters required to create or update an association.
+ * @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 resource definition of this association.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AssociationInner createOrUpdate(
+ String scope, String associationName, AssociationInner association, Context context) {
+ return createOrUpdateAsync(scope, associationName, association, context).block();
+ }
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String scope, String associationName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ if (associationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter associationName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ scope,
+ associationName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String scope, String associationName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ if (associationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter associationName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(this.client.getEndpoint(), scope, associationName, this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String scope, String associationName) {
+ Mono>> mono = deleteWithResponseAsync(scope, associationName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String scope, String associationName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(scope, associationName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String scope, String associationName) {
+ return beginDeleteAsync(scope, associationName).getSyncPoller();
+ }
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String scope, String associationName, Context context) {
+ return beginDeleteAsync(scope, associationName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String scope, String associationName) {
+ return beginDeleteAsync(scope, associationName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String scope, String associationName, Context context) {
+ return beginDeleteAsync(scope, associationName, context).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 scope, String associationName) {
+ deleteAsync(scope, associationName).block();
+ }
+
+ /**
+ * Delete an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String scope, String associationName, Context context) {
+ deleteAsync(scope, associationName, context).block();
+ }
+
+ /**
+ * Get an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 association along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String scope, String associationName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ if (associationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter associationName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ scope,
+ associationName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @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 an association along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String scope, String associationName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ if (associationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter associationName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(this.client.getEndpoint(), scope, associationName, this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * Get an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 association on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String scope, String associationName) {
+ return getWithResponseAsync(scope, associationName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 association.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AssociationInner get(String scope, String associationName) {
+ return getAsync(scope, associationName).block();
+ }
+
+ /**
+ * Get an association.
+ *
+ * @param scope The scope of the association.
+ * @param associationName The name of the association.
+ * @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 an association along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String scope, String associationName, Context context) {
+ return getWithResponseAsync(scope, associationName, context).block();
+ }
+
+ /**
+ * Gets all association for the given scope.
+ *
+ * @param scope The scope of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all association for the given scope along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllSinglePageAsync(String scope) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service.listAll(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets all association for the given scope.
+ *
+ * @param scope The scope of the association.
+ * @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 all association for the given scope along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllSinglePageAsync(String scope, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listAll(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets all association for the given scope.
+ *
+ * @param scope The scope of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all association for the given scope as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAllAsync(String scope) {
+ return new PagedFlux<>(() -> listAllSinglePageAsync(scope), nextLink -> listAllNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all association for the given scope.
+ *
+ * @param scope The scope of the association.
+ * @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 all association for the given scope as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAllAsync(String scope, Context context) {
+ return new PagedFlux<>(
+ () -> listAllSinglePageAsync(scope, context), nextLink -> listAllNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets all association for the given scope.
+ *
+ * @param scope The scope of the association.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all association for the given scope as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listAll(String scope) {
+ return new PagedIterable<>(listAllAsync(scope));
+ }
+
+ /**
+ * Gets all association for the given scope.
+ *
+ * @param scope The scope of the association.
+ * @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 all association for the given scope as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listAll(String scope, Context context) {
+ return new PagedIterable<>(listAllAsync(scope, 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 list of associations along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllNextSinglePageAsync(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.listAllNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of associations along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllNextSinglePageAsync(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
+ .listAllNext(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/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/AssociationsImpl.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/AssociationsImpl.java
new file mode 100644
index 0000000000000..cd9c24e2c7f5f
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/AssociationsImpl.java
@@ -0,0 +1,187 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.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.customproviders.fluent.AssociationsClient;
+import com.azure.resourcemanager.customproviders.fluent.models.AssociationInner;
+import com.azure.resourcemanager.customproviders.models.Association;
+import com.azure.resourcemanager.customproviders.models.Associations;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class AssociationsImpl implements Associations {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AssociationsImpl.class);
+
+ private final AssociationsClient innerClient;
+
+ private final com.azure.resourcemanager.customproviders.CustomprovidersManager serviceManager;
+
+ public AssociationsImpl(
+ AssociationsClient innerClient,
+ com.azure.resourcemanager.customproviders.CustomprovidersManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public void deleteByResourceGroup(String scope, String associationName) {
+ this.serviceClient().delete(scope, associationName);
+ }
+
+ public void delete(String scope, String associationName, Context context) {
+ this.serviceClient().delete(scope, associationName, context);
+ }
+
+ public Association get(String scope, String associationName) {
+ AssociationInner inner = this.serviceClient().get(scope, associationName);
+ if (inner != null) {
+ return new AssociationImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(String scope, String associationName, Context context) {
+ Response inner = this.serviceClient().getWithResponse(scope, associationName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AssociationImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listAll(String scope) {
+ PagedIterable inner = this.serviceClient().listAll(scope);
+ return Utils.mapPage(inner, inner1 -> new AssociationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listAll(String scope, Context context) {
+ PagedIterable inner = this.serviceClient().listAll(scope, context);
+ return Utils.mapPage(inner, inner1 -> new AssociationImpl(inner1, this.manager()));
+ }
+
+ public Association getById(String id) {
+ String scope =
+ Utils
+ .getValueFromIdByParameterName(
+ id, "/{scope}/providers/Microsoft.CustomProviders/associations/{associationName}", "scope");
+ if (scope == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
+ }
+ String associationName =
+ Utils
+ .getValueFromIdByParameterName(
+ id,
+ "/{scope}/providers/Microsoft.CustomProviders/associations/{associationName}",
+ "associationName");
+ if (associationName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'associations'.", id)));
+ }
+ return this.getWithResponse(scope, associationName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String scope =
+ Utils
+ .getValueFromIdByParameterName(
+ id, "/{scope}/providers/Microsoft.CustomProviders/associations/{associationName}", "scope");
+ if (scope == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
+ }
+ String associationName =
+ Utils
+ .getValueFromIdByParameterName(
+ id,
+ "/{scope}/providers/Microsoft.CustomProviders/associations/{associationName}",
+ "associationName");
+ if (associationName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'associations'.", id)));
+ }
+ return this.getWithResponse(scope, associationName, context);
+ }
+
+ public void deleteById(String id) {
+ String scope =
+ Utils
+ .getValueFromIdByParameterName(
+ id, "/{scope}/providers/Microsoft.CustomProviders/associations/{associationName}", "scope");
+ if (scope == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
+ }
+ String associationName =
+ Utils
+ .getValueFromIdByParameterName(
+ id,
+ "/{scope}/providers/Microsoft.CustomProviders/associations/{associationName}",
+ "associationName");
+ if (associationName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'associations'.", id)));
+ }
+ this.delete(scope, associationName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String scope =
+ Utils
+ .getValueFromIdByParameterName(
+ id, "/{scope}/providers/Microsoft.CustomProviders/associations/{associationName}", "scope");
+ if (scope == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
+ }
+ String associationName =
+ Utils
+ .getValueFromIdByParameterName(
+ id,
+ "/{scope}/providers/Microsoft.CustomProviders/associations/{associationName}",
+ "associationName");
+ if (associationName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'associations'.", id)));
+ }
+ this.delete(scope, associationName, context);
+ }
+
+ private AssociationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.customproviders.CustomprovidersManager manager() {
+ return this.serviceManager;
+ }
+
+ public AssociationImpl define(String name) {
+ return new AssociationImpl(name, this.manager());
+ }
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomRPManifestImpl.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomRPManifestImpl.java
new file mode 100644
index 0000000000000..974b01e36f26a
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomRPManifestImpl.java
@@ -0,0 +1,225 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.customproviders.fluent.models.CustomRPManifestInner;
+import com.azure.resourcemanager.customproviders.models.CustomRPActionRouteDefinition;
+import com.azure.resourcemanager.customproviders.models.CustomRPManifest;
+import com.azure.resourcemanager.customproviders.models.CustomRPResourceTypeRouteDefinition;
+import com.azure.resourcemanager.customproviders.models.CustomRPValidations;
+import com.azure.resourcemanager.customproviders.models.ProvisioningState;
+import com.azure.resourcemanager.customproviders.models.ResourceProvidersUpdate;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class CustomRPManifestImpl
+ implements CustomRPManifest, CustomRPManifest.Definition, CustomRPManifest.Update {
+ private CustomRPManifestInner innerObject;
+
+ private final com.azure.resourcemanager.customproviders.CustomprovidersManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public List actions() {
+ List inner = this.innerModel().actions();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List resourceTypes() {
+ List inner = this.innerModel().resourceTypes();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List validations() {
+ List inner = this.innerModel().validations();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public CustomRPManifestInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.customproviders.CustomprovidersManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String resourceProviderName;
+
+ private ResourceProvidersUpdate updatePatchableResource;
+
+ public CustomRPManifestImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public CustomRPManifest create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCustomResourceProviders()
+ .createOrUpdate(resourceGroupName, resourceProviderName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public CustomRPManifest create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCustomResourceProviders()
+ .createOrUpdate(resourceGroupName, resourceProviderName, this.innerModel(), context);
+ return this;
+ }
+
+ CustomRPManifestImpl(String name, com.azure.resourcemanager.customproviders.CustomprovidersManager serviceManager) {
+ this.innerObject = new CustomRPManifestInner();
+ this.serviceManager = serviceManager;
+ this.resourceProviderName = name;
+ }
+
+ public CustomRPManifestImpl update() {
+ this.updatePatchableResource = new ResourceProvidersUpdate();
+ return this;
+ }
+
+ public CustomRPManifest apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCustomResourceProviders()
+ .updateWithResponse(resourceGroupName, resourceProviderName, updatePatchableResource, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public CustomRPManifest apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCustomResourceProviders()
+ .updateWithResponse(resourceGroupName, resourceProviderName, updatePatchableResource, context)
+ .getValue();
+ return this;
+ }
+
+ CustomRPManifestImpl(
+ CustomRPManifestInner innerObject,
+ com.azure.resourcemanager.customproviders.CustomprovidersManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.resourceProviderName = Utils.getValueFromIdByName(innerObject.id(), "resourceProviders");
+ }
+
+ public CustomRPManifest refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCustomResourceProviders()
+ .getByResourceGroupWithResponse(resourceGroupName, resourceProviderName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public CustomRPManifest refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCustomResourceProviders()
+ .getByResourceGroupWithResponse(resourceGroupName, resourceProviderName, context)
+ .getValue();
+ return this;
+ }
+
+ public CustomRPManifestImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public CustomRPManifestImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public CustomRPManifestImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updatePatchableResource.withTags(tags);
+ return this;
+ }
+ }
+
+ public CustomRPManifestImpl withActions(List actions) {
+ this.innerModel().withActions(actions);
+ return this;
+ }
+
+ public CustomRPManifestImpl withResourceTypes(List resourceTypes) {
+ this.innerModel().withResourceTypes(resourceTypes);
+ return this;
+ }
+
+ public CustomRPManifestImpl withValidations(List validations) {
+ this.innerModel().withValidations(validations);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomResourceProvidersClientImpl.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomResourceProvidersClientImpl.java
new file mode 100644
index 0000000000000..b4914485d8090
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomResourceProvidersClientImpl.java
@@ -0,0 +1,1502 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.customproviders.fluent.CustomResourceProvidersClient;
+import com.azure.resourcemanager.customproviders.fluent.models.CustomRPManifestInner;
+import com.azure.resourcemanager.customproviders.models.ListByCustomRPManifest;
+import com.azure.resourcemanager.customproviders.models.ResourceProvidersUpdate;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in CustomResourceProvidersClient. */
+public final class CustomResourceProvidersClientImpl implements CustomResourceProvidersClient {
+ private final ClientLogger logger = new ClientLogger(CustomResourceProvidersClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final CustomResourceProvidersService service;
+
+ /** The service client containing this operation class. */
+ private final CustomprovidersImpl client;
+
+ /**
+ * Initializes an instance of CustomResourceProvidersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CustomResourceProvidersClientImpl(CustomprovidersImpl client) {
+ this.service =
+ RestProxy
+ .create(CustomResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CustomprovidersCustomResourceProviders to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "CustomprovidersCusto")
+ private interface CustomResourceProvidersService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomProviders"
+ + "/resourceProviders/{resourceProviderName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceProviderName") String resourceProviderName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") CustomRPManifestInner resourceProvider,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomProviders"
+ + "/resourceProviders/{resourceProviderName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceProviderName") String resourceProviderName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomProviders"
+ + "/resourceProviders/{resourceProviderName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceProviderName") String resourceProviderName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomProviders"
+ + "/resourceProviders/{resourceProviderName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceProviderName") String resourceProviderName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ResourceProvidersUpdate patchableResource,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomProviders"
+ + "/resourceProviders")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.CustomProviders/resourceProviders")
+ @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> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String resourceProviderName, CustomRPManifestInner resourceProvider) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceProviderName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceProviderName is required and cannot be null."));
+ }
+ if (resourceProvider == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceProvider is required and cannot be null."));
+ } else {
+ resourceProvider.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceProviderName,
+ this.client.getApiVersion(),
+ resourceProvider,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String resourceProviderName,
+ CustomRPManifestInner resourceProvider,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceProviderName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceProviderName is required and cannot be null."));
+ }
+ if (resourceProvider == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceProvider is required and cannot be null."));
+ } else {
+ resourceProvider.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceProviderName,
+ this.client.getApiVersion(),
+ resourceProvider,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a manifest file that defines the custom resource provider
+ * resources.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, CustomRPManifestInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String resourceProviderName, CustomRPManifestInner resourceProvider) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, resourceProviderName, resourceProvider);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ CustomRPManifestInner.class,
+ CustomRPManifestInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a manifest file that defines the custom resource provider
+ * resources.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, CustomRPManifestInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String resourceProviderName,
+ CustomRPManifestInner resourceProvider,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, resourceProviderName, resourceProvider, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), CustomRPManifestInner.class, CustomRPManifestInner.class, context);
+ }
+
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a manifest file that defines the custom resource provider
+ * resources.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, CustomRPManifestInner> beginCreateOrUpdate(
+ String resourceGroupName, String resourceProviderName, CustomRPManifestInner resourceProvider) {
+ return beginCreateOrUpdateAsync(resourceGroupName, resourceProviderName, resourceProvider).getSyncPoller();
+ }
+
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a manifest file that defines the custom resource provider
+ * resources.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, CustomRPManifestInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String resourceProviderName,
+ CustomRPManifestInner resourceProvider,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, resourceProviderName, resourceProvider, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String resourceProviderName, CustomRPManifestInner resourceProvider) {
+ return beginCreateOrUpdateAsync(resourceGroupName, resourceProviderName, resourceProvider)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String resourceProviderName,
+ CustomRPManifestInner resourceProvider,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, resourceProviderName, resourceProvider, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CustomRPManifestInner createOrUpdate(
+ String resourceGroupName, String resourceProviderName, CustomRPManifestInner resourceProvider) {
+ return createOrUpdateAsync(resourceGroupName, resourceProviderName, resourceProvider).block();
+ }
+
+ /**
+ * Creates or updates the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param resourceProvider The parameters required to create or update a custom resource provider definition.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CustomRPManifestInner createOrUpdate(
+ String resourceGroupName,
+ String resourceProviderName,
+ CustomRPManifestInner resourceProvider,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, resourceProviderName, resourceProvider, context).block();
+ }
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String resourceProviderName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceProviderName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceProviderName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceProviderName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String resourceProviderName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceProviderName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceProviderName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceProviderName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceProviderName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceProviderName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String resourceProviderName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, resourceProviderName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceProviderName) {
+ return beginDeleteAsync(resourceGroupName, resourceProviderName).getSyncPoller();
+ }
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String resourceProviderName, Context context) {
+ return beginDeleteAsync(resourceGroupName, resourceProviderName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String resourceProviderName) {
+ return beginDeleteAsync(resourceGroupName, resourceProviderName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String resourceProviderName, Context context) {
+ return beginDeleteAsync(resourceGroupName, resourceProviderName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String resourceProviderName) {
+ deleteAsync(resourceGroupName, resourceProviderName).block();
+ }
+
+ /**
+ * Deletes the custom resource provider.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String resourceProviderName, Context context) {
+ deleteAsync(resourceGroupName, resourceProviderName, context).block();
+ }
+
+ /**
+ * Gets the custom resource provider manifest.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the custom resource provider manifest along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String resourceProviderName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceProviderName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceProviderName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceProviderName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the custom resource provider manifest.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @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 custom resource provider manifest along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String resourceProviderName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceProviderName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceProviderName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceProviderName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the custom resource provider manifest.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the custom resource provider manifest on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String resourceProviderName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, resourceProviderName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the custom resource provider manifest.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the custom resource provider manifest.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CustomRPManifestInner getByResourceGroup(String resourceGroupName, String resourceProviderName) {
+ return getByResourceGroupAsync(resourceGroupName, resourceProviderName).block();
+ }
+
+ /**
+ * Gets the custom resource provider manifest.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @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 custom resource provider manifest along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String resourceProviderName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, resourceProviderName, context).block();
+ }
+
+ /**
+ * Updates an existing custom resource provider. The only value that can be updated via PATCH currently is the tags.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param patchableResource The updatable fields of a custom resource provider.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String resourceProviderName, ResourceProvidersUpdate patchableResource) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceProviderName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceProviderName is required and cannot be null."));
+ }
+ if (patchableResource == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter patchableResource is required and cannot be null."));
+ } else {
+ patchableResource.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceProviderName,
+ this.client.getApiVersion(),
+ patchableResource,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates an existing custom resource provider. The only value that can be updated via PATCH currently is the tags.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param patchableResource The updatable fields of a custom resource provider.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String resourceProviderName,
+ ResourceProvidersUpdate patchableResource,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceProviderName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceProviderName is required and cannot be null."));
+ }
+ if (patchableResource == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter patchableResource is required and cannot be null."));
+ } else {
+ patchableResource.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceProviderName,
+ this.client.getApiVersion(),
+ patchableResource,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates an existing custom resource provider. The only value that can be updated via PATCH currently is the tags.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param patchableResource The updatable fields of a custom resource provider.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String resourceProviderName, ResourceProvidersUpdate patchableResource) {
+ return updateWithResponseAsync(resourceGroupName, resourceProviderName, patchableResource)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Updates an existing custom resource provider. The only value that can be updated via PATCH currently is the tags.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param patchableResource The updatable fields of a custom resource provider.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CustomRPManifestInner update(
+ String resourceGroupName, String resourceProviderName, ResourceProvidersUpdate patchableResource) {
+ return updateAsync(resourceGroupName, resourceProviderName, patchableResource).block();
+ }
+
+ /**
+ * Updates an existing custom resource provider. The only value that can be updated via PATCH currently is the tags.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderName The name of the resource provider.
+ * @param patchableResource The updatable fields of a custom resource provider.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a manifest file that defines the custom resource provider resources along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String resourceProviderName,
+ ResourceProvidersUpdate patchableResource,
+ Context context) {
+ return updateWithResponseAsync(resourceGroupName, resourceProviderName, patchableResource, context).block();
+ }
+
+ /**
+ * Gets all the custom resource providers within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the custom resource providers within a resource group along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets all the custom resource providers within a 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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the custom resource providers within a resource group along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets all the custom resource providers within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the custom resource providers within a resource group as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all the custom resource providers within a 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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the custom resource providers within a resource group as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets all the custom resource providers within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the custom resource providers within a resource group as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Gets all the custom resource providers within a 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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the custom resource providers within a resource group as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Gets all the custom resource providers within a 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 all the custom resource providers within a subscription along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets all the custom resource providers within a 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 all the custom resource providers within a subscription along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets all the custom resource providers within a 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 all the custom resource providers within a subscription as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all the custom resource providers within a 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 all the custom resource providers within a subscription as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets all the custom resource providers within a 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 all the custom resource providers within a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Gets all the custom resource providers within a 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 all the custom resource providers within a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of custom resource providers along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of custom resource providers along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * 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 list of custom resource providers along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The 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 list of custom resource providers along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomResourceProvidersImpl.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomResourceProvidersImpl.java
new file mode 100644
index 0000000000000..b14fe85ecc0fc
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomResourceProvidersImpl.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.customproviders.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.customproviders.fluent.CustomResourceProvidersClient;
+import com.azure.resourcemanager.customproviders.fluent.models.CustomRPManifestInner;
+import com.azure.resourcemanager.customproviders.models.CustomRPManifest;
+import com.azure.resourcemanager.customproviders.models.CustomResourceProviders;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class CustomResourceProvidersImpl implements CustomResourceProviders {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomResourceProvidersImpl.class);
+
+ private final CustomResourceProvidersClient innerClient;
+
+ private final com.azure.resourcemanager.customproviders.CustomprovidersManager serviceManager;
+
+ public CustomResourceProvidersImpl(
+ CustomResourceProvidersClient innerClient,
+ com.azure.resourcemanager.customproviders.CustomprovidersManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String resourceProviderName) {
+ this.serviceClient().delete(resourceGroupName, resourceProviderName);
+ }
+
+ public void delete(String resourceGroupName, String resourceProviderName, Context context) {
+ this.serviceClient().delete(resourceGroupName, resourceProviderName, context);
+ }
+
+ public CustomRPManifest getByResourceGroup(String resourceGroupName, String resourceProviderName) {
+ CustomRPManifestInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceProviderName);
+ if (inner != null) {
+ return new CustomRPManifestImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String resourceProviderName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceProviderName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new CustomRPManifestImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new CustomRPManifestImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new CustomRPManifestImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new CustomRPManifestImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new CustomRPManifestImpl(inner1, this.manager()));
+ }
+
+ public CustomRPManifest getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceProviderName = Utils.getValueFromIdByName(id, "resourceProviders");
+ if (resourceProviderName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'resourceProviders'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, resourceProviderName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceProviderName = Utils.getValueFromIdByName(id, "resourceProviders");
+ if (resourceProviderName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'resourceProviders'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, resourceProviderName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceProviderName = Utils.getValueFromIdByName(id, "resourceProviders");
+ if (resourceProviderName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'resourceProviders'.", id)));
+ }
+ this.delete(resourceGroupName, resourceProviderName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceProviderName = Utils.getValueFromIdByName(id, "resourceProviders");
+ if (resourceProviderName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'resourceProviders'.", id)));
+ }
+ this.delete(resourceGroupName, resourceProviderName, context);
+ }
+
+ private CustomResourceProvidersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.customproviders.CustomprovidersManager manager() {
+ return this.serviceManager;
+ }
+
+ public CustomRPManifestImpl define(String name) {
+ return new CustomRPManifestImpl(name, this.manager());
+ }
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomprovidersBuilder.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomprovidersBuilder.java
new file mode 100644
index 0000000000000..fe30239d807ae
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomprovidersBuilder.java
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.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 CustomprovidersImpl type. */
+@ServiceClientBuilder(serviceClients = {CustomprovidersImpl.class})
+public final class CustomprovidersBuilder {
+ /*
+ * The Azure subscription ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000)
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the CustomprovidersBuilder.
+ */
+ public CustomprovidersBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the CustomprovidersBuilder.
+ */
+ public CustomprovidersBuilder 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 CustomprovidersBuilder.
+ */
+ public CustomprovidersBuilder 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 CustomprovidersBuilder.
+ */
+ public CustomprovidersBuilder 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 CustomprovidersBuilder.
+ */
+ public CustomprovidersBuilder 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 CustomprovidersBuilder.
+ */
+ public CustomprovidersBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of CustomprovidersImpl with the provided parameters.
+ *
+ * @return an instance of CustomprovidersImpl.
+ */
+ public CustomprovidersImpl 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();
+ }
+ CustomprovidersImpl client =
+ new CustomprovidersImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomprovidersImpl.java b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomprovidersImpl.java
new file mode 100644
index 0000000000000..c1579712db3f9
--- /dev/null
+++ b/sdk/customproviders/azure-resourcemanager-customproviders/src/main/java/com/azure/resourcemanager/customproviders/implementation/CustomprovidersImpl.java
@@ -0,0 +1,322 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.customproviders.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.customproviders.fluent.AssociationsClient;
+import com.azure.resourcemanager.customproviders.fluent.CustomResourceProvidersClient;
+import com.azure.resourcemanager.customproviders.fluent.Customproviders;
+import com.azure.resourcemanager.customproviders.fluent.OperationsClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import java.util.Map;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** Initializes a new instance of the CustomprovidersImpl type. */
+@ServiceClient(builder = CustomprovidersBuilder.class)
+public final class CustomprovidersImpl implements Customproviders {
+ private final ClientLogger logger = new ClientLogger(CustomprovidersImpl.class);
+
+ /** The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). */
+ private final String subscriptionId;
+
+ /**
+ * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ *
+ * @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 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 CustomResourceProvidersClient object to access its operations. */
+ private final CustomResourceProvidersClient customResourceProviders;
+
+ /**
+ * Gets the CustomResourceProvidersClient object to access its operations.
+ *
+ * @return the CustomResourceProvidersClient object.
+ */
+ public CustomResourceProvidersClient getCustomResourceProviders() {
+ return this.customResourceProviders;
+ }
+
+ /** The AssociationsClient object to access its operations. */
+ private final AssociationsClient associations;
+
+ /**
+ * Gets the AssociationsClient object to access its operations.
+ *
+ * @return the AssociationsClient object.
+ */
+ public AssociationsClient getAssociations() {
+ return this.associations;
+ }
+
+ /**
+ * Initializes an instance of Customproviders 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. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param endpoint server parameter.
+ */
+ CustomprovidersImpl(
+ 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 = "2018-09-01-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.customResourceProviders = new CustomResourceProvidersClientImpl(this);
+ this.associations = new AssociationsClientImpl(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