diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 3acc4771ced77..6bb0d4c2de20d 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -326,6 +326,7 @@ com.azure.resourcemanager:azure-resourcemanager-storagepool;1.0.0-beta.1;1.0.0-b
com.azure.resourcemanager:azure-resourcemanager-dataprotection;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-desktopvirtualization;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-loadtestservice;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-saas;1.0.0-beta.1;1.0.0-beta.1
com.azure.tools:azure-sdk-archetype;1.0.0;1.0.0
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
diff --git a/pom.xml b/pom.xml
index 928014fa07f54..3df0c64132ffa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -818,6 +818,7 @@
sdk/resourcehealth
sdk/resourcemanager
sdk/resourcemover
+ sdk/saas
sdk/schemaregistry
sdk/search
sdk/security
diff --git a/sdk/saas/azure-resourcemanager-saas/CHANGELOG.md b/sdk/saas/azure-resourcemanager-saas/CHANGELOG.md
new file mode 100644
index 0000000000000..26c6b7627d69d
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-12-16)
+
+- Azure Resource Manager SaaS client library for Java. This package contains Microsoft Azure SDK for SaaS Management SDK. REST APIs for Azure Marketplace SaaS Offers. Package tag package-2018-03-01-beta. 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/saas/azure-resourcemanager-saas/README.md b/sdk/saas/azure-resourcemanager-saas/README.md
new file mode 100644
index 0000000000000..d3ab98f1c2b88
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/README.md
@@ -0,0 +1,102 @@
+# Azure Resource Manager SaaS client library for Java
+
+Azure Resource Manager SaaS client library for Java.
+
+This package contains Microsoft Azure SDK for SaaS Management SDK. REST APIs for Azure Marketplace SaaS Offers. Package tag package-2018-03-01-beta. 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-saas;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-saas
+ 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();
+SaaSManager manager = SaaSManager
+ .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/saas/azure-resourcemanager-saas/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/saas/azure-resourcemanager-saas/SAMPLE.md b/sdk/saas/azure-resourcemanager-saas/SAMPLE.md
new file mode 100644
index 0000000000000..c610ea4ac8d4c
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/SAMPLE.md
@@ -0,0 +1,598 @@
+# Code snippets and samples
+
+
+## Applications
+
+- [ListByResourceGroup](#applications_listbyresourcegroup)
+
+## Operations
+
+- [List](#operations_list)
+
+## ResourceProvider
+
+- [SaasResourceListAccessToken](#resourceprovider_saasresourcelistaccesstoken)
+
+## SaaS
+
+- [CreateResource](#saas_createresource)
+- [Delete](#saas_delete)
+- [GetResource](#saas_getresource)
+- [UpdateResource](#saas_updateresource)
+
+## SaaSOperation
+
+- [Get](#saasoperation_get)
+
+## SaasResources
+
+- [List](#saasresources_list)
+
+## SaasSubscriptionLevel
+
+- [CreateOrUpdate](#saassubscriptionlevel_createorupdate)
+- [Delete](#saassubscriptionlevel_delete)
+- [GetByResourceGroup](#saassubscriptionlevel_getbyresourcegroup)
+- [List](#saassubscriptionlevel_list)
+- [ListAccessToken](#saassubscriptionlevel_listaccesstoken)
+- [ListByResourceGroup](#saassubscriptionlevel_listbyresourcegroup)
+- [MoveResources](#saassubscriptionlevel_moveresources)
+- [Update](#saassubscriptionlevel_update)
+- [UpdateToUnsubscribed](#saassubscriptionlevel_updatetounsubscribed)
+- [ValidateMoveResources](#saassubscriptionlevel_validatemoveresources)
+### Applications_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Applications ListByResourceGroup. */
+public final class ApplicationsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV1/SaaSGetApplications.json
+ */
+ /**
+ * Sample code: Get saas application.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void getSaasApplication(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager.applications().listByResourceGroup("myResourceGroup", Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV1/SaaSGetOperations.json
+ */
+ /**
+ * Sample code: Get saas operations.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void getSaasOperations(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### ResourceProvider_SaasResourceListAccessToken
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ResourceProvider SaasResourceListAccessToken. */
+public final class ResourceProviderSaasResourceListAccessTokenSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/ListAccessTokenPost.json
+ */
+ /**
+ * Sample code: generated SaaS resource token.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void generatedSaaSResourceToken(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager
+ .resourceProviders()
+ .saasResourceListAccessTokenWithResponse("c825645b-e31b-9cf4-1cee-2aba9e58bc7c", Context.NONE);
+ }
+}
+```
+
+### SaaS_CreateResource
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.saas.models.PaymentChannelType;
+import com.azure.resourcemanager.saas.models.SaasCreationProperties;
+import com.azure.resourcemanager.saas.models.SaasResourceCreation;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SaaS CreateResource. */
+public final class SaaSCreateResourceSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasPut.json
+ */
+ /**
+ * Sample code: Create SaaS resource.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void createSaaSResource(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager
+ .saaS()
+ .createResource(
+ new SaasResourceCreation()
+ .withProperties(
+ new SaasCreationProperties()
+ .withOfferId("microsofthealthcarebot")
+ .withPublisherId("microsoft-hcb")
+ .withSkuId("free")
+ .withPaymentChannelType(PaymentChannelType.SUBSCRIPTION_DELEGATED)
+ .withPaymentChannelMetadata(
+ mapOf("AzureSubscriptionId", "155af98a-3205-47e7-883b-a2ab9db9f88d"))
+ .withSaasResourceName("testRunnerFromArm")
+ .withTermId("hjdtn7tfnxcy")),
+ Context.NONE);
+ }
+
+ @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;
+ }
+}
+```
+
+### SaaS_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.saas.models.DeleteOptions;
+
+/** Samples for SaaS Delete. */
+public final class SaaSDeleteSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasDelete.json
+ */
+ /**
+ * Sample code: Delete SaaS resource.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void deleteSaaSResource(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager
+ .saaS()
+ .delete(
+ "115c3523-1fae-757f-af86-7b27cfd29805",
+ new DeleteOptions().withUnsubscribeOnly(true).withReasonCode(0.0f),
+ Context.NONE);
+ }
+}
+```
+
+### SaaS_GetResource
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SaaS GetResource. */
+public final class SaaSGetResourceSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasGet.json
+ */
+ /**
+ * Sample code: Get SaaS resource.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void getSaaSResource(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager.saaS().getResourceWithResponse("115c3523-1fae-757f-af86-7b27cfd29805", Context.NONE);
+ }
+}
+```
+
+### SaaS_UpdateResource
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.saas.models.SaasCreationProperties;
+import com.azure.resourcemanager.saas.models.SaasResourceCreation;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SaaS UpdateResource. */
+public final class SaaSUpdateResourceSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasPatch.json
+ */
+ /**
+ * Sample code: Update SaaS resource.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void updateSaaSResource(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager
+ .saaS()
+ .updateResource(
+ "115c3523-1fae-757f-af86-7b27cfd29805",
+ new SaasResourceCreation()
+ .withTags(mapOf())
+ .withProperties(new SaasCreationProperties().withSkuId("premium")),
+ Context.NONE);
+ }
+
+ @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;
+ }
+}
+```
+
+### SaaSOperation_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SaaSOperation Get. */
+public final class SaaSOperationGetSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/OperationResults/Get.json
+ */
+ /**
+ * Sample code: Get operation status.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void getOperationStatus(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager.saaSOperations().get("5f35cb4c-8065-45b3-9116-5ba335462e95", Context.NONE);
+ }
+}
+```
+
+### SaasResources_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SaasResources List. */
+public final class SaasResourcesListSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaaSGetAllResources.json
+ */
+ /**
+ * Sample code: Get all SaaS resources.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void getAllSaaSResources(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager.saasResources().list(Context.NONE);
+ }
+}
+```
+
+### SaasSubscriptionLevel_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.saas.models.PaymentChannelType;
+import com.azure.resourcemanager.saas.models.SaasCreationProperties;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SaasSubscriptionLevel CreateOrUpdate. */
+public final class SaasSubscriptionLevelCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasPut.json
+ */
+ /**
+ * Sample code: Create subscription level SaaS resource.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void createSubscriptionLevelSaaSResource(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager
+ .saasSubscriptionLevels()
+ .define("MyContosoSubscription")
+ .withExistingResourceGroup("my-saas-rg")
+ .withRegion("global")
+ .withName("MyContosoSubscription")
+ .withProperties(
+ new SaasCreationProperties()
+ .withOfferId("contosoOffer")
+ .withPublisherId("microsoft-contoso")
+ .withSkuId("free")
+ .withPaymentChannelType(PaymentChannelType.SUBSCRIPTION_DELEGATED)
+ .withPaymentChannelMetadata(mapOf("AzureSubscriptionId", "155af98a-3205-47e7-883b-a2ab9db9f88d"))
+ .withSaasResourceName("MyContosoSubscription")
+ .withTermId("hjdtn7tfnxcy"))
+ .create();
+ }
+
+ @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;
+ }
+}
+```
+
+### SaasSubscriptionLevel_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SaasSubscriptionLevel Delete. */
+public final class SaasSubscriptionLevelDeleteSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasDelete.json
+ */
+ /**
+ * Sample code: Delete Subscription Level SaaS resource.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void deleteSubscriptionLevelSaaSResource(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager.saasSubscriptionLevels().delete("my-saas-rg", "MyContosoSubscription", Context.NONE);
+ }
+}
+```
+
+### SaasSubscriptionLevel_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SaasSubscriptionLevel GetByResourceGroup. */
+public final class SaasSubscriptionLevelGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasGet.json
+ */
+ /**
+ * Sample code: Get subscription level saas resource.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void getSubscriptionLevelSaasResource(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager
+ .saasSubscriptionLevels()
+ .getByResourceGroupWithResponse("my-saas-rg", "MyContosoSubscription", Context.NONE);
+ }
+}
+```
+
+### SaasSubscriptionLevel_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SaasSubscriptionLevel List. */
+public final class SaasSubscriptionLevelListSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasGetAllInAzureSubscription.json
+ */
+ /**
+ * Sample code: Get subscription level saas resources in Azure subscription.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void getSubscriptionLevelSaasResourcesInAzureSubscription(
+ com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager.saasSubscriptionLevels().list(Context.NONE);
+ }
+}
+```
+
+### SaasSubscriptionLevel_ListAccessToken
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SaasSubscriptionLevel ListAccessToken. */
+public final class SaasSubscriptionLevelListAccessTokenSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/ListAccessTokenPost.json
+ */
+ /**
+ * Sample code: List subscription level SaaS resource access token.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void listSubscriptionLevelSaaSResourceAccessToken(
+ com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager
+ .saasSubscriptionLevels()
+ .listAccessTokenWithResponse("my-saas-rg", "MyContosoSubscription", Context.NONE);
+ }
+}
+```
+
+### SaasSubscriptionLevel_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SaasSubscriptionLevel ListByResourceGroup. */
+public final class SaasSubscriptionLevelListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasGetAllInResourceGroup.json
+ */
+ /**
+ * Sample code: Get subscription level saas resources in resource group.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void getSubscriptionLevelSaasResourcesInResourceGroup(
+ com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager.saasSubscriptionLevels().listByResourceGroup("my-saas-rg", Context.NONE);
+ }
+}
+```
+
+### SaasSubscriptionLevel_MoveResources
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.saas.models.MoveResource;
+import java.util.Arrays;
+
+/** Samples for SaasSubscriptionLevel MoveResources. */
+public final class SaasSubscriptionLevelMoveResourcesSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/ResourceMove.json
+ */
+ /**
+ * Sample code: Move of a subscription Level SaaS resource.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void moveOfASubscriptionLevelSaaSResource(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager
+ .saasSubscriptionLevels()
+ .moveResources(
+ "my-saas-rg",
+ new MoveResource()
+ .withTargetResourceGroup(
+ "/subscriptions/5122d0a3-1e10-4baf-bdc5-c2a452489525/resourceGroups/new-saas-rg")
+ .withResources(
+ Arrays
+ .asList(
+ "/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas1",
+ "/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas2",
+ "/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas3")),
+ Context.NONE);
+ }
+}
+```
+
+### SaasSubscriptionLevel_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.saas.models.SaasCreationProperties;
+import com.azure.resourcemanager.saas.models.SaasResource;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SaasSubscriptionLevel Update. */
+public final class SaasSubscriptionLevelUpdateSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasPatch.json
+ */
+ /**
+ * Sample code: Update subscription level SaaS resource.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void updateSubscriptionLevelSaaSResource(com.azure.resourcemanager.saas.SaaSManager manager) {
+ SaasResource resource =
+ manager
+ .saasSubscriptionLevels()
+ .getByResourceGroupWithResponse("my-saas-rg", "MyContosoSubscription", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf()).withProperties(new SaasCreationProperties().withSkuId("premium")).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;
+ }
+}
+```
+
+### SaasSubscriptionLevel_UpdateToUnsubscribed
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.saas.models.DeleteOptions;
+
+/** Samples for SaasSubscriptionLevel UpdateToUnsubscribed. */
+public final class SaasSubscriptionLevelUpdateToUnsubscribedSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasUnsubscribe.json
+ */
+ /**
+ * Sample code: Unsubscribe Subscription Level SaaS resource.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void unsubscribeSubscriptionLevelSaaSResource(com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager
+ .saasSubscriptionLevels()
+ .updateToUnsubscribed(
+ "my-saas-rg",
+ "MyContosoSubscription",
+ new DeleteOptions()
+ .withUnsubscribeOnly(true)
+ .withReasonCode(0.0f)
+ .withFeedback("No longer need this SaaS"),
+ Context.NONE);
+ }
+}
+```
+
+### SaasSubscriptionLevel_ValidateMoveResources
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.saas.models.MoveResource;
+import java.util.Arrays;
+
+/** Samples for SaasSubscriptionLevel ValidateMoveResources. */
+public final class SaasSubscriptionLevelValidateMoveResourcesSamples {
+ /*
+ * x-ms-original-file: specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/ValidateResourceMove.json
+ */
+ /**
+ * Sample code: Validate move of a subscription Level SaaS resource.
+ *
+ * @param manager Entry point to SaaSManager.
+ */
+ public static void validateMoveOfASubscriptionLevelSaaSResource(
+ com.azure.resourcemanager.saas.SaaSManager manager) {
+ manager
+ .saasSubscriptionLevels()
+ .validateMoveResourcesWithResponse(
+ "my-saas-rg",
+ new MoveResource()
+ .withTargetResourceGroup(
+ "/subscriptions/5122d0a3-1e10-4baf-bdc5-c2a452489525/resourceGroups/new-saas-rg")
+ .withResources(
+ Arrays
+ .asList(
+ "/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas1",
+ "/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas2",
+ "/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas3")),
+ Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/saas/azure-resourcemanager-saas/pom.xml b/sdk/saas/azure-resourcemanager-saas/pom.xml
new file mode 100644
index 0000000000000..ab47948c5ed6c
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/pom.xml
@@ -0,0 +1,81 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-saas
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for SaaS Management
+ This package contains Microsoft Azure SDK for SaaS Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST APIs for Azure Marketplace SaaS Offers. Package tag package-2018-03-01-beta.
+ 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
+ false
+
+
+
+
+
+ com.azure
+ azure-core
+ 1.23.1
+
+
+ com.azure
+ azure-core-management
+ 1.4.4
+
+
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
+
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/SaaSManager.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/SaaSManager.java
new file mode 100644
index 0000000000000..9e42e92593a72
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/SaaSManager.java
@@ -0,0 +1,315 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas;
+
+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.saas.fluent.SaaSManagementClient;
+import com.azure.resourcemanager.saas.implementation.ApplicationsImpl;
+import com.azure.resourcemanager.saas.implementation.OperationsImpl;
+import com.azure.resourcemanager.saas.implementation.ResourceProvidersImpl;
+import com.azure.resourcemanager.saas.implementation.SaaSImpl;
+import com.azure.resourcemanager.saas.implementation.SaaSManagementClientBuilder;
+import com.azure.resourcemanager.saas.implementation.SaaSOperationsImpl;
+import com.azure.resourcemanager.saas.implementation.SaasResourcesImpl;
+import com.azure.resourcemanager.saas.implementation.SaasSubscriptionLevelsImpl;
+import com.azure.resourcemanager.saas.models.Applications;
+import com.azure.resourcemanager.saas.models.Operations;
+import com.azure.resourcemanager.saas.models.ResourceProviders;
+import com.azure.resourcemanager.saas.models.SaaS;
+import com.azure.resourcemanager.saas.models.SaaSOperations;
+import com.azure.resourcemanager.saas.models.SaasResources;
+import com.azure.resourcemanager.saas.models.SaasSubscriptionLevels;
+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 SaaSManager. REST APIs for Azure Marketplace SaaS Offers. */
+public final class SaaSManager {
+ private Operations operations;
+
+ private Applications applications;
+
+ private SaaS saaS;
+
+ private SaasResources saasResources;
+
+ private ResourceProviders resourceProviders;
+
+ private SaasSubscriptionLevels saasSubscriptionLevels;
+
+ private SaaSOperations saaSOperations;
+
+ private final SaaSManagementClient clientObject;
+
+ private SaaSManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new SaaSManagementClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of SaaS service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the SaaS service API instance.
+ */
+ public static SaaSManager 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 SaaSManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new SaaSManager.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 SaaS service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the SaaS service API instance.
+ */
+ public SaaSManager 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.saas")
+ .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 SaaSManager(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 Applications. */
+ public Applications applications() {
+ if (this.applications == null) {
+ this.applications = new ApplicationsImpl(clientObject.getApplications(), this);
+ }
+ return applications;
+ }
+
+ /** @return Resource collection API of SaaS. */
+ public SaaS saaS() {
+ if (this.saaS == null) {
+ this.saaS = new SaaSImpl(clientObject.getSaaS(), this);
+ }
+ return saaS;
+ }
+
+ /** @return Resource collection API of SaasResources. */
+ public SaasResources saasResources() {
+ if (this.saasResources == null) {
+ this.saasResources = new SaasResourcesImpl(clientObject.getSaasResources(), this);
+ }
+ return saasResources;
+ }
+
+ /** @return Resource collection API of ResourceProviders. */
+ public ResourceProviders resourceProviders() {
+ if (this.resourceProviders == null) {
+ this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
+ }
+ return resourceProviders;
+ }
+
+ /** @return Resource collection API of SaasSubscriptionLevels. */
+ public SaasSubscriptionLevels saasSubscriptionLevels() {
+ if (this.saasSubscriptionLevels == null) {
+ this.saasSubscriptionLevels =
+ new SaasSubscriptionLevelsImpl(clientObject.getSaasSubscriptionLevels(), this);
+ }
+ return saasSubscriptionLevels;
+ }
+
+ /** @return Resource collection API of SaaSOperations. */
+ public SaaSOperations saaSOperations() {
+ if (this.saaSOperations == null) {
+ this.saaSOperations = new SaaSOperationsImpl(clientObject.getSaaSOperations(), this);
+ }
+ return saaSOperations;
+ }
+
+ /**
+ * @return Wrapped service client SaaSManagementClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public SaaSManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/ApplicationsClient.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/ApplicationsClient.java
new file mode 100644
index 0000000000000..6ec468ec36704
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/ApplicationsClient.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.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.saas.fluent.models.SaasAppInner;
+
+/** An instance of this class provides access to all the operations defined in ApplicationsClient. */
+public interface ApplicationsClient {
+ /**
+ * Gets all SaaS resources by subscription id and resource group name.
+ *
+ * @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 SaaS resources by subscription id and resource group name.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Gets all SaaS resources by subscription id and resource group name.
+ *
+ * @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 SaaS resources by subscription id and resource group name.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/OperationsClient.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/OperationsClient.java
new file mode 100644
index 0000000000000..d527c356c89b0
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/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.saas.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.saas.fluent.models.SaasAppOperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Gets all SaaS app operations.
+ *
+ * @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 SaaS app operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets all SaaS app operations.
+ *
+ * @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 SaaS app operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/ResourceProvidersClient.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/ResourceProvidersClient.java
new file mode 100644
index 0000000000000..20dd2e01dd38e
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/ResourceProvidersClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.saas.fluent.models.AccessTokenResultInner;
+
+/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
+public interface ResourceProvidersClient {
+ /**
+ * Gets the ISV access token for a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @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 ISV access token for a SaaS resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AccessTokenResultInner saasResourceListAccessToken(String resourceId);
+
+ /**
+ * Gets the ISV access token for a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @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 ISV access token for a SaaS resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response saasResourceListAccessTokenWithResponse(String resourceId, Context context);
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaaSClient.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaaSClient.java
new file mode 100644
index 0000000000000..e25cd1541e0c0
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaaSClient.java
@@ -0,0 +1,212 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+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.saas.fluent.models.SaasResourceInner;
+import com.azure.resourcemanager.saas.models.DeleteOptions;
+import com.azure.resourcemanager.saas.models.SaasResourceCreation;
+
+/** An instance of this class provides access to all the operations defined in SaaSClient. */
+public interface SaaSClient {
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceId, DeleteOptions parameters);
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas operation.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceId, DeleteOptions parameters, Context context);
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas 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 resourceId, DeleteOptions parameters);
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas operation.
+ * @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 resourceId, DeleteOptions parameters, Context context);
+
+ /**
+ * Gets information about the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @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 information about the specified SaaS.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaasResourceInner getResource(String resourceId);
+
+ /**
+ * Gets information about the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @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 information about the specified SaaS.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getResourceWithResponse(String resourceId, Context context);
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SaasResourceInner> beginUpdateResource(
+ String resourceId, SaasResourceCreation parameters);
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SaasResourceInner> beginUpdateResource(
+ String resourceId, SaasResourceCreation parameters, Context context);
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaasResourceInner updateResource(String resourceId, SaasResourceCreation parameters);
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaasResourceInner updateResource(String resourceId, SaasResourceCreation parameters, Context context);
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SaasResourceInner> beginCreateResource(SaasResourceCreation parameters);
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SaasResourceInner> beginCreateResource(
+ SaasResourceCreation parameters, Context context);
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaasResourceInner createResource(SaasResourceCreation parameters);
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaasResourceInner createResource(SaasResourceCreation parameters, Context context);
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaaSManagementClient.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaaSManagementClient.java
new file mode 100644
index 0000000000000..8adc10ccdcb4f
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaaSManagementClient.java
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for SaaSManagementClient class. */
+public interface SaaSManagementClient {
+ /**
+ * 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 ApplicationsClient object to access its operations.
+ *
+ * @return the ApplicationsClient object.
+ */
+ ApplicationsClient getApplications();
+
+ /**
+ * Gets the SaaSClient object to access its operations.
+ *
+ * @return the SaaSClient object.
+ */
+ SaaSClient getSaaS();
+
+ /**
+ * Gets the SaasResourcesClient object to access its operations.
+ *
+ * @return the SaasResourcesClient object.
+ */
+ SaasResourcesClient getSaasResources();
+
+ /**
+ * Gets the ResourceProvidersClient object to access its operations.
+ *
+ * @return the ResourceProvidersClient object.
+ */
+ ResourceProvidersClient getResourceProviders();
+
+ /**
+ * Gets the SaasSubscriptionLevelsClient object to access its operations.
+ *
+ * @return the SaasSubscriptionLevelsClient object.
+ */
+ SaasSubscriptionLevelsClient getSaasSubscriptionLevels();
+
+ /**
+ * Gets the SaaSOperationsClient object to access its operations.
+ *
+ * @return the SaaSOperationsClient object.
+ */
+ SaaSOperationsClient getSaaSOperations();
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaaSOperationsClient.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaaSOperationsClient.java
new file mode 100644
index 0000000000000..1da91dd9e1ced
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaaSOperationsClient.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.saas.fluent.models.SaasResourceInner;
+
+/** An instance of this class provides access to all the operations defined in SaaSOperationsClient. */
+public interface SaaSOperationsClient {
+ /**
+ * Gets information about the specified operation progress.
+ *
+ * @param operationId the operation Id parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about the specified operation progress.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SaasResourceInner> beginGet(String operationId);
+
+ /**
+ * Gets information about the specified operation progress.
+ *
+ * @param operationId the operation Id parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about the specified operation progress.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SaasResourceInner> beginGet(String operationId, Context context);
+
+ /**
+ * Gets information about the specified operation progress.
+ *
+ * @param operationId the operation Id parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about the specified operation progress.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaasResourceInner get(String operationId);
+
+ /**
+ * Gets information about the specified operation progress.
+ *
+ * @param operationId the operation Id parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about the specified operation progress.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaasResourceInner get(String operationId, Context context);
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaasResourcesClient.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaasResourcesClient.java
new file mode 100644
index 0000000000000..2467bd80aeaee
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaasResourcesClient.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.saas.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.saas.fluent.models.SaasResourceInner;
+
+/** An instance of this class provides access to all the operations defined in SaasResourcesClient. */
+public interface SaasResourcesClient {
+ /**
+ * Get All Resources.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all Resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Get All Resources.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all Resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaasSubscriptionLevelsClient.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaasSubscriptionLevelsClient.java
new file mode 100644
index 0000000000000..89eb2ebb7cd31
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/SaasSubscriptionLevelsClient.java
@@ -0,0 +1,436 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.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.saas.fluent.models.AccessTokenResultInner;
+import com.azure.resourcemanager.saas.fluent.models.SaasResourceInner;
+import com.azure.resourcemanager.saas.models.DeleteOptions;
+import com.azure.resourcemanager.saas.models.MoveResource;
+import com.azure.resourcemanager.saas.models.SaasResourceCreation;
+
+/** An instance of this class provides access to all the operations defined in SaasSubscriptionLevelsClient. */
+public interface SaasSubscriptionLevelsClient {
+ /**
+ * Gets information about all the Subscription Level SaaS in a certain Azure 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 information about all the Subscription Level SaaS in a certain Azure subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets information about all the Subscription Level SaaS in a certain Azure 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 information about all the Subscription Level SaaS in a certain Azure subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Gets information about all the Subscription Level SaaS in a certain 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 information about all the Subscription Level SaaS in a certain resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Gets information about all the Subscription Level SaaS in a certain 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 information about all the Subscription Level SaaS in a certain resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Gets information about the specified Subscription Level SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @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 information about the specified Subscription Level SaaS.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaasResourceInner getByResourceGroup(String resourceGroupName, String resourceName);
+
+ /**
+ * Gets information about the specified Subscription Level SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @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 information about the specified Subscription Level SaaS.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Creates or updates a SaaS resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @param parameters Parameters supplied to the create or update subscription level saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SaasResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String resourceName, SaasResourceCreation parameters);
+
+ /**
+ * Creates or updates a SaaS resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @param parameters Parameters supplied to the create or update subscription level saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SaasResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String resourceName, SaasResourceCreation parameters, Context context);
+
+ /**
+ * Creates or updates a SaaS resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @param parameters Parameters supplied to the create or update subscription level saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaasResourceInner createOrUpdate(String resourceGroupName, String resourceName, SaasResourceCreation parameters);
+
+ /**
+ * Creates or updates a SaaS resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @param parameters Parameters supplied to the create or update subscription level saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaasResourceInner createOrUpdate(
+ String resourceGroupName, String resourceName, SaasResourceCreation parameters, Context context);
+
+ /**
+ * Updates a SaaS Subscription Level resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @param parameters Parameters supplied to the update saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SaasResourceInner> beginUpdate(
+ String resourceGroupName, String resourceName, SaasResourceCreation parameters);
+
+ /**
+ * Updates a SaaS Subscription Level resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @param parameters Parameters supplied to the update saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SaasResourceInner> beginUpdate(
+ String resourceGroupName, String resourceName, SaasResourceCreation parameters, Context context);
+
+ /**
+ * Updates a SaaS Subscription Level resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @param parameters Parameters supplied to the update saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaasResourceInner update(String resourceGroupName, String resourceName, SaasResourceCreation parameters);
+
+ /**
+ * Updates a SaaS Subscription Level resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @param parameters Parameters supplied to the update saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaasResourceInner update(
+ String resourceGroupName, String resourceName, SaasResourceCreation parameters, Context context);
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName);
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @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 resourceName);
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @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 resourceName, Context context);
+
+ /**
+ * Unsubscribe from a specified Subscription Level SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @param parameters Parameters supplied to unsubscribe saas 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginUpdateToUnsubscribed(
+ String resourceGroupName, String resourceName, DeleteOptions parameters);
+
+ /**
+ * Unsubscribe from a specified Subscription Level SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @param parameters Parameters supplied to unsubscribe saas operation.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginUpdateToUnsubscribed(
+ String resourceGroupName, String resourceName, DeleteOptions parameters, Context context);
+
+ /**
+ * Unsubscribe from a specified Subscription Level SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @param parameters Parameters supplied to unsubscribe saas 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 updateToUnsubscribed(String resourceGroupName, String resourceName, DeleteOptions parameters);
+
+ /**
+ * Unsubscribe from a specified Subscription Level SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @param parameters Parameters supplied to unsubscribe saas operation.
+ * @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 updateToUnsubscribed(String resourceGroupName, String resourceName, DeleteOptions parameters, Context context);
+
+ /**
+ * Gets the ISV access token for a specified Subscription Level SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @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 ISV access token for a specified Subscription Level SaaS.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AccessTokenResultInner listAccessToken(String resourceGroupName, String resourceName);
+
+ /**
+ * Gets the ISV access token for a specified Subscription Level SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceName The name of the resource.
+ * @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 ISV access token for a specified Subscription Level SaaS.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listAccessTokenWithResponse(
+ String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Validate whether a specified Subscription Level SaaS can be moved.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param moveResourceParameter Object that represents the resources to move.
+ * @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 validateMoveResources(String resourceGroupName, MoveResource moveResourceParameter);
+
+ /**
+ * Validate whether a specified Subscription Level SaaS can be moved.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param moveResourceParameter Object that represents the resources to move.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response validateMoveResourcesWithResponse(
+ String resourceGroupName, MoveResource moveResourceParameter, Context context);
+
+ /**
+ * Move a specified Subscription Level SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param moveResourceParameter Object that represents the resources to move.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginMoveResources(String resourceGroupName, MoveResource moveResourceParameter);
+
+ /**
+ * Move a specified Subscription Level SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param moveResourceParameter Object that represents the resources to move.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginMoveResources(
+ String resourceGroupName, MoveResource moveResourceParameter, Context context);
+
+ /**
+ * Move a specified Subscription Level SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param moveResourceParameter Object that represents the resources to move.
+ * @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 moveResources(String resourceGroupName, MoveResource moveResourceParameter);
+
+ /**
+ * Move a specified Subscription Level SaaS.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param moveResourceParameter Object that represents the resources to move.
+ * @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 moveResources(String resourceGroupName, MoveResource moveResourceParameter, Context context);
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/AccessTokenResultInner.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/AccessTokenResultInner.java
new file mode 100644
index 0000000000000..b7d3156f6d0c0
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/AccessTokenResultInner.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.saas.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** the ISV access token result response. */
+@Fluent
+public final class AccessTokenResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AccessTokenResultInner.class);
+
+ /*
+ * The Publisher Offer Base Uri
+ */
+ @JsonProperty(value = "publisherOfferBaseUri")
+ private String publisherOfferBaseUri;
+
+ /*
+ * The generated token
+ */
+ @JsonProperty(value = "token")
+ private String token;
+
+ /**
+ * Get the publisherOfferBaseUri property: The Publisher Offer Base Uri.
+ *
+ * @return the publisherOfferBaseUri value.
+ */
+ public String publisherOfferBaseUri() {
+ return this.publisherOfferBaseUri;
+ }
+
+ /**
+ * Set the publisherOfferBaseUri property: The Publisher Offer Base Uri.
+ *
+ * @param publisherOfferBaseUri the publisherOfferBaseUri value to set.
+ * @return the AccessTokenResultInner object itself.
+ */
+ public AccessTokenResultInner withPublisherOfferBaseUri(String publisherOfferBaseUri) {
+ this.publisherOfferBaseUri = publisherOfferBaseUri;
+ return this;
+ }
+
+ /**
+ * Get the token property: The generated token.
+ *
+ * @return the token value.
+ */
+ public String token() {
+ return this.token;
+ }
+
+ /**
+ * Set the token property: The generated token.
+ *
+ * @param token the token value to set.
+ * @return the AccessTokenResultInner object itself.
+ */
+ public AccessTokenResultInner withToken(String token) {
+ this.token = token;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/SaasAppInner.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/SaasAppInner.java
new file mode 100644
index 0000000000000..006a43de5ab86
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/SaasAppInner.java
@@ -0,0 +1,176 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.saas.models.SaasAppProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** the saasApp resource. */
+@Fluent
+public final class SaasAppInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SaasAppInner.class);
+
+ /*
+ * the resource Id.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * the resource location.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /*
+ * the resource name.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * the resource type.
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /*
+ * the resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private SaasAppProperties properties;
+
+ /*
+ * the resource tags.
+ */
+ @JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map tags;
+
+ /**
+ * Get the id property: the resource Id.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the location property: the resource location.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: the resource location.
+ *
+ * @param location the location value to set.
+ * @return the SaasAppInner object itself.
+ */
+ public SaasAppInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the name property: the resource name.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: the resource name.
+ *
+ * @param name the name value to set.
+ * @return the SaasAppInner object itself.
+ */
+ public SaasAppInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the type property: the resource type.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: the resource type.
+ *
+ * @param type the type value to set.
+ * @return the SaasAppInner object itself.
+ */
+ public SaasAppInner withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the properties property: the resource properties.
+ *
+ * @return the properties value.
+ */
+ public SaasAppProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: the resource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the SaasAppInner object itself.
+ */
+ public SaasAppInner withProperties(SaasAppProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the tags property: the resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: the resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the SaasAppInner object itself.
+ */
+ public SaasAppInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/SaasAppOperationInner.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/SaasAppOperationInner.java
new file mode 100644
index 0000000000000..86b89f246429d
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/SaasAppOperationInner.java
@@ -0,0 +1,132 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.saas.models.SaasAppOperationDisplay;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** saas app operations. */
+@Fluent
+public final class SaasAppOperationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SaasAppOperationInner.class);
+
+ /*
+ * the operation name
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * the operation display
+ */
+ @JsonProperty(value = "display")
+ private SaasAppOperationDisplay display;
+
+ /*
+ * the operation origin
+ */
+ @JsonProperty(value = "origin")
+ private String origin;
+
+ /*
+ * whether the operation is a data action or not.
+ */
+ @JsonProperty(value = "isDataAction")
+ private Boolean isDataAction;
+
+ /**
+ * Get the name property: the operation name.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: the operation name.
+ *
+ * @param name the name value to set.
+ * @return the SaasAppOperationInner object itself.
+ */
+ public SaasAppOperationInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the display property: the operation display.
+ *
+ * @return the display value.
+ */
+ public SaasAppOperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: the operation display.
+ *
+ * @param display the display value to set.
+ * @return the SaasAppOperationInner object itself.
+ */
+ public SaasAppOperationInner withDisplay(SaasAppOperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: the operation origin.
+ *
+ * @return the origin value.
+ */
+ public String origin() {
+ return this.origin;
+ }
+
+ /**
+ * Set the origin property: the operation origin.
+ *
+ * @param origin the origin value to set.
+ * @return the SaasAppOperationInner object itself.
+ */
+ public SaasAppOperationInner withOrigin(String origin) {
+ this.origin = origin;
+ return this;
+ }
+
+ /**
+ * Get the isDataAction property: whether the operation is a data action or not.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Set the isDataAction property: whether the operation is a data action or not.
+ *
+ * @param isDataAction the isDataAction value to set.
+ * @return the SaasAppOperationInner object itself.
+ */
+ public SaasAppOperationInner withIsDataAction(Boolean isDataAction) {
+ this.isDataAction = isDataAction;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/SaasResourceInner.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/SaasResourceInner.java
new file mode 100644
index 0000000000000..c12b6ae8de2ec
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/SaasResourceInner.java
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.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.saas.models.SaasResourceProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** SaaS REST API resource definition. */
+@Fluent
+public final class SaasResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SaasResourceInner.class);
+
+ /*
+ * saas properties
+ */
+ @JsonProperty(value = "properties")
+ private SaasResourceProperties properties;
+
+ /*
+ * the resource tags.
+ */
+ @JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map tags;
+
+ /**
+ * Get the properties property: saas properties.
+ *
+ * @return the properties value.
+ */
+ public SaasResourceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: saas properties.
+ *
+ * @param properties the properties value to set.
+ * @return the SaasResourceInner object itself.
+ */
+ public SaasResourceInner withProperties(SaasResourceProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the tags property: the resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: the resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the SaasResourceInner object itself.
+ */
+ public SaasResourceInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/package-info.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/package-info.java
new file mode 100644
index 0000000000000..c2a4e2c8f596e
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/models/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the inner data models for SaaSManagementClient. REST APIs for Azure Marketplace SaaS Offers. */
+package com.azure.resourcemanager.saas.fluent.models;
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/package-info.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/package-info.java
new file mode 100644
index 0000000000000..380ba414189b5
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/fluent/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the service clients for SaaSManagementClient. REST APIs for Azure Marketplace SaaS Offers. */
+package com.azure.resourcemanager.saas.fluent;
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/AccessTokenResultImpl.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/AccessTokenResultImpl.java
new file mode 100644
index 0000000000000..cc2958a548650
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/AccessTokenResultImpl.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.saas.implementation;
+
+import com.azure.resourcemanager.saas.fluent.models.AccessTokenResultInner;
+import com.azure.resourcemanager.saas.models.AccessTokenResult;
+
+public final class AccessTokenResultImpl implements AccessTokenResult {
+ private AccessTokenResultInner innerObject;
+
+ private final com.azure.resourcemanager.saas.SaaSManager serviceManager;
+
+ AccessTokenResultImpl(
+ AccessTokenResultInner innerObject, com.azure.resourcemanager.saas.SaaSManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String publisherOfferBaseUri() {
+ return this.innerModel().publisherOfferBaseUri();
+ }
+
+ public String token() {
+ return this.innerModel().token();
+ }
+
+ public AccessTokenResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.saas.SaaSManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/ApplicationsClientImpl.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/ApplicationsClientImpl.java
new file mode 100644
index 0000000000000..6d50c2b781333
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/ApplicationsClientImpl.java
@@ -0,0 +1,317 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.saas.fluent.ApplicationsClient;
+import com.azure.resourcemanager.saas.fluent.models.SaasAppInner;
+import com.azure.resourcemanager.saas.models.SaasAppResponseWithContinuation;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ApplicationsClient. */
+public final class ApplicationsClientImpl implements ApplicationsClient {
+ private final ClientLogger logger = new ClientLogger(ApplicationsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final ApplicationsService service;
+
+ /** The service client containing this operation class. */
+ private final SaaSManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ApplicationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ApplicationsClientImpl(SaaSManagementClientImpl client) {
+ this.service =
+ RestProxy.create(ApplicationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for SaaSManagementClientApplications to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "SaaSManagementClient")
+ private interface ApplicationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SaaS/applications")
+ @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("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets all SaaS resources by subscription id and resource group name.
+ *
+ * @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 SaaS resources by subscription id and resource group name.
+ */
+ @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 SaaS resources by subscription id and resource group name.
+ *
+ * @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 SaaS resources by subscription id and resource group name.
+ */
+ @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 SaaS resources by subscription id and resource group name.
+ *
+ * @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 SaaS resources by subscription id and resource group name.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all SaaS resources by subscription id and resource group name.
+ *
+ * @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 SaaS resources by subscription id and resource group name.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets all SaaS resources by subscription id and resource group name.
+ *
+ * @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 SaaS resources by subscription id and resource group name.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Gets all SaaS resources by subscription id and resource group name.
+ *
+ * @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 SaaS resources by subscription id and resource group name.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return saas app response with continuation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return saas app response with continuation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/ApplicationsImpl.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/ApplicationsImpl.java
new file mode 100644
index 0000000000000..6cf2526170e46
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/ApplicationsImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.saas.fluent.ApplicationsClient;
+import com.azure.resourcemanager.saas.fluent.models.SaasAppInner;
+import com.azure.resourcemanager.saas.models.Applications;
+import com.azure.resourcemanager.saas.models.SaasApp;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class ApplicationsImpl implements Applications {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationsImpl.class);
+
+ private final ApplicationsClient innerClient;
+
+ private final com.azure.resourcemanager.saas.SaaSManager serviceManager;
+
+ public ApplicationsImpl(ApplicationsClient innerClient, com.azure.resourcemanager.saas.SaaSManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new SaasAppImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new SaasAppImpl(inner1, this.manager()));
+ }
+
+ private ApplicationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.saas.SaaSManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/OperationsClientImpl.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/OperationsClientImpl.java
new file mode 100644
index 0000000000000..8595132cfed87
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/OperationsClientImpl.java
@@ -0,0 +1,269 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.saas.fluent.OperationsClient;
+import com.azure.resourcemanager.saas.fluent.models.SaasAppOperationInner;
+import com.azure.resourcemanager.saas.models.SaasAppOperationsResponseWithContinuation;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public final class OperationsClientImpl implements OperationsClient {
+ private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final OperationsService service;
+
+ /** The service client containing this operation class. */
+ private final SaaSManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(SaaSManagementClientImpl client) {
+ this.service =
+ RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for SaaSManagementClientOperations to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "SaaSManagementClient")
+ private interface OperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.SaaS/operations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets all SaaS app operations.
+ *
+ * @throws 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 SaaS app operations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets all SaaS app operations.
+ *
+ * @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 SaaS app operations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets all SaaS app operations.
+ *
+ * @throws 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 SaaS app operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all SaaS app operations.
+ *
+ * @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 SaaS app operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets all SaaS app operations.
+ *
+ * @throws 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 SaaS app operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Gets all SaaS app operations.
+ *
+ * @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 SaaS app operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return saas app operation response with continuation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return saas app operation response with continuation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/OperationsImpl.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/OperationsImpl.java
new file mode 100644
index 0000000000000..ff6d6d57676a4
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/OperationsImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.saas.fluent.OperationsClient;
+import com.azure.resourcemanager.saas.fluent.models.SaasAppOperationInner;
+import com.azure.resourcemanager.saas.models.Operations;
+import com.azure.resourcemanager.saas.models.SaasAppOperation;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class OperationsImpl implements Operations {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class);
+
+ private final OperationsClient innerClient;
+
+ private final com.azure.resourcemanager.saas.SaaSManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.saas.SaaSManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new SaasAppOperationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new SaasAppOperationImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.saas.SaaSManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/ResourceProvidersClientImpl.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/ResourceProvidersClientImpl.java
new file mode 100644
index 0000000000000..38cd3029e839c
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/ResourceProvidersClientImpl.java
@@ -0,0 +1,184 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.saas.fluent.ResourceProvidersClient;
+import com.azure.resourcemanager.saas.fluent.models.AccessTokenResultInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
+public final class ResourceProvidersClientImpl implements ResourceProvidersClient {
+ private final ClientLogger logger = new ClientLogger(ResourceProvidersClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final ResourceProvidersService service;
+
+ /** The service client containing this operation class. */
+ private final SaaSManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ResourceProvidersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ResourceProvidersClientImpl(SaaSManagementClientImpl client) {
+ this.service =
+ RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for SaaSManagementClientResourceProviders to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "SaaSManagementClient")
+ private interface ResourceProvidersService {
+ @Headers({"Content-Type: application/json"})
+ @Post("/providers/Microsoft.SaaS/saasresources/{resourceId}/listAccessToken")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> saasResourceListAccessToken(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceId") String resourceId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets the ISV access token for a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the ISV access token for a SaaS resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> saasResourceListAccessTokenWithResponseAsync(String resourceId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .saasResourceListAccessToken(
+ this.client.getEndpoint(), resourceId, this.client.getApiVersion(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the ISV access token for a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @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 ISV access token for a SaaS resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> saasResourceListAccessTokenWithResponseAsync(
+ String resourceId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .saasResourceListAccessToken(
+ this.client.getEndpoint(), resourceId, this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * Gets the ISV access token for a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the ISV access token for a SaaS resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono saasResourceListAccessTokenAsync(String resourceId) {
+ return saasResourceListAccessTokenWithResponseAsync(resourceId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the ISV access token for a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the ISV access token for a SaaS resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AccessTokenResultInner saasResourceListAccessToken(String resourceId) {
+ return saasResourceListAccessTokenAsync(resourceId).block();
+ }
+
+ /**
+ * Gets the ISV access token for a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @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 ISV access token for a SaaS resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response saasResourceListAccessTokenWithResponse(
+ String resourceId, Context context) {
+ return saasResourceListAccessTokenWithResponseAsync(resourceId, context).block();
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/ResourceProvidersImpl.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/ResourceProvidersImpl.java
new file mode 100644
index 0000000000000..14ccc897d3bb0
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/ResourceProvidersImpl.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.saas.fluent.ResourceProvidersClient;
+import com.azure.resourcemanager.saas.fluent.models.AccessTokenResultInner;
+import com.azure.resourcemanager.saas.models.AccessTokenResult;
+import com.azure.resourcemanager.saas.models.ResourceProviders;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class ResourceProvidersImpl implements ResourceProviders {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProvidersImpl.class);
+
+ private final ResourceProvidersClient innerClient;
+
+ private final com.azure.resourcemanager.saas.SaaSManager serviceManager;
+
+ public ResourceProvidersImpl(
+ ResourceProvidersClient innerClient, com.azure.resourcemanager.saas.SaaSManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public AccessTokenResult saasResourceListAccessToken(String resourceId) {
+ AccessTokenResultInner inner = this.serviceClient().saasResourceListAccessToken(resourceId);
+ if (inner != null) {
+ return new AccessTokenResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response saasResourceListAccessTokenWithResponse(String resourceId, Context context) {
+ Response inner =
+ this.serviceClient().saasResourceListAccessTokenWithResponse(resourceId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AccessTokenResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private ResourceProvidersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.saas.SaaSManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/SaaSClientImpl.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/SaaSClientImpl.java
new file mode 100644
index 0000000000000..970f05455c4f0
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/SaaSClientImpl.java
@@ -0,0 +1,868 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.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.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.saas.fluent.SaaSClient;
+import com.azure.resourcemanager.saas.fluent.models.SaasResourceInner;
+import com.azure.resourcemanager.saas.models.DeleteOptions;
+import com.azure.resourcemanager.saas.models.SaasResourceCreation;
+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 SaaSClient. */
+public final class SaaSClientImpl implements SaaSClient {
+ private final ClientLogger logger = new ClientLogger(SaaSClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final SaaSService service;
+
+ /** The service client containing this operation class. */
+ private final SaaSManagementClientImpl client;
+
+ /**
+ * Initializes an instance of SaaSClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ SaaSClientImpl(SaaSManagementClientImpl client) {
+ this.service = RestProxy.create(SaaSService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for SaaSManagementClientSaaS to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "SaaSManagementClient")
+ private interface SaaSService {
+ @Headers({"Content-Type: application/json"})
+ @Delete("/providers/Microsoft.SaaS/saasresources/{resourceId}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceId") String resourceId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") DeleteOptions parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.SaaS/saasresources/{resourceId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getResource(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceId") String resourceId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch("/providers/Microsoft.SaaS/saasresources/{resourceId}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> updateResource(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceId") String resourceId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") SaasResourceCreation parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put("/providers/Microsoft.SaaS/saasresources")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createResource(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") SaasResourceCreation parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceId, DeleteOptions parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ resourceId,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceId, DeleteOptions parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(this.client.getEndpoint(), resourceId, this.client.getApiVersion(), parameters, accept, context);
+ }
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceId, DeleteOptions parameters) {
+ Mono>> mono = deleteWithResponseAsync(resourceId, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceId, DeleteOptions parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceId, parameters, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceId, DeleteOptions parameters) {
+ return beginDeleteAsync(resourceId, parameters).getSyncPoller();
+ }
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceId, DeleteOptions parameters, Context context) {
+ return beginDeleteAsync(resourceId, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceId, DeleteOptions parameters) {
+ return beginDeleteAsync(resourceId, parameters).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceId, DeleteOptions parameters, Context context) {
+ return beginDeleteAsync(resourceId, parameters, context).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas 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 resourceId, DeleteOptions parameters) {
+ deleteAsync(resourceId, parameters).block();
+ }
+
+ /**
+ * Deletes the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to delete saas operation.
+ * @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 resourceId, DeleteOptions parameters, Context context) {
+ deleteAsync(resourceId, parameters, context).block();
+ }
+
+ /**
+ * Gets information about the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about the specified SaaS.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getResourceWithResponseAsync(String resourceId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getResource(
+ this.client.getEndpoint(), resourceId, this.client.getApiVersion(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets information about the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @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 information about the specified SaaS.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getResourceWithResponseAsync(String resourceId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getResource(this.client.getEndpoint(), resourceId, this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * Gets information about the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about the specified SaaS.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getResourceAsync(String resourceId) {
+ return getResourceWithResponseAsync(resourceId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets information about the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about the specified SaaS.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SaasResourceInner getResource(String resourceId) {
+ return getResourceAsync(resourceId).block();
+ }
+
+ /**
+ * Gets information about the specified SaaS.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @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 information about the specified SaaS.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getResourceWithResponse(String resourceId, Context context) {
+ return getResourceWithResponseAsync(resourceId, context).block();
+ }
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateResourceWithResponseAsync(
+ String resourceId, SaasResourceCreation parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .updateResource(
+ this.client.getEndpoint(),
+ resourceId,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateResourceWithResponseAsync(
+ String resourceId, SaasResourceCreation parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .updateResource(
+ this.client.getEndpoint(), resourceId, this.client.getApiVersion(), parameters, accept, context);
+ }
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, SaasResourceInner> beginUpdateResourceAsync(
+ String resourceId, SaasResourceCreation parameters) {
+ Mono>> mono = updateResourceWithResponseAsync(resourceId, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ SaasResourceInner.class,
+ SaasResourceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, SaasResourceInner> beginUpdateResourceAsync(
+ String resourceId, SaasResourceCreation parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = updateResourceWithResponseAsync(resourceId, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), SaasResourceInner.class, SaasResourceInner.class, context);
+ }
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, SaasResourceInner> beginUpdateResource(
+ String resourceId, SaasResourceCreation parameters) {
+ return beginUpdateResourceAsync(resourceId, parameters).getSyncPoller();
+ }
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, SaasResourceInner> beginUpdateResource(
+ String resourceId, SaasResourceCreation parameters, Context context) {
+ return beginUpdateResourceAsync(resourceId, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateResourceAsync(String resourceId, SaasResourceCreation parameters) {
+ return beginUpdateResourceAsync(resourceId, parameters).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateResourceAsync(
+ String resourceId, SaasResourceCreation parameters, Context context) {
+ return beginUpdateResourceAsync(resourceId, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SaasResourceInner updateResource(String resourceId, SaasResourceCreation parameters) {
+ return updateResourceAsync(resourceId, parameters).block();
+ }
+
+ /**
+ * Updates a SaaS resource.
+ *
+ * @param resourceId The Saas resource ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param parameters Parameters supplied to the update saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SaasResourceInner updateResource(String resourceId, SaasResourceCreation parameters, Context context) {
+ return updateResourceAsync(resourceId, parameters, context).block();
+ }
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createResourceWithResponseAsync(SaasResourceCreation parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createResource(
+ this.client.getEndpoint(), this.client.getApiVersion(), parameters, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createResourceWithResponseAsync(
+ SaasResourceCreation parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createResource(this.client.getEndpoint(), this.client.getApiVersion(), parameters, accept, context);
+ }
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, SaasResourceInner> beginCreateResourceAsync(
+ SaasResourceCreation parameters) {
+ Mono>> mono = createResourceWithResponseAsync(parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ SaasResourceInner.class,
+ SaasResourceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, SaasResourceInner> beginCreateResourceAsync(
+ SaasResourceCreation parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = createResourceWithResponseAsync(parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), SaasResourceInner.class, SaasResourceInner.class, context);
+ }
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, SaasResourceInner> beginCreateResource(
+ SaasResourceCreation parameters) {
+ return beginCreateResourceAsync(parameters).getSyncPoller();
+ }
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, SaasResourceInner> beginCreateResource(
+ SaasResourceCreation parameters, Context context) {
+ return beginCreateResourceAsync(parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createResourceAsync(SaasResourceCreation parameters) {
+ return beginCreateResourceAsync(parameters).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createResourceAsync(SaasResourceCreation parameters, Context context) {
+ return beginCreateResourceAsync(parameters, context).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas 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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SaasResourceInner createResource(SaasResourceCreation parameters) {
+ return createResourceAsync(parameters).block();
+ }
+
+ /**
+ * Creates a SaaS resource.
+ *
+ * @param parameters Parameters supplied to the create saas operation.
+ * @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 saaS REST API resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SaasResourceInner createResource(SaasResourceCreation parameters, Context context) {
+ return createResourceAsync(parameters, context).block();
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/SaaSImpl.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/SaaSImpl.java
new file mode 100644
index 0000000000000..93a0894f5d8f0
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/SaaSImpl.java
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.saas.fluent.SaaSClient;
+import com.azure.resourcemanager.saas.fluent.models.SaasResourceInner;
+import com.azure.resourcemanager.saas.models.DeleteOptions;
+import com.azure.resourcemanager.saas.models.SaaS;
+import com.azure.resourcemanager.saas.models.SaasResource;
+import com.azure.resourcemanager.saas.models.SaasResourceCreation;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class SaaSImpl implements SaaS {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SaaSImpl.class);
+
+ private final SaaSClient innerClient;
+
+ private final com.azure.resourcemanager.saas.SaaSManager serviceManager;
+
+ public SaaSImpl(SaaSClient innerClient, com.azure.resourcemanager.saas.SaaSManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public void delete(String resourceId, DeleteOptions parameters) {
+ this.serviceClient().delete(resourceId, parameters);
+ }
+
+ public void delete(String resourceId, DeleteOptions parameters, Context context) {
+ this.serviceClient().delete(resourceId, parameters, context);
+ }
+
+ public SaasResource getResource(String resourceId) {
+ SaasResourceInner inner = this.serviceClient().getResource(resourceId);
+ if (inner != null) {
+ return new SaasResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getResourceWithResponse(String resourceId, Context context) {
+ Response inner = this.serviceClient().getResourceWithResponse(resourceId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new SaasResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public SaasResource updateResource(String resourceId, SaasResourceCreation parameters) {
+ SaasResourceInner inner = this.serviceClient().updateResource(resourceId, parameters);
+ if (inner != null) {
+ return new SaasResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public SaasResource updateResource(String resourceId, SaasResourceCreation parameters, Context context) {
+ SaasResourceInner inner = this.serviceClient().updateResource(resourceId, parameters, context);
+ if (inner != null) {
+ return new SaasResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public SaasResource createResource(SaasResourceCreation parameters) {
+ SaasResourceInner inner = this.serviceClient().createResource(parameters);
+ if (inner != null) {
+ return new SaasResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public SaasResource createResource(SaasResourceCreation parameters, Context context) {
+ SaasResourceInner inner = this.serviceClient().createResource(parameters, context);
+ if (inner != null) {
+ return new SaasResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private SaaSClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.saas.SaaSManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/SaaSManagementClientBuilder.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/SaaSManagementClientBuilder.java
new file mode 100644
index 0000000000000..e8cae11c1a2d3
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/SaaSManagementClientBuilder.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.saas.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 SaaSManagementClientImpl type. */
+@ServiceClientBuilder(serviceClients = {SaaSManagementClientImpl.class})
+public final class SaaSManagementClientBuilder {
+ /*
+ * 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 SaaSManagementClientBuilder.
+ */
+ public SaaSManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the SaaSManagementClientBuilder.
+ */
+ public SaaSManagementClientBuilder 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 SaaSManagementClientBuilder.
+ */
+ public SaaSManagementClientBuilder 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 SaaSManagementClientBuilder.
+ */
+ public SaaSManagementClientBuilder 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 SaaSManagementClientBuilder.
+ */
+ public SaaSManagementClientBuilder 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 SaaSManagementClientBuilder.
+ */
+ public SaaSManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of SaaSManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of SaaSManagementClientImpl.
+ */
+ public SaaSManagementClientImpl 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();
+ }
+ SaaSManagementClientImpl client =
+ new SaaSManagementClientImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/SaaSManagementClientImpl.java b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/SaaSManagementClientImpl.java
new file mode 100644
index 0000000000000..bb49f9c3d13c7
--- /dev/null
+++ b/sdk/saas/azure-resourcemanager-saas/src/main/java/com/azure/resourcemanager/saas/implementation/SaaSManagementClientImpl.java
@@ -0,0 +1,378 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.saas.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.saas.fluent.ApplicationsClient;
+import com.azure.resourcemanager.saas.fluent.OperationsClient;
+import com.azure.resourcemanager.saas.fluent.ResourceProvidersClient;
+import com.azure.resourcemanager.saas.fluent.SaaSClient;
+import com.azure.resourcemanager.saas.fluent.SaaSManagementClient;
+import com.azure.resourcemanager.saas.fluent.SaaSOperationsClient;
+import com.azure.resourcemanager.saas.fluent.SaasResourcesClient;
+import com.azure.resourcemanager.saas.fluent.SaasSubscriptionLevelsClient;
+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 SaaSManagementClientImpl type. */
+@ServiceClient(builder = SaaSManagementClientBuilder.class)
+public final class SaaSManagementClientImpl implements SaaSManagementClient {
+ private final ClientLogger logger = new ClientLogger(SaaSManagementClientImpl.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 ApplicationsClient object to access its operations. */
+ private final ApplicationsClient applications;
+
+ /**
+ * Gets the ApplicationsClient object to access its operations.
+ *
+ * @return the ApplicationsClient object.
+ */
+ public ApplicationsClient getApplications() {
+ return this.applications;
+ }
+
+ /** The SaaSClient object to access its operations. */
+ private final SaaSClient saaS;
+
+ /**
+ * Gets the SaaSClient object to access its operations.
+ *
+ * @return the SaaSClient object.
+ */
+ public SaaSClient getSaaS() {
+ return this.saaS;
+ }
+
+ /** The SaasResourcesClient object to access its operations. */
+ private final SaasResourcesClient saasResources;
+
+ /**
+ * Gets the SaasResourcesClient object to access its operations.
+ *
+ * @return the SaasResourcesClient object.
+ */
+ public SaasResourcesClient getSaasResources() {
+ return this.saasResources;
+ }
+
+ /** The ResourceProvidersClient object to access its operations. */
+ private final ResourceProvidersClient resourceProviders;
+
+ /**
+ * Gets the ResourceProvidersClient object to access its operations.
+ *
+ * @return the ResourceProvidersClient object.
+ */
+ public ResourceProvidersClient getResourceProviders() {
+ return this.resourceProviders;
+ }
+
+ /** The SaasSubscriptionLevelsClient object to access its operations. */
+ private final SaasSubscriptionLevelsClient saasSubscriptionLevels;
+
+ /**
+ * Gets the SaasSubscriptionLevelsClient object to access its operations.
+ *
+ * @return the SaasSubscriptionLevelsClient object.
+ */
+ public SaasSubscriptionLevelsClient getSaasSubscriptionLevels() {
+ return this.saasSubscriptionLevels;
+ }
+
+ /** The SaaSOperationsClient object to access its operations. */
+ private final SaaSOperationsClient saaSOperations;
+
+ /**
+ * Gets the SaaSOperationsClient object to access its operations.
+ *
+ * @return the SaaSOperationsClient object.
+ */
+ public SaaSOperationsClient getSaaSOperations() {
+ return this.saaSOperations;
+ }
+
+ /**
+ * Initializes an instance of SaaSManagementClient 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.
+ */
+ SaaSManagementClientImpl(
+ 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-03-01-beta";
+ this.operations = new OperationsClientImpl(this);
+ this.applications = new ApplicationsClientImpl(this);
+ this.saaS = new SaaSClientImpl(this);
+ this.saasResources = new SaasResourcesClientImpl(this);
+ this.resourceProviders = new ResourceProvidersClientImpl(this);
+ this.saasSubscriptionLevels = new SaasSubscriptionLevelsClientImpl(this);
+ this.saaSOperations = new SaaSOperationsClientImpl(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