diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 3c22cd94e7bb..c9b3a65baece 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -320,6 +320,7 @@ com.azure.resourcemanager:azure-resourcemanager-quota;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-extendedlocation;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-logz;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-storagepool;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-portal;1.0.0-beta.1;1.0.0-beta.1
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
# version. Unreleased dependencies are only valid for dependency versions.
diff --git a/pom.xml b/pom.xml
index c48350b9b837..dce198d8b2b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -800,6 +800,7 @@
sdk/operationsmanagement
sdk/peering
sdk/policyinsights
+ sdk/portal
sdk/postgresql
sdk/postgresqlflexibleserver
sdk/powerbidedicated
diff --git a/sdk/portal/azure-resourcemanager-portal/CHANGELOG.md b/sdk/portal/azure-resourcemanager-portal/CHANGELOG.md
new file mode 100644
index 000000000000..7f68a301750b
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-10-18)
+
+- Azure Resource Manager Portal client library for Java. This package contains Microsoft Azure SDK for Portal Management SDK. Allows creation and deletion of Azure Shared Dashboards. Package tag package-2020-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/portal/azure-resourcemanager-portal/README.md b/sdk/portal/azure-resourcemanager-portal/README.md
new file mode 100644
index 000000000000..33b14b002001
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/README.md
@@ -0,0 +1,102 @@
+# Azure Resource Manager Portal client library for Java
+
+Azure Resource Manager Portal client library for Java.
+
+This package contains Microsoft Azure SDK for Portal Management SDK. Allows creation and deletion of Azure Shared Dashboards. Package tag package-2020-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## We'd love to hear your feedback
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-portal;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-portal
+ 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();
+PortalManager manager = PortalManager
+ .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/portal/azure-resourcemanager-portal/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/portal/azure-resourcemanager-portal/SAMPLE.md b/sdk/portal/azure-resourcemanager-portal/SAMPLE.md
new file mode 100644
index 000000000000..c7a53911be05
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/SAMPLE.md
@@ -0,0 +1,362 @@
+# Code snippets and samples
+
+
+## Dashboards
+
+- [CreateOrUpdate](#dashboards_createorupdate)
+- [Delete](#dashboards_delete)
+- [GetByResourceGroup](#dashboards_getbyresourcegroup)
+- [List](#dashboards_list)
+- [ListByResourceGroup](#dashboards_listbyresourcegroup)
+- [Update](#dashboards_update)
+
+## ListTenantConfigurationViolations
+
+- [List](#listtenantconfigurationviolations_list)
+
+## Operations
+
+- [List](#operations_list)
+
+## TenantConfigurations
+
+- [Create](#tenantconfigurations_create)
+- [Delete](#tenantconfigurations_delete)
+- [Get](#tenantconfigurations_get)
+- [List](#tenantconfigurations_list)
+### Dashboards_CreateOrUpdate
+
+```java
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.portal.models.DashboardLens;
+import com.azure.resourcemanager.portal.models.DashboardParts;
+import com.azure.resourcemanager.portal.models.DashboardPartsPosition;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Dashboards CreateOrUpdate. */
+public final class DashboardsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/portal/resource-manager/Microsoft.Portal/preview/2020-09-01-preview/examples/createOrUpdateDashboard.json
+ */
+ /**
+ * Sample code: Create or update a Dashboard.
+ *
+ * @param manager Entry point to PortalManager.
+ */
+ public static void createOrUpdateADashboard(com.azure.resourcemanager.portal.PortalManager manager)
+ throws IOException {
+ manager
+ .dashboards()
+ .define("testDashboard")
+ .withRegion("eastus")
+ .withExistingResourceGroup("testRG")
+ .withTags(mapOf("aKey", "aValue", "anotherKey", "anotherValue"))
+ .withLenses(
+ Arrays
+ .asList(
+ new DashboardLens()
+ .withOrder(1)
+ .withParts(
+ Arrays
+ .asList(
+ new DashboardParts()
+ .withPosition(
+ new DashboardPartsPosition()
+ .withX(1)
+ .withY(2)
+ .withRowSpan(4)
+ .withColSpan(3)),
+ new DashboardParts()
+ .withPosition(
+ new DashboardPartsPosition()
+ .withX(5)
+ .withY(5)
+ .withRowSpan(6)
+ .withColSpan(6)))),
+ new DashboardLens().withOrder(2).withParts(Arrays.asList())))
+ .withMetadata(
+ mapOf(
+ "metadata",
+ SerializerFactory
+ .createDefaultManagementSerializerAdapter()
+ .deserialize(
+ "{\"ColSpan\":2,\"RowSpan\":1,\"X\":4,\"Y\":3}", Object.class, SerializerEncoding.JSON)))
+ .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;
+ }
+}
+```
+
+### Dashboards_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Dashboards Delete. */
+public final class DashboardsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/portal/resource-manager/Microsoft.Portal/preview/2020-09-01-preview/examples/deleteDashboard.json
+ */
+ /**
+ * Sample code: Delete a Dashboard.
+ *
+ * @param manager Entry point to PortalManager.
+ */
+ public static void deleteADashboard(com.azure.resourcemanager.portal.PortalManager manager) {
+ manager.dashboards().deleteWithResponse("testRG", "testDashboard", Context.NONE);
+ }
+}
+```
+
+### Dashboards_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Dashboards GetByResourceGroup. */
+public final class DashboardsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/portal/resource-manager/Microsoft.Portal/preview/2020-09-01-preview/examples/getDashboard.json
+ */
+ /**
+ * Sample code: Get a Dashboard.
+ *
+ * @param manager Entry point to PortalManager.
+ */
+ public static void getADashboard(com.azure.resourcemanager.portal.PortalManager manager) {
+ manager.dashboards().getByResourceGroupWithResponse("testRG", "testDashboard", Context.NONE);
+ }
+}
+```
+
+### Dashboards_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Dashboards List. */
+public final class DashboardsListSamples {
+ /*
+ * x-ms-original-file: specification/portal/resource-manager/Microsoft.Portal/preview/2020-09-01-preview/examples/listDashboardsBySubscription.json
+ */
+ /**
+ * Sample code: List all custom resource providers on the subscription.
+ *
+ * @param manager Entry point to PortalManager.
+ */
+ public static void listAllCustomResourceProvidersOnTheSubscription(
+ com.azure.resourcemanager.portal.PortalManager manager) {
+ manager.dashboards().list(Context.NONE);
+ }
+}
+```
+
+### Dashboards_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Dashboards ListByResourceGroup. */
+public final class DashboardsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/portal/resource-manager/Microsoft.Portal/preview/2020-09-01-preview/examples/listDashboardsByResourceGroup.json
+ */
+ /**
+ * Sample code: List all custom resource providers on the resourceGroup.
+ *
+ * @param manager Entry point to PortalManager.
+ */
+ public static void listAllCustomResourceProvidersOnTheResourceGroup(
+ com.azure.resourcemanager.portal.PortalManager manager) {
+ manager.dashboards().listByResourceGroup("testRG", Context.NONE);
+ }
+}
+```
+
+### Dashboards_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.portal.models.Dashboard;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Dashboards Update. */
+public final class DashboardsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/portal/resource-manager/Microsoft.Portal/preview/2020-09-01-preview/examples/updateDashboard.json
+ */
+ /**
+ * Sample code: Update a Dashboard.
+ *
+ * @param manager Entry point to PortalManager.
+ */
+ public static void updateADashboard(com.azure.resourcemanager.portal.PortalManager manager) {
+ Dashboard resource =
+ manager.dashboards().getByResourceGroupWithResponse("testRG", "testDashboard", Context.NONE).getValue();
+ resource.update().withTags(mapOf("aKey", "bValue", "anotherKey", "anotherValue2")).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;
+ }
+}
+```
+
+### ListTenantConfigurationViolations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ListTenantConfigurationViolations List. */
+public final class ListTenantConfigurationViolationsListSamples {
+ /*
+ * x-ms-original-file: specification/portal/resource-manager/Microsoft.Portal/preview/2020-09-01-preview/examples/TenantConfiguration/GetListOfTenantConfigurationViolations.json
+ */
+ /**
+ * Sample code: Get list of of items that violate tenant's configuration.
+ *
+ * @param manager Entry point to PortalManager.
+ */
+ public static void getListOfOfItemsThatViolateTenantSConfiguration(
+ com.azure.resourcemanager.portal.PortalManager manager) {
+ manager.listTenantConfigurationViolations().list(Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/portal/resource-manager/Microsoft.Portal/preview/2020-09-01-preview/examples/operationsList.json
+ */
+ /**
+ * Sample code: List the portal operations.
+ *
+ * @param manager Entry point to PortalManager.
+ */
+ public static void listThePortalOperations(com.azure.resourcemanager.portal.PortalManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### TenantConfigurations_Create
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.portal.fluent.models.ConfigurationInner;
+import com.azure.resourcemanager.portal.models.ConfigurationName;
+
+/** Samples for TenantConfigurations Create. */
+public final class TenantConfigurationsCreateSamples {
+ /*
+ * x-ms-original-file: specification/portal/resource-manager/Microsoft.Portal/preview/2020-09-01-preview/examples/TenantConfiguration/CreateOrUpdateTenantConfiguration.json
+ */
+ /**
+ * Sample code: Create or update Tenant configuration.
+ *
+ * @param manager Entry point to PortalManager.
+ */
+ public static void createOrUpdateTenantConfiguration(com.azure.resourcemanager.portal.PortalManager manager) {
+ manager
+ .tenantConfigurations()
+ .createWithResponse(
+ ConfigurationName.DEFAULT,
+ new ConfigurationInner().withEnforcePrivateMarkdownStorage(true),
+ Context.NONE);
+ }
+}
+```
+
+### TenantConfigurations_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.portal.models.ConfigurationName;
+
+/** Samples for TenantConfigurations Delete. */
+public final class TenantConfigurationsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/portal/resource-manager/Microsoft.Portal/preview/2020-09-01-preview/examples/TenantConfiguration/DeleteTenantConfiguration.json
+ */
+ /**
+ * Sample code: Delete Tenant configuration.
+ *
+ * @param manager Entry point to PortalManager.
+ */
+ public static void deleteTenantConfiguration(com.azure.resourcemanager.portal.PortalManager manager) {
+ manager.tenantConfigurations().deleteWithResponse(ConfigurationName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### TenantConfigurations_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.portal.models.ConfigurationName;
+
+/** Samples for TenantConfigurations Get. */
+public final class TenantConfigurationsGetSamples {
+ /*
+ * x-ms-original-file: specification/portal/resource-manager/Microsoft.Portal/preview/2020-09-01-preview/examples/TenantConfiguration/GetTenantConfiguration.json
+ */
+ /**
+ * Sample code: Get Tenant configuration.
+ *
+ * @param manager Entry point to PortalManager.
+ */
+ public static void getTenantConfiguration(com.azure.resourcemanager.portal.PortalManager manager) {
+ manager.tenantConfigurations().getWithResponse(ConfigurationName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### TenantConfigurations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for TenantConfigurations List. */
+public final class TenantConfigurationsListSamples {
+ /*
+ * x-ms-original-file: specification/portal/resource-manager/Microsoft.Portal/preview/2020-09-01-preview/examples/TenantConfiguration/GetListOfTenantConfigurations.json
+ */
+ /**
+ * Sample code: Get list of Tenant configurations.
+ *
+ * @param manager Entry point to PortalManager.
+ */
+ public static void getListOfTenantConfigurations(com.azure.resourcemanager.portal.PortalManager manager) {
+ manager.tenantConfigurations().list(Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/portal/azure-resourcemanager-portal/pom.xml b/sdk/portal/azure-resourcemanager-portal/pom.xml
new file mode 100644
index 000000000000..0b1cada03494
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/pom.xml
@@ -0,0 +1,86 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-portal
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for Portal Management
+ This package contains Microsoft Azure SDK for Portal Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Allows creation and deletion of Azure Shared Dashboards. Package tag package-2020-09-01-preview.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core
+ 1.21.0
+
+
+ com.azure
+ azure-core-management
+ 1.4.2
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.7
+
+ true
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
+
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/PortalManager.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/PortalManager.java
new file mode 100644
index 000000000000..dd85c6c9534e
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/PortalManager.java
@@ -0,0 +1,264 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.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.portal.fluent.Portal;
+import com.azure.resourcemanager.portal.implementation.DashboardsImpl;
+import com.azure.resourcemanager.portal.implementation.ListTenantConfigurationViolationsImpl;
+import com.azure.resourcemanager.portal.implementation.OperationsImpl;
+import com.azure.resourcemanager.portal.implementation.PortalBuilder;
+import com.azure.resourcemanager.portal.implementation.TenantConfigurationsImpl;
+import com.azure.resourcemanager.portal.models.Dashboards;
+import com.azure.resourcemanager.portal.models.ListTenantConfigurationViolations;
+import com.azure.resourcemanager.portal.models.Operations;
+import com.azure.resourcemanager.portal.models.TenantConfigurations;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Entry point to PortalManager. Allows creation and deletion of Azure Shared Dashboards. */
+public final class PortalManager {
+ private Operations operations;
+
+ private Dashboards dashboards;
+
+ private TenantConfigurations tenantConfigurations;
+
+ private ListTenantConfigurationViolations listTenantConfigurationViolations;
+
+ private final Portal clientObject;
+
+ private PortalManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new PortalBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of Portal service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Portal service API instance.
+ */
+ public static PortalManager 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 PortalManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new PortalManager.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 Portal service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Portal service API instance.
+ */
+ public PortalManager 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.portal")
+ .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());
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.addAll(this.policies);
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new PortalManager(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 Dashboards. */
+ public Dashboards dashboards() {
+ if (this.dashboards == null) {
+ this.dashboards = new DashboardsImpl(clientObject.getDashboards(), this);
+ }
+ return dashboards;
+ }
+
+ /** @return Resource collection API of TenantConfigurations. */
+ public TenantConfigurations tenantConfigurations() {
+ if (this.tenantConfigurations == null) {
+ this.tenantConfigurations = new TenantConfigurationsImpl(clientObject.getTenantConfigurations(), this);
+ }
+ return tenantConfigurations;
+ }
+
+ /** @return Resource collection API of ListTenantConfigurationViolations. */
+ public ListTenantConfigurationViolations listTenantConfigurationViolations() {
+ if (this.listTenantConfigurationViolations == null) {
+ this.listTenantConfigurationViolations =
+ new ListTenantConfigurationViolationsImpl(clientObject.getListTenantConfigurationViolations(), this);
+ }
+ return listTenantConfigurationViolations;
+ }
+
+ /**
+ * @return Wrapped service client Portal providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public Portal serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/DashboardsClient.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/DashboardsClient.java
new file mode 100644
index 000000000000..5ad8e20e0d41
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/DashboardsClient.java
@@ -0,0 +1,177 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.portal.fluent.models.DashboardInner;
+import com.azure.resourcemanager.portal.models.PatchableDashboard;
+
+/** An instance of this class provides access to all the operations defined in DashboardsClient. */
+public interface DashboardsClient {
+ /**
+ * Creates or updates a Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The parameters required to create or update a dashboard.
+ * @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 shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DashboardInner createOrUpdate(String resourceGroupName, String dashboardName, DashboardInner dashboard);
+
+ /**
+ * Creates or updates a Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The parameters required to create or update a dashboard.
+ * @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 shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName, String dashboardName, DashboardInner dashboard, Context context);
+
+ /**
+ * Deletes the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @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 dashboardName);
+
+ /**
+ * Deletes the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String dashboardName, Context context);
+
+ /**
+ * Gets the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @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 Dashboard.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DashboardInner getByResourceGroup(String resourceGroupName, String dashboardName);
+
+ /**
+ * Gets the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @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 Dashboard.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String dashboardName, Context context);
+
+ /**
+ * Updates an existing Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The updatable fields of a Dashboard.
+ * @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 shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DashboardInner update(String resourceGroupName, String dashboardName, PatchableDashboard dashboard);
+
+ /**
+ * Updates an existing Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The updatable fields of a Dashboard.
+ * @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 shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String dashboardName, PatchableDashboard dashboard, Context context);
+
+ /**
+ * Gets all the Dashboards within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Dashboards within a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Gets all the Dashboards within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Dashboards within a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Gets all the dashboards within a subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the dashboards within a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets all the dashboards within a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the dashboards within a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/ListTenantConfigurationViolationsClient.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/ListTenantConfigurationViolationsClient.java
new file mode 100644
index 000000000000..611dd1768c28
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/ListTenantConfigurationViolationsClient.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.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.portal.fluent.models.ViolationInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in ListTenantConfigurationViolationsClient.
+ */
+public interface ListTenantConfigurationViolationsClient {
+ /**
+ * Gets list of items that violate tenant's configuration.
+ *
+ * @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 list of items that violate tenant's configuration.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets list of items that violate tenant's configuration.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of items that violate tenant's configuration.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/OperationsClient.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/OperationsClient.java
new file mode 100644
index 000000000000..ecd6b61d6a95
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/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.portal.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.portal.fluent.models.ResourceProviderOperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * The Microsoft Portal operations API.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return results of the request to list operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * The Microsoft Portal operations API.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return results of the request to list operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/Portal.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/Portal.java
new file mode 100644
index 000000000000..c9721117fc46
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/Portal.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for Portal class. */
+public interface Portal {
+ /**
+ * 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 DashboardsClient object to access its operations.
+ *
+ * @return the DashboardsClient object.
+ */
+ DashboardsClient getDashboards();
+
+ /**
+ * Gets the TenantConfigurationsClient object to access its operations.
+ *
+ * @return the TenantConfigurationsClient object.
+ */
+ TenantConfigurationsClient getTenantConfigurations();
+
+ /**
+ * Gets the ListTenantConfigurationViolationsClient object to access its operations.
+ *
+ * @return the ListTenantConfigurationViolationsClient object.
+ */
+ ListTenantConfigurationViolationsClient getListTenantConfigurationViolations();
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/TenantConfigurationsClient.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/TenantConfigurationsClient.java
new file mode 100644
index 000000000000..4100e690097d
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/TenantConfigurationsClient.java
@@ -0,0 +1,117 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.portal.fluent.models.ConfigurationInner;
+import com.azure.resourcemanager.portal.models.ConfigurationName;
+
+/** An instance of this class provides access to all the operations defined in TenantConfigurationsClient. */
+public interface TenantConfigurationsClient {
+ /**
+ * Gets list of the tenant configurations.
+ *
+ * @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 list of the tenant configurations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets list of the tenant configurations.
+ *
+ * @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 list of the tenant configurations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Gets the tenant configuration.
+ *
+ * @param configurationName The configuration name. Value must be 'default'.
+ * @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 tenant configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationInner get(ConfigurationName configurationName);
+
+ /**
+ * Gets the tenant configuration.
+ *
+ * @param configurationName The configuration name. Value must be 'default'.
+ * @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 tenant configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(ConfigurationName configurationName, Context context);
+
+ /**
+ * Create the tenant configuration. If configuration already exists - update it. User has to be a Tenant Admin for
+ * this operation.
+ *
+ * @param configurationName The configuration name. Value must be 'default'.
+ * @param tenantConfiguration The parameters required to create or update tenant configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return tenant configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationInner create(ConfigurationName configurationName, ConfigurationInner tenantConfiguration);
+
+ /**
+ * Create the tenant configuration. If configuration already exists - update it. User has to be a Tenant Admin for
+ * this operation.
+ *
+ * @param configurationName The configuration name. Value must be 'default'.
+ * @param tenantConfiguration The parameters required to create or update tenant configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return tenant configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createWithResponse(
+ ConfigurationName configurationName, ConfigurationInner tenantConfiguration, Context context);
+
+ /**
+ * Delete the tenant configuration. User has to be a Tenant Admin for this operation.
+ *
+ * @param configurationName The configuration name. Value must be 'default'.
+ * @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(ConfigurationName configurationName);
+
+ /**
+ * Delete the tenant configuration. User has to be a Tenant Admin for this operation.
+ *
+ * @param configurationName The configuration name. Value must be 'default'.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(ConfigurationName configurationName, Context context);
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/ConfigurationInner.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/ConfigurationInner.java
new file mode 100644
index 000000000000..bce5b006ed26
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/ConfigurationInner.java
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Tenant configuration. */
+@Fluent
+public final class ConfigurationInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationInner.class);
+
+ /*
+ * Tenant configuration properties.
+ */
+ @JsonProperty(value = "properties")
+ private ConfigurationProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: Tenant configuration properties.
+ *
+ * @return the innerProperties value.
+ */
+ private ConfigurationProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the enforcePrivateMarkdownStorage property: When flag is set to true Markdown tile will require external
+ * storage configuration (URI). The inline content configuration will be prohibited.
+ *
+ * @return the enforcePrivateMarkdownStorage value.
+ */
+ public Boolean enforcePrivateMarkdownStorage() {
+ return this.innerProperties() == null ? null : this.innerProperties().enforcePrivateMarkdownStorage();
+ }
+
+ /**
+ * Set the enforcePrivateMarkdownStorage property: When flag is set to true Markdown tile will require external
+ * storage configuration (URI). The inline content configuration will be prohibited.
+ *
+ * @param enforcePrivateMarkdownStorage the enforcePrivateMarkdownStorage value to set.
+ * @return the ConfigurationInner object itself.
+ */
+ public ConfigurationInner withEnforcePrivateMarkdownStorage(Boolean enforcePrivateMarkdownStorage) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ConfigurationProperties();
+ }
+ this.innerProperties().withEnforcePrivateMarkdownStorage(enforcePrivateMarkdownStorage);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/ConfigurationProperties.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/ConfigurationProperties.java
new file mode 100644
index 000000000000..f8a5e1885047
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/ConfigurationProperties.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.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;
+
+/** Tenant configuration properties. */
+@Fluent
+public final class ConfigurationProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationProperties.class);
+
+ /*
+ * When flag is set to true Markdown tile will require external storage
+ * configuration (URI). The inline content configuration will be
+ * prohibited.
+ */
+ @JsonProperty(value = "enforcePrivateMarkdownStorage")
+ private Boolean enforcePrivateMarkdownStorage;
+
+ /**
+ * Get the enforcePrivateMarkdownStorage property: When flag is set to true Markdown tile will require external
+ * storage configuration (URI). The inline content configuration will be prohibited.
+ *
+ * @return the enforcePrivateMarkdownStorage value.
+ */
+ public Boolean enforcePrivateMarkdownStorage() {
+ return this.enforcePrivateMarkdownStorage;
+ }
+
+ /**
+ * Set the enforcePrivateMarkdownStorage property: When flag is set to true Markdown tile will require external
+ * storage configuration (URI). The inline content configuration will be prohibited.
+ *
+ * @param enforcePrivateMarkdownStorage the enforcePrivateMarkdownStorage value to set.
+ * @return the ConfigurationProperties object itself.
+ */
+ public ConfigurationProperties withEnforcePrivateMarkdownStorage(Boolean enforcePrivateMarkdownStorage) {
+ this.enforcePrivateMarkdownStorage = enforcePrivateMarkdownStorage;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/DashboardInner.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/DashboardInner.java
new file mode 100644
index 000000000000..a822e83ca6e6
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/DashboardInner.java
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.portal.models.DashboardLens;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** The shared dashboard resource definition. */
+@Fluent
+public final class DashboardInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DashboardInner.class);
+
+ /*
+ * The shared dashboard properties.
+ */
+ @JsonProperty(value = "properties")
+ private DashboardProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: The shared dashboard properties.
+ *
+ * @return the innerProperties value.
+ */
+ private DashboardProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public DashboardInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public DashboardInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the lenses property: The dashboard lenses.
+ *
+ * @return the lenses value.
+ */
+ public List lenses() {
+ return this.innerProperties() == null ? null : this.innerProperties().lenses();
+ }
+
+ /**
+ * Set the lenses property: The dashboard lenses.
+ *
+ * @param lenses the lenses value to set.
+ * @return the DashboardInner object itself.
+ */
+ public DashboardInner withLenses(List lenses) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DashboardProperties();
+ }
+ this.innerProperties().withLenses(lenses);
+ return this;
+ }
+
+ /**
+ * Get the metadata property: The dashboard metadata.
+ *
+ * @return the metadata value.
+ */
+ public Map metadata() {
+ return this.innerProperties() == null ? null : this.innerProperties().metadata();
+ }
+
+ /**
+ * Set the metadata property: The dashboard metadata.
+ *
+ * @param metadata the metadata value to set.
+ * @return the DashboardInner object itself.
+ */
+ public DashboardInner withMetadata(Map metadata) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DashboardProperties();
+ }
+ this.innerProperties().withMetadata(metadata);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/DashboardProperties.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/DashboardProperties.java
new file mode 100644
index 000000000000..9c80031c118e
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/DashboardProperties.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.portal.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.portal.models.DashboardLens;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** The shared dashboard properties. */
+@Fluent
+public final class DashboardProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DashboardProperties.class);
+
+ /*
+ * The dashboard lenses.
+ */
+ @JsonProperty(value = "lenses")
+ private List lenses;
+
+ /*
+ * The dashboard metadata.
+ */
+ @JsonProperty(value = "metadata")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map metadata;
+
+ /**
+ * Get the lenses property: The dashboard lenses.
+ *
+ * @return the lenses value.
+ */
+ public List lenses() {
+ return this.lenses;
+ }
+
+ /**
+ * Set the lenses property: The dashboard lenses.
+ *
+ * @param lenses the lenses value to set.
+ * @return the DashboardProperties object itself.
+ */
+ public DashboardProperties withLenses(List lenses) {
+ this.lenses = lenses;
+ return this;
+ }
+
+ /**
+ * Get the metadata property: The dashboard metadata.
+ *
+ * @return the metadata value.
+ */
+ public Map metadata() {
+ return this.metadata;
+ }
+
+ /**
+ * Set the metadata property: The dashboard metadata.
+ *
+ * @param metadata the metadata value to set.
+ * @return the DashboardProperties object itself.
+ */
+ public DashboardProperties withMetadata(Map metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (lenses() != null) {
+ lenses().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/ResourceProviderOperationInner.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/ResourceProviderOperationInner.java
new file mode 100644
index 000000000000..a49babe71109
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/ResourceProviderOperationInner.java
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.portal.models.ResourceProviderOperationDisplay;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Supported operations of this resource provider. */
+@Fluent
+public final class ResourceProviderOperationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProviderOperationInner.class);
+
+ /*
+ * Operation name, in format of {provider}/{resource}/{operation}
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Indicates whether the operation applies to data-plane.
+ */
+ @JsonProperty(value = "isDataAction")
+ private String isDataAction;
+
+ /*
+ * Display metadata associated with the operation.
+ */
+ @JsonProperty(value = "display")
+ private ResourceProviderOperationDisplay display;
+
+ /**
+ * Get the name property: Operation name, in format of {provider}/{resource}/{operation}.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Operation name, in format of {provider}/{resource}/{operation}.
+ *
+ * @param name the name value to set.
+ * @return the ResourceProviderOperationInner object itself.
+ */
+ public ResourceProviderOperationInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the isDataAction property: Indicates whether the operation applies to data-plane.
+ *
+ * @return the isDataAction value.
+ */
+ public String isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Set the isDataAction property: Indicates whether the operation applies to data-plane.
+ *
+ * @param isDataAction the isDataAction value to set.
+ * @return the ResourceProviderOperationInner object itself.
+ */
+ public ResourceProviderOperationInner withIsDataAction(String isDataAction) {
+ this.isDataAction = isDataAction;
+ return this;
+ }
+
+ /**
+ * Get the display property: Display metadata associated with the operation.
+ *
+ * @return the display value.
+ */
+ public ResourceProviderOperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Display metadata associated with the operation.
+ *
+ * @param display the display value to set.
+ * @return the ResourceProviderOperationInner object itself.
+ */
+ public ResourceProviderOperationInner withDisplay(ResourceProviderOperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/ViolationInner.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/ViolationInner.java
new file mode 100644
index 000000000000..b0b248fd765c
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/ViolationInner.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Violation information. */
+@Immutable
+public final class ViolationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ViolationInner.class);
+
+ /*
+ * Id of the item that violates tenant configuration.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * Id of the user who owns violated item.
+ */
+ @JsonProperty(value = "userId", access = JsonProperty.Access.WRITE_ONLY)
+ private String userId;
+
+ /*
+ * Error message.
+ */
+ @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY)
+ private String errorMessage;
+
+ /**
+ * Get the id property: Id of the item that violates tenant configuration.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the userId property: Id of the user who owns violated item.
+ *
+ * @return the userId value.
+ */
+ public String userId() {
+ return this.userId;
+ }
+
+ /**
+ * Get the errorMessage property: Error message.
+ *
+ * @return the errorMessage value.
+ */
+ public String errorMessage() {
+ return this.errorMessage;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/package-info.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/models/package-info.java
new file mode 100644
index 000000000000..168e03466d5e
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/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 Portal. Allows creation and deletion of Azure Shared Dashboards. */
+package com.azure.resourcemanager.portal.fluent.models;
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/package-info.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/fluent/package-info.java
new file mode 100644
index 000000000000..6fe57382cadd
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/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 Portal. Allows creation and deletion of Azure Shared Dashboards. */
+package com.azure.resourcemanager.portal.fluent;
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/ConfigurationImpl.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/ConfigurationImpl.java
new file mode 100644
index 000000000000..1d6bc125a36e
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/ConfigurationImpl.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.implementation;
+
+import com.azure.resourcemanager.portal.fluent.models.ConfigurationInner;
+import com.azure.resourcemanager.portal.models.Configuration;
+
+public final class ConfigurationImpl implements Configuration {
+ private ConfigurationInner innerObject;
+
+ private final com.azure.resourcemanager.portal.PortalManager serviceManager;
+
+ ConfigurationImpl(ConfigurationInner innerObject, com.azure.resourcemanager.portal.PortalManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public Boolean enforcePrivateMarkdownStorage() {
+ return this.innerModel().enforcePrivateMarkdownStorage();
+ }
+
+ public ConfigurationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.portal.PortalManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/DashboardImpl.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/DashboardImpl.java
new file mode 100644
index 000000000000..843e26447fe2
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/DashboardImpl.java
@@ -0,0 +1,213 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.portal.fluent.models.DashboardInner;
+import com.azure.resourcemanager.portal.models.Dashboard;
+import com.azure.resourcemanager.portal.models.DashboardLens;
+import com.azure.resourcemanager.portal.models.PatchableDashboard;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class DashboardImpl implements Dashboard, Dashboard.Definition, Dashboard.Update {
+ private DashboardInner innerObject;
+
+ private final com.azure.resourcemanager.portal.PortalManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public List lenses() {
+ List inner = this.innerModel().lenses();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Map metadata() {
+ Map inner = this.innerModel().metadata();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public DashboardInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.portal.PortalManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String dashboardName;
+
+ private PatchableDashboard updateDashboard;
+
+ public DashboardImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Dashboard create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDashboards()
+ .createOrUpdateWithResponse(resourceGroupName, dashboardName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Dashboard create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDashboards()
+ .createOrUpdateWithResponse(resourceGroupName, dashboardName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ DashboardImpl(String name, com.azure.resourcemanager.portal.PortalManager serviceManager) {
+ this.innerObject = new DashboardInner();
+ this.serviceManager = serviceManager;
+ this.dashboardName = name;
+ }
+
+ public DashboardImpl update() {
+ this.updateDashboard = new PatchableDashboard();
+ return this;
+ }
+
+ public Dashboard apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDashboards()
+ .updateWithResponse(resourceGroupName, dashboardName, updateDashboard, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Dashboard apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDashboards()
+ .updateWithResponse(resourceGroupName, dashboardName, updateDashboard, context)
+ .getValue();
+ return this;
+ }
+
+ DashboardImpl(DashboardInner innerObject, com.azure.resourcemanager.portal.PortalManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.dashboardName = Utils.getValueFromIdByName(innerObject.id(), "dashboards");
+ }
+
+ public Dashboard refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDashboards()
+ .getByResourceGroupWithResponse(resourceGroupName, dashboardName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Dashboard refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDashboards()
+ .getByResourceGroupWithResponse(resourceGroupName, dashboardName, context)
+ .getValue();
+ return this;
+ }
+
+ public DashboardImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public DashboardImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public DashboardImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateDashboard.withTags(tags);
+ return this;
+ }
+ }
+
+ public DashboardImpl withLenses(List lenses) {
+ if (isInCreateMode()) {
+ this.innerModel().withLenses(lenses);
+ return this;
+ } else {
+ this.updateDashboard.withLenses(lenses);
+ return this;
+ }
+ }
+
+ public DashboardImpl withMetadata(Map metadata) {
+ if (isInCreateMode()) {
+ this.innerModel().withMetadata(metadata);
+ return this;
+ } else {
+ this.updateDashboard.withMetadata(metadata);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/DashboardsClientImpl.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/DashboardsClientImpl.java
new file mode 100644
index 000000000000..08e86000dccf
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/DashboardsClientImpl.java
@@ -0,0 +1,1243 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.portal.fluent.DashboardsClient;
+import com.azure.resourcemanager.portal.fluent.models.DashboardInner;
+import com.azure.resourcemanager.portal.models.DashboardListResult;
+import com.azure.resourcemanager.portal.models.PatchableDashboard;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in DashboardsClient. */
+public final class DashboardsClientImpl implements DashboardsClient {
+ private final ClientLogger logger = new ClientLogger(DashboardsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final DashboardsService service;
+
+ /** The service client containing this operation class. */
+ private final PortalImpl client;
+
+ /**
+ * Initializes an instance of DashboardsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DashboardsClientImpl(PortalImpl client) {
+ this.service =
+ RestProxy.create(DashboardsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PortalDashboards to be used by the proxy service to perform REST
+ * calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PortalDashboards")
+ private interface DashboardsService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards"
+ + "/{dashboardName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dashboardName") String dashboardName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") DashboardInner dashboard,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards"
+ + "/{dashboardName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dashboardName") String dashboardName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards"
+ + "/{dashboardName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dashboardName") String dashboardName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards"
+ + "/{dashboardName}")
+ @ExpectedResponses({200, 404})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dashboardName") String dashboardName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") PatchableDashboard dashboard,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Portal/dashboards")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Creates or updates a Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The parameters required to create or update a dashboard.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String dashboardName, DashboardInner dashboard) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dashboardName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dashboardName is required and cannot be null."));
+ }
+ if (dashboard == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dashboard is required and cannot be null."));
+ } else {
+ dashboard.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dashboardName,
+ this.client.getApiVersion(),
+ dashboard,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates a Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The parameters required to create or update a dashboard.
+ * @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 shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String dashboardName, DashboardInner dashboard, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dashboardName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dashboardName is required and cannot be null."));
+ }
+ if (dashboard == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dashboard is required and cannot be null."));
+ } else {
+ dashboard.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dashboardName,
+ this.client.getApiVersion(),
+ dashboard,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates or updates a Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The parameters required to create or update a dashboard.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String dashboardName, DashboardInner dashboard) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, dashboardName, dashboard)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Creates or updates a Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The parameters required to create or update a dashboard.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DashboardInner createOrUpdate(String resourceGroupName, String dashboardName, DashboardInner dashboard) {
+ return createOrUpdateAsync(resourceGroupName, dashboardName, dashboard).block();
+ }
+
+ /**
+ * Creates or updates a Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The parameters required to create or update a dashboard.
+ * @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 shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName, String dashboardName, DashboardInner dashboard, Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, dashboardName, dashboard, context).block();
+ }
+
+ /**
+ * Deletes the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 resourceGroupName, String dashboardName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dashboardName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dashboardName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dashboardName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @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 resourceGroupName, String dashboardName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dashboardName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dashboardName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dashboardName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 resourceGroupName, String dashboardName) {
+ return deleteWithResponseAsync(resourceGroupName, dashboardName).flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Deletes the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String dashboardName) {
+ deleteAsync(resourceGroupName, dashboardName).block();
+ }
+
+ /**
+ * Deletes the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String dashboardName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, dashboardName, context).block();
+ }
+
+ /**
+ * Gets the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Dashboard.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String dashboardName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dashboardName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dashboardName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dashboardName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @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 Dashboard.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String dashboardName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dashboardName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dashboardName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dashboardName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Dashboard.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String dashboardName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, dashboardName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Dashboard.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DashboardInner getByResourceGroup(String resourceGroupName, String dashboardName) {
+ return getByResourceGroupAsync(resourceGroupName, dashboardName).block();
+ }
+
+ /**
+ * Gets the Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @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 Dashboard.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String dashboardName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, dashboardName, context).block();
+ }
+
+ /**
+ * Updates an existing Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The updatable fields of a Dashboard.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String dashboardName, PatchableDashboard dashboard) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dashboardName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dashboardName is required and cannot be null."));
+ }
+ if (dashboard == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dashboard is required and cannot be null."));
+ } else {
+ dashboard.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dashboardName,
+ this.client.getApiVersion(),
+ dashboard,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates an existing Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The updatable fields of a Dashboard.
+ * @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 shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String dashboardName, PatchableDashboard dashboard, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dashboardName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dashboardName is required and cannot be null."));
+ }
+ if (dashboard == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dashboard is required and cannot be null."));
+ } else {
+ dashboard.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dashboardName,
+ this.client.getApiVersion(),
+ dashboard,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates an existing Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The updatable fields of a Dashboard.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String dashboardName, PatchableDashboard dashboard) {
+ return updateWithResponseAsync(resourceGroupName, dashboardName, dashboard)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Updates an existing Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The updatable fields of a Dashboard.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DashboardInner update(String resourceGroupName, String dashboardName, PatchableDashboard dashboard) {
+ return updateAsync(resourceGroupName, dashboardName, dashboard).block();
+ }
+
+ /**
+ * Updates an existing Dashboard.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param dashboardName The name of the dashboard.
+ * @param dashboard The updatable fields of a Dashboard.
+ * @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 shared dashboard resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName, String dashboardName, PatchableDashboard dashboard, Context context) {
+ return updateWithResponseAsync(resourceGroupName, dashboardName, dashboard, context).block();
+ }
+
+ /**
+ * Gets all the Dashboards within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Dashboards within a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets all the Dashboards within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Dashboards within a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets all the Dashboards within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Dashboards within a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all the Dashboards within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Dashboards within a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets all the Dashboards within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Dashboards within a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Gets all the Dashboards within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Dashboards within a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Gets all the dashboards within a subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the dashboards within a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets all the dashboards within a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the dashboards within a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets all the dashboards within a subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the dashboards within a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all the dashboards within a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the dashboards within a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets all the dashboards within a subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the dashboards within a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Gets all the dashboards within a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the dashboards within a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of dashboards.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of dashboards.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of dashboards.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of dashboards.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/DashboardsImpl.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/DashboardsImpl.java
new file mode 100644
index 000000000000..80e4aa2ea844
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/DashboardsImpl.java
@@ -0,0 +1,169 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.portal.fluent.DashboardsClient;
+import com.azure.resourcemanager.portal.fluent.models.DashboardInner;
+import com.azure.resourcemanager.portal.models.Dashboard;
+import com.azure.resourcemanager.portal.models.Dashboards;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class DashboardsImpl implements Dashboards {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DashboardsImpl.class);
+
+ private final DashboardsClient innerClient;
+
+ private final com.azure.resourcemanager.portal.PortalManager serviceManager;
+
+ public DashboardsImpl(DashboardsClient innerClient, com.azure.resourcemanager.portal.PortalManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String dashboardName) {
+ this.serviceClient().delete(resourceGroupName, dashboardName);
+ }
+
+ public Response deleteWithResponse(String resourceGroupName, String dashboardName, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, dashboardName, context);
+ }
+
+ public Dashboard getByResourceGroup(String resourceGroupName, String dashboardName) {
+ DashboardInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, dashboardName);
+ if (inner != null) {
+ return new DashboardImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String dashboardName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, dashboardName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new DashboardImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new DashboardImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new DashboardImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new DashboardImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new DashboardImpl(inner1, this.manager()));
+ }
+
+ public Dashboard getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String dashboardName = Utils.getValueFromIdByName(id, "dashboards");
+ if (dashboardName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'dashboards'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, dashboardName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String dashboardName = Utils.getValueFromIdByName(id, "dashboards");
+ if (dashboardName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'dashboards'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, dashboardName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String dashboardName = Utils.getValueFromIdByName(id, "dashboards");
+ if (dashboardName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'dashboards'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, dashboardName, Context.NONE).getValue();
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String dashboardName = Utils.getValueFromIdByName(id, "dashboards");
+ if (dashboardName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'dashboards'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, dashboardName, context);
+ }
+
+ private DashboardsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.portal.PortalManager manager() {
+ return this.serviceManager;
+ }
+
+ public DashboardImpl define(String name) {
+ return new DashboardImpl(name, this.manager());
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/ListTenantConfigurationViolationsClientImpl.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/ListTenantConfigurationViolationsClientImpl.java
new file mode 100644
index 000000000000..7d1a42475a7f
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/ListTenantConfigurationViolationsClientImpl.java
@@ -0,0 +1,276 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.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.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.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.portal.fluent.ListTenantConfigurationViolationsClient;
+import com.azure.resourcemanager.portal.fluent.models.ViolationInner;
+import com.azure.resourcemanager.portal.models.ViolationsList;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in ListTenantConfigurationViolationsClient.
+ */
+public final class ListTenantConfigurationViolationsClientImpl implements ListTenantConfigurationViolationsClient {
+ private final ClientLogger logger = new ClientLogger(ListTenantConfigurationViolationsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final ListTenantConfigurationViolationsService service;
+
+ /** The service client containing this operation class. */
+ private final PortalImpl client;
+
+ /**
+ * Initializes an instance of ListTenantConfigurationViolationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ListTenantConfigurationViolationsClientImpl(PortalImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ ListTenantConfigurationViolationsService.class,
+ client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PortalListTenantConfigurationViolations to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PortalListTenantConf")
+ private interface ListTenantConfigurationViolationsService {
+ @Headers({"Content-Type: application/json"})
+ @Post("/providers/Microsoft.Portal/listTenantConfigurationViolations")
+ @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 list of items that violate tenant's configuration.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of items that violate tenant's configuration.
+ */
+ @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 list of items that violate tenant's configuration.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of items that violate tenant's configuration.
+ */
+ @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 list of items that violate tenant's configuration.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of items that violate tenant's configuration.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets list of items that violate tenant's configuration.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of items that violate tenant's configuration.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets list of items that violate tenant's configuration.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of items that violate tenant's configuration.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Gets list of items that violate tenant's configuration.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of items that violate tenant's configuration.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of list of items that violate tenant's configuration.
+ */
+ @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 list of list of items that violate tenant's configuration.
+ */
+ @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/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/ListTenantConfigurationViolationsImpl.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/ListTenantConfigurationViolationsImpl.java
new file mode 100644
index 000000000000..d71b11d45d93
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/ListTenantConfigurationViolationsImpl.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.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.portal.fluent.ListTenantConfigurationViolationsClient;
+import com.azure.resourcemanager.portal.fluent.models.ViolationInner;
+import com.azure.resourcemanager.portal.models.ListTenantConfigurationViolations;
+import com.azure.resourcemanager.portal.models.Violation;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class ListTenantConfigurationViolationsImpl implements ListTenantConfigurationViolations {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ListTenantConfigurationViolationsImpl.class);
+
+ private final ListTenantConfigurationViolationsClient innerClient;
+
+ private final com.azure.resourcemanager.portal.PortalManager serviceManager;
+
+ public ListTenantConfigurationViolationsImpl(
+ ListTenantConfigurationViolationsClient innerClient,
+ com.azure.resourcemanager.portal.PortalManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new ViolationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new ViolationImpl(inner1, this.manager()));
+ }
+
+ private ListTenantConfigurationViolationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.portal.PortalManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/OperationsClientImpl.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..c1c6f70a045b
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/OperationsClientImpl.java
@@ -0,0 +1,270 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.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.portal.fluent.OperationsClient;
+import com.azure.resourcemanager.portal.fluent.models.ResourceProviderOperationInner;
+import com.azure.resourcemanager.portal.models.ResourceProviderOperationList;
+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 PortalImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(PortalImpl client) {
+ this.service =
+ RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PortalOperations to be used by the proxy service to perform REST
+ * calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PortalOperations")
+ private interface OperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.Portal/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);
+ }
+
+ /**
+ * The Microsoft Portal operations API.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return results of the request to list operations.
+ */
+ @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()));
+ }
+
+ /**
+ * The Microsoft Portal operations API.
+ *
+ * @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 results of the request to list 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));
+ }
+
+ /**
+ * The Microsoft Portal operations API.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return results of the request to list operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * The Microsoft Portal operations API.
+ *
+ * @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 results of the request to list operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * The Microsoft Portal operations API.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return results of the request to list operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * The Microsoft Portal operations API.
+ *
+ * @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 results of the request to list 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 results of the request to list operations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .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 results of the request to list operations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/OperationsImpl.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..7868c1f20433
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/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.portal.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.portal.fluent.OperationsClient;
+import com.azure.resourcemanager.portal.fluent.models.ResourceProviderOperationInner;
+import com.azure.resourcemanager.portal.models.Operations;
+import com.azure.resourcemanager.portal.models.ResourceProviderOperation;
+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.portal.PortalManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.portal.PortalManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new ResourceProviderOperationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new ResourceProviderOperationImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.portal.PortalManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/PortalBuilder.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/PortalBuilder.java
new file mode 100644
index 000000000000..ea019e4598c0
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/PortalBuilder.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.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 PortalImpl type. */
+@ServiceClientBuilder(serviceClients = {PortalImpl.class})
+public final class PortalBuilder {
+ /*
+ * 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 PortalBuilder.
+ */
+ public PortalBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the PortalBuilder.
+ */
+ public PortalBuilder 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 PortalBuilder.
+ */
+ public PortalBuilder 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 PortalBuilder.
+ */
+ public PortalBuilder 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 PortalBuilder.
+ */
+ public PortalBuilder 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 PortalBuilder.
+ */
+ public PortalBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of PortalImpl with the provided parameters.
+ *
+ * @return an instance of PortalImpl.
+ */
+ public PortalImpl 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();
+ }
+ PortalImpl client =
+ new PortalImpl(pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/PortalImpl.java b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/PortalImpl.java
new file mode 100644
index 000000000000..6268aae8cc9f
--- /dev/null
+++ b/sdk/portal/azure-resourcemanager-portal/src/main/java/com/azure/resourcemanager/portal/implementation/PortalImpl.java
@@ -0,0 +1,336 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.portal.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.portal.fluent.DashboardsClient;
+import com.azure.resourcemanager.portal.fluent.ListTenantConfigurationViolationsClient;
+import com.azure.resourcemanager.portal.fluent.OperationsClient;
+import com.azure.resourcemanager.portal.fluent.Portal;
+import com.azure.resourcemanager.portal.fluent.TenantConfigurationsClient;
+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 PortalImpl type. */
+@ServiceClient(builder = PortalBuilder.class)
+public final class PortalImpl implements Portal {
+ private final ClientLogger logger = new ClientLogger(PortalImpl.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 DashboardsClient object to access its operations. */
+ private final DashboardsClient dashboards;
+
+ /**
+ * Gets the DashboardsClient object to access its operations.
+ *
+ * @return the DashboardsClient object.
+ */
+ public DashboardsClient getDashboards() {
+ return this.dashboards;
+ }
+
+ /** The TenantConfigurationsClient object to access its operations. */
+ private final TenantConfigurationsClient tenantConfigurations;
+
+ /**
+ * Gets the TenantConfigurationsClient object to access its operations.
+ *
+ * @return the TenantConfigurationsClient object.
+ */
+ public TenantConfigurationsClient getTenantConfigurations() {
+ return this.tenantConfigurations;
+ }
+
+ /** The ListTenantConfigurationViolationsClient object to access its operations. */
+ private final ListTenantConfigurationViolationsClient listTenantConfigurationViolations;
+
+ /**
+ * Gets the ListTenantConfigurationViolationsClient object to access its operations.
+ *
+ * @return the ListTenantConfigurationViolationsClient object.
+ */
+ public ListTenantConfigurationViolationsClient getListTenantConfigurationViolations() {
+ return this.listTenantConfigurationViolations;
+ }
+
+ /**
+ * Initializes an instance of Portal 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.
+ */
+ PortalImpl(
+ 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 = "2020-09-01-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.dashboards = new DashboardsClientImpl(this);
+ this.tenantConfigurations = new TenantConfigurationsClientImpl(this);
+ this.listTenantConfigurationViolations = new ListTenantConfigurationViolationsClientImpl(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