diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index e42edd7cb05b..d779e6056c08 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -339,6 +339,7 @@ com.azure.resourcemanager:azure-resourcemanager-dashboard;1.0.0-beta.1;1.0.0-bet
com.azure.resourcemanager:azure-resourcemanager-servicelinker;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-appcontainers;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-scvmm;1.0.0-beta.1;1.0.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-msi-generated;1.0.0-beta.1;1.0.0-beta.1
com.azure.tools:azure-sdk-archetype;1.0.0;1.0.0
com.azure.tools:azure-sdk-build-tool;1.0.0-beta.1;1.0.0-beta.2
diff --git a/pom.xml b/pom.xml
index 7415453218e7..40cab2f06a0f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -931,6 +931,7 @@
sdk/mobilenetworksdk/modelsrepositorysdk/monitor
+ sdk/msisdk/mysqlsdk/mysqlflexibleserversdk/netapp
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/CHANGELOG.md b/sdk/msi/azure-resourcemanager-msi-generated/CHANGELOG.md
new file mode 100644
index 000000000000..80a32ecae65d
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2022-04-29)
+
+- Azure Resource Manager ManagedServiceIdentity client library for Java. This package contains Microsoft Azure SDK for ManagedServiceIdentity Management SDK. The Managed Service Identity Client. Package tag package-preview-2021-09-30. 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/msi/azure-resourcemanager-msi-generated/README.md b/sdk/msi/azure-resourcemanager-msi-generated/README.md
new file mode 100644
index 000000000000..f407e0ebd0b5
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/README.md
@@ -0,0 +1,102 @@
+# Azure Resource Manager ManagedServiceIdentity client library for Java
+
+Azure Resource Manager ManagedServiceIdentity client library for Java.
+
+This package contains Microsoft Azure SDK for ManagedServiceIdentity Management SDK. The Managed Service Identity Client. Package tag package-preview-2021-09-30. 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-msi-generated;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-msi-generated
+ 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();
+ManagedServiceIdentityManager manager = ManagedServiceIdentityManager
+ .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/msi/azure-resourcemanager-msi-generated/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/msi/azure-resourcemanager-msi-generated/SAMPLE.md b/sdk/msi/azure-resourcemanager-msi-generated/SAMPLE.md
new file mode 100644
index 000000000000..7cebbad1dfed
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/SAMPLE.md
@@ -0,0 +1,254 @@
+# Code snippets and samples
+
+
+## Operations
+
+- [List](#operations_list)
+
+## SystemAssignedIdentities
+
+- [GetByScope](#systemassignedidentities_getbyscope)
+
+## UserAssignedIdentities
+
+- [CreateOrUpdate](#userassignedidentities_createorupdate)
+- [Delete](#userassignedidentities_delete)
+- [GetByResourceGroup](#userassignedidentities_getbyresourcegroup)
+- [List](#userassignedidentities_list)
+- [ListAssociatedResources](#userassignedidentities_listassociatedresources)
+- [ListByResourceGroup](#userassignedidentities_listbyresourcegroup)
+- [Update](#userassignedidentities_update)
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2021-09-30-preview/examples/MsiOperationsList.json
+ */
+ /**
+ * Sample code: MsiOperationsList.
+ *
+ * @param manager Entry point to ManagedServiceIdentityManager.
+ */
+ public static void msiOperationsList(
+ com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### SystemAssignedIdentities_GetByScope
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SystemAssignedIdentities GetByScope. */
+public final class SystemAssignedIdentitiesGetByScopeSamples {
+ /*
+ * x-ms-original-file: specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2021-09-30-preview/examples/SystemAssignedIdentityGet.json
+ */
+ /**
+ * Sample code: MsiOperationsList.
+ *
+ * @param manager Entry point to ManagedServiceIdentityManager.
+ */
+ public static void msiOperationsList(
+ com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager manager) {
+ manager.systemAssignedIdentities().getByScopeWithResponse("scope", Context.NONE);
+ }
+}
+```
+
+### UserAssignedIdentities_CreateOrUpdate
+
+```java
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for UserAssignedIdentities CreateOrUpdate. */
+public final class UserAssignedIdentitiesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2021-09-30-preview/examples/IdentityCreate.json
+ */
+ /**
+ * Sample code: IdentityCreate.
+ *
+ * @param manager Entry point to ManagedServiceIdentityManager.
+ */
+ public static void identityCreate(com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager manager) {
+ manager
+ .userAssignedIdentities()
+ .define("resourceName")
+ .withRegion("eastus")
+ .withExistingResourceGroup("rgName")
+ .withTags(mapOf("key1", "value1", "key2", "value2"))
+ .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;
+ }
+}
+```
+
+### UserAssignedIdentities_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for UserAssignedIdentities Delete. */
+public final class UserAssignedIdentitiesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2021-09-30-preview/examples/IdentityDelete.json
+ */
+ /**
+ * Sample code: IdentityDelete.
+ *
+ * @param manager Entry point to ManagedServiceIdentityManager.
+ */
+ public static void identityDelete(com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager manager) {
+ manager.userAssignedIdentities().deleteWithResponse("rgName", "resourceName", Context.NONE);
+ }
+}
+```
+
+### UserAssignedIdentities_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for UserAssignedIdentities GetByResourceGroup. */
+public final class UserAssignedIdentitiesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2021-09-30-preview/examples/IdentityGet.json
+ */
+ /**
+ * Sample code: IdentityGet.
+ *
+ * @param manager Entry point to ManagedServiceIdentityManager.
+ */
+ public static void identityGet(com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager manager) {
+ manager.userAssignedIdentities().getByResourceGroupWithResponse("rgName", "resourceName", Context.NONE);
+ }
+}
+```
+
+### UserAssignedIdentities_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for UserAssignedIdentities List. */
+public final class UserAssignedIdentitiesListSamples {
+ /*
+ * x-ms-original-file: specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2021-09-30-preview/examples/IdentityListBySubscription.json
+ */
+ /**
+ * Sample code: IdentityListBySubscription.
+ *
+ * @param manager Entry point to ManagedServiceIdentityManager.
+ */
+ public static void identityListBySubscription(
+ com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager manager) {
+ manager.userAssignedIdentities().list(Context.NONE);
+ }
+}
+```
+
+### UserAssignedIdentities_ListAssociatedResources
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for UserAssignedIdentities ListAssociatedResources. */
+public final class UserAssignedIdentitiesListAssociatedResourcesSamples {
+ /*
+ * x-ms-original-file: specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2021-09-30-preview/examples/IdentityListAssociatedResources.json
+ */
+ /**
+ * Sample code: IdentityListAssociatedResources.
+ *
+ * @param manager Entry point to ManagedServiceIdentityManager.
+ */
+ public static void identityListAssociatedResources(
+ com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager manager) {
+ manager
+ .userAssignedIdentities()
+ .listAssociatedResources(
+ "testrg", "testid", "contains(name, 'test')", "name asc", 10, 1, null, Context.NONE);
+ }
+}
+```
+
+### UserAssignedIdentities_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for UserAssignedIdentities ListByResourceGroup. */
+public final class UserAssignedIdentitiesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2021-09-30-preview/examples/IdentityListByResourceGroup.json
+ */
+ /**
+ * Sample code: IdentityListByResourceGroup.
+ *
+ * @param manager Entry point to ManagedServiceIdentityManager.
+ */
+ public static void identityListByResourceGroup(
+ com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager manager) {
+ manager.userAssignedIdentities().listByResourceGroup("rgName", Context.NONE);
+ }
+}
+```
+
+### UserAssignedIdentities_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.msi.generated.models.Identity;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for UserAssignedIdentities Update. */
+public final class UserAssignedIdentitiesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2021-09-30-preview/examples/IdentityUpdate.json
+ */
+ /**
+ * Sample code: IdentityUpdate.
+ *
+ * @param manager Entry point to ManagedServiceIdentityManager.
+ */
+ public static void identityUpdate(com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager manager) {
+ Identity resource =
+ manager
+ .userAssignedIdentities()
+ .getByResourceGroupWithResponse("rgName", "resourceName", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("key1", "value1", "key2", "value2")).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;
+ }
+}
+```
+
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/pom.xml b/sdk/msi/azure-resourcemanager-msi-generated/pom.xml
new file mode 100644
index 000000000000..1cef2b4e2762
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/pom.xml
@@ -0,0 +1,55 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-msi-generated
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for ManagedServiceIdentity Management
+ This package contains Microsoft Azure SDK for ManagedServiceIdentity Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Managed Service Identity Client. Package tag package-preview-2021-09-30.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.27.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.4
+
+
+
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/ManagedServiceIdentityManager.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/ManagedServiceIdentityManager.java
new file mode 100644
index 000000000000..4719d51ad32d
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/ManagedServiceIdentityManager.java
@@ -0,0 +1,318 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.msi.generated;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
+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.RetryOptions;
+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.msi.generated.fluent.ManagedServiceIdentityClient;
+import com.azure.resourcemanager.msi.generated.implementation.ManagedServiceIdentityClientBuilder;
+import com.azure.resourcemanager.msi.generated.implementation.OperationsImpl;
+import com.azure.resourcemanager.msi.generated.implementation.SystemAssignedIdentitiesImpl;
+import com.azure.resourcemanager.msi.generated.implementation.UserAssignedIdentitiesImpl;
+import com.azure.resourcemanager.msi.generated.models.Operations;
+import com.azure.resourcemanager.msi.generated.models.SystemAssignedIdentities;
+import com.azure.resourcemanager.msi.generated.models.UserAssignedIdentities;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/** Entry point to ManagedServiceIdentityManager. The Managed Service Identity Client. */
+public final class ManagedServiceIdentityManager {
+ private SystemAssignedIdentities systemAssignedIdentities;
+
+ private Operations operations;
+
+ private UserAssignedIdentities userAssignedIdentities;
+
+ private final ManagedServiceIdentityClient clientObject;
+
+ private ManagedServiceIdentityManager(
+ HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new ManagedServiceIdentityClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of ManagedServiceIdentity service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the ManagedServiceIdentity service API instance.
+ */
+ public static ManagedServiceIdentityManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Creates an instance of ManagedServiceIdentity service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the ManagedServiceIdentity service API instance.
+ */
+ public static ManagedServiceIdentityManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new ManagedServiceIdentityManager(httpPipeline, profile, null);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create ManagedServiceIdentityManager with optional
+ * configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new ManagedServiceIdentityManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private static 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 RetryOptions retryOptions;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of ManagedServiceIdentity service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the ManagedServiceIdentity service API instance.
+ */
+ public ManagedServiceIdentityManager 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.msi.generated")
+ .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) {
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
+ policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new ManagedServiceIdentityManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of SystemAssignedIdentities.
+ *
+ * @return Resource collection API of SystemAssignedIdentities.
+ */
+ public SystemAssignedIdentities systemAssignedIdentities() {
+ if (this.systemAssignedIdentities == null) {
+ this.systemAssignedIdentities =
+ new SystemAssignedIdentitiesImpl(clientObject.getSystemAssignedIdentities(), this);
+ }
+ return systemAssignedIdentities;
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of UserAssignedIdentities.
+ *
+ * @return Resource collection API of UserAssignedIdentities.
+ */
+ public UserAssignedIdentities userAssignedIdentities() {
+ if (this.userAssignedIdentities == null) {
+ this.userAssignedIdentities =
+ new UserAssignedIdentitiesImpl(clientObject.getUserAssignedIdentities(), this);
+ }
+ return userAssignedIdentities;
+ }
+
+ /**
+ * @return Wrapped service client ManagedServiceIdentityClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ */
+ public ManagedServiceIdentityClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/ManagedServiceIdentityClient.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/ManagedServiceIdentityClient.java
new file mode 100644
index 000000000000..5d056fb13a07
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/ManagedServiceIdentityClient.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.msi.generated.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for ManagedServiceIdentityClient class. */
+public interface ManagedServiceIdentityClient {
+ /**
+ * Gets The Id of the Subscription to which the identity belongs.
+ *
+ * @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 SystemAssignedIdentitiesClient object to access its operations.
+ *
+ * @return the SystemAssignedIdentitiesClient object.
+ */
+ SystemAssignedIdentitiesClient getSystemAssignedIdentities();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the UserAssignedIdentitiesClient object to access its operations.
+ *
+ * @return the UserAssignedIdentitiesClient object.
+ */
+ UserAssignedIdentitiesClient getUserAssignedIdentities();
+}
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/OperationsClient.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/OperationsClient.java
new file mode 100644
index 000000000000..1330148ff373
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/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.msi.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.msi.generated.fluent.models.OperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Lists available operations for the Microsoft.ManagedIdentity provider.
+ *
+ * @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 operations List as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists available operations for the Microsoft.ManagedIdentity provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operations List as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/SystemAssignedIdentitiesClient.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/SystemAssignedIdentitiesClient.java
new file mode 100644
index 000000000000..cdc8d21a7497
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/SystemAssignedIdentitiesClient.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.msi.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.msi.generated.fluent.models.SystemAssignedIdentityInner;
+
+/** An instance of this class provides access to all the operations defined in SystemAssignedIdentitiesClient. */
+public interface SystemAssignedIdentitiesClient {
+ /**
+ * Gets the systemAssignedIdentity available under the specified RP scope.
+ *
+ * @param scope The resource provider scope of the resource. Parent resource being extended by Managed Identities.
+ * @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 systemAssignedIdentity available under the specified RP scope.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SystemAssignedIdentityInner getByScope(String scope);
+
+ /**
+ * Gets the systemAssignedIdentity available under the specified RP scope.
+ *
+ * @param scope The resource provider scope of the resource. Parent resource being extended by Managed Identities.
+ * @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 systemAssignedIdentity available under the specified RP scope along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByScopeWithResponse(String scope, Context context);
+}
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/UserAssignedIdentitiesClient.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/UserAssignedIdentitiesClient.java
new file mode 100644
index 000000000000..30fe5871e318
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/UserAssignedIdentitiesClient.java
@@ -0,0 +1,222 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.msi.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.msi.generated.fluent.models.AzureResourceInner;
+import com.azure.resourcemanager.msi.generated.fluent.models.IdentityInner;
+import com.azure.resourcemanager.msi.generated.models.IdentityUpdate;
+
+/** An instance of this class provides access to all the operations defined in UserAssignedIdentitiesClient. */
+public interface UserAssignedIdentitiesClient {
+ /**
+ * Lists all the userAssignedIdentities available under the specified 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 values returned by the List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all the userAssignedIdentities available under the specified 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 values returned by the List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Lists all the userAssignedIdentities available under the specified ResourceGroup.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
+ * @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 values returned by the List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Lists all the userAssignedIdentities available under the specified ResourceGroup.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
+ * @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 values returned by the List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Lists the associated resources for this identity.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
+ * @param resourceName The name of the identity resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure resources returned by the resource action to get a list of assigned resources as paginated response
+ * with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAssociatedResources(String resourceGroupName, String resourceName);
+
+ /**
+ * Lists the associated resources for this identity.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
+ * @param resourceName The name of the identity resource.
+ * @param filter OData filter expression to apply to the query.
+ * @param orderby OData orderBy expression to apply to the query.
+ * @param top Number of records to return.
+ * @param skip Number of records to skip.
+ * @param skiptoken A skip token is used to continue retrieving items after an operation returns a partial result.
+ * If a previous response contains a nextLink element, the value of the nextLink element will include a
+ * skipToken parameter that specifies a starting point to use for subsequent calls.
+ * @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 azure resources returned by the resource action to get a list of assigned resources as paginated response
+ * with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAssociatedResources(
+ String resourceGroupName,
+ String resourceName,
+ String filter,
+ String orderby,
+ Integer top,
+ Integer skip,
+ String skiptoken,
+ Context context);
+
+ /**
+ * Create or update an identity in the specified subscription and resource group.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
+ * @param resourceName The name of the identity resource.
+ * @param parameters Parameters to create or update the identity.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an identity resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IdentityInner createOrUpdate(String resourceGroupName, String resourceName, IdentityInner parameters);
+
+ /**
+ * Create or update an identity in the specified subscription and resource group.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
+ * @param resourceName The name of the identity resource.
+ * @param parameters Parameters to create or update the identity.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an identity resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName, String resourceName, IdentityInner parameters, Context context);
+
+ /**
+ * Update an identity in the specified subscription and resource group.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
+ * @param resourceName The name of the identity resource.
+ * @param parameters Parameters to update the identity.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an identity resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IdentityInner update(String resourceGroupName, String resourceName, IdentityUpdate parameters);
+
+ /**
+ * Update an identity in the specified subscription and resource group.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
+ * @param resourceName The name of the identity resource.
+ * @param parameters Parameters to update the identity.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an identity resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String resourceName, IdentityUpdate parameters, Context context);
+
+ /**
+ * Gets the identity.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
+ * @param resourceName The name of the identity resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the identity.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IdentityInner getByResourceGroup(String resourceGroupName, String resourceName);
+
+ /**
+ * Gets the identity.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
+ * @param resourceName The name of the identity resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the identity along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Deletes the identity.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
+ * @param resourceName The name of the identity resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String resourceName);
+
+ /**
+ * Deletes the identity.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
+ * @param resourceName The name of the identity resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String resourceName, Context context);
+}
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/AzureResourceInner.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/AzureResourceInner.java
new file mode 100644
index 000000000000..60f835c9fff1
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/AzureResourceInner.java
@@ -0,0 +1,110 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.msi.generated.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Azure Resource properties. Describes an Azure resource that is attached to an identity. */
+@Immutable
+public final class AzureResourceInner {
+ /*
+ * The ID of this resource.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * The name of this resource.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The type of this resource.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /*
+ * The name of the resource group this resource belongs to.
+ */
+ @JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY)
+ private String resourceGroup;
+
+ /*
+ * The ID of the subscription this resource belongs to.
+ */
+ @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String subscriptionId;
+
+ /*
+ * The name of the subscription this resource belongs to.
+ */
+ @JsonProperty(value = "subscriptionDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String subscriptionDisplayName;
+
+ /**
+ * Get the id property: The ID of this resource.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of this resource.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of this resource.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the resourceGroup property: The name of the resource group this resource belongs to.
+ *
+ * @return the resourceGroup value.
+ */
+ public String resourceGroup() {
+ return this.resourceGroup;
+ }
+
+ /**
+ * Get the subscriptionId property: The ID of the subscription this resource belongs to.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Get the subscriptionDisplayName property: The name of the subscription this resource belongs to.
+ *
+ * @return the subscriptionDisplayName value.
+ */
+ public String subscriptionDisplayName() {
+ return this.subscriptionDisplayName;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/IdentityInner.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/IdentityInner.java
new file mode 100644
index 000000000000..fd0f6a9c26b7
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/IdentityInner.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.msi.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+import java.util.UUID;
+
+/** Describes an identity resource. */
+@Fluent
+public final class IdentityInner extends Resource {
+ /*
+ * User Assigned Identity properties. The properties associated with the
+ * identity.
+ */
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private UserAssignedIdentityProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: User Assigned Identity properties. The properties associated with the identity.
+ *
+ * @return the innerProperties value.
+ */
+ private UserAssignedIdentityProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public IdentityInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public IdentityInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the tenantId property: The id of the tenant which the identity belongs to.
+ *
+ * @return the tenantId value.
+ */
+ public UUID tenantId() {
+ return this.innerProperties() == null ? null : this.innerProperties().tenantId();
+ }
+
+ /**
+ * Get the principalId property: The id of the service principal object associated with the created identity.
+ *
+ * @return the principalId value.
+ */
+ public UUID principalId() {
+ return this.innerProperties() == null ? null : this.innerProperties().principalId();
+ }
+
+ /**
+ * Get the clientId property: The id of the app associated with the identity. This is a random generated UUID by
+ * MSI.
+ *
+ * @return the clientId value.
+ */
+ public UUID clientId() {
+ return this.innerProperties() == null ? null : this.innerProperties().clientId();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/OperationInner.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..4955e54b5a88
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/OperationInner.java
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.msi.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.msi.generated.models.OperationDisplay;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Microsoft.ManagedIdentity Operation. Operation supported by the Microsoft.ManagedIdentity REST API. */
+@Fluent
+public final class OperationInner {
+ /*
+ * Operation Name. The name of the REST Operation. This is of the format
+ * {provider}/{resource}/{operation}.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Operation Display. The object that describes the operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /**
+ * Get the name property: Operation Name. The name of the REST Operation. This is of the format
+ * {provider}/{resource}/{operation}.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Operation Name. The name of the REST Operation. This is of the format
+ * {provider}/{resource}/{operation}.
+ *
+ * @param name the name value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the display property: Operation Display. The object that describes the operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Operation Display. The object that describes the operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay 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/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/SystemAssignedIdentityInner.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/SystemAssignedIdentityInner.java
new file mode 100644
index 000000000000..75f1494ac28a
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/SystemAssignedIdentityInner.java
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.msi.generated.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.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+import java.util.UUID;
+
+/** Describes a system assigned identity resource. */
+@Fluent
+public final class SystemAssignedIdentityInner extends ProxyResource {
+ /*
+ * The geo-location where the resource lives
+ */
+ @JsonProperty(value = "location", required = true)
+ private String location;
+
+ /*
+ * Resource tags
+ */
+ @JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map tags;
+
+ /*
+ * System Assigned Identity properties. The properties associated with the
+ * identity.
+ */
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemAssignedIdentityProperties innerProperties;
+
+ /**
+ * Get the location property: The geo-location where the resource lives.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The geo-location where the resource lives.
+ *
+ * @param location the location value to set.
+ * @return the SystemAssignedIdentityInner object itself.
+ */
+ public SystemAssignedIdentityInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the SystemAssignedIdentityInner object itself.
+ */
+ public SystemAssignedIdentityInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the innerProperties property: System Assigned Identity properties. The properties associated with the
+ * identity.
+ *
+ * @return the innerProperties value.
+ */
+ private SystemAssignedIdentityProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the tenantId property: The id of the tenant which the identity belongs to.
+ *
+ * @return the tenantId value.
+ */
+ public UUID tenantId() {
+ return this.innerProperties() == null ? null : this.innerProperties().tenantId();
+ }
+
+ /**
+ * Get the principalId property: The id of the service principal object associated with the created identity.
+ *
+ * @return the principalId value.
+ */
+ public UUID principalId() {
+ return this.innerProperties() == null ? null : this.innerProperties().principalId();
+ }
+
+ /**
+ * Get the clientId property: The id of the app associated with the identity. This is a random generated UUID by
+ * MSI.
+ *
+ * @return the clientId value.
+ */
+ public UUID clientId() {
+ return this.innerProperties() == null ? null : this.innerProperties().clientId();
+ }
+
+ /**
+ * Get the clientSecretUrl property: The ManagedServiceIdentity DataPlane URL that can be queried to obtain the
+ * identity credentials.
+ *
+ * @return the clientSecretUrl value.
+ */
+ public String clientSecretUrl() {
+ return this.innerProperties() == null ? null : this.innerProperties().clientSecretUrl();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (location() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property location in model SystemAssignedIdentityInner"));
+ }
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(SystemAssignedIdentityInner.class);
+}
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/SystemAssignedIdentityProperties.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/SystemAssignedIdentityProperties.java
new file mode 100644
index 000000000000..5b38e4e806f9
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/SystemAssignedIdentityProperties.java
@@ -0,0 +1,86 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.msi.generated.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.UUID;
+
+/** System Assigned Identity properties. The properties associated with the system assigned identity. */
+@Immutable
+public final class SystemAssignedIdentityProperties {
+ /*
+ * The id of the tenant which the identity belongs to.
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID tenantId;
+
+ /*
+ * The id of the service principal object associated with the created
+ * identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID principalId;
+
+ /*
+ * The id of the app associated with the identity. This is a random
+ * generated UUID by MSI.
+ */
+ @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID clientId;
+
+ /*
+ * The ManagedServiceIdentity DataPlane URL that can be queried to obtain
+ * the identity credentials.
+ */
+ @JsonProperty(value = "clientSecretUrl", access = JsonProperty.Access.WRITE_ONLY)
+ private String clientSecretUrl;
+
+ /**
+ * Get the tenantId property: The id of the tenant which the identity belongs to.
+ *
+ * @return the tenantId value.
+ */
+ public UUID tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the principalId property: The id of the service principal object associated with the created identity.
+ *
+ * @return the principalId value.
+ */
+ public UUID principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the clientId property: The id of the app associated with the identity. This is a random generated UUID by
+ * MSI.
+ *
+ * @return the clientId value.
+ */
+ public UUID clientId() {
+ return this.clientId;
+ }
+
+ /**
+ * Get the clientSecretUrl property: The ManagedServiceIdentity DataPlane URL that can be queried to obtain the
+ * identity credentials.
+ *
+ * @return the clientSecretUrl value.
+ */
+ public String clientSecretUrl() {
+ return this.clientSecretUrl;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/UserAssignedIdentityProperties.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/UserAssignedIdentityProperties.java
new file mode 100644
index 000000000000..8024dc931531
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/UserAssignedIdentityProperties.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.msi.generated.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.UUID;
+
+/** User Assigned Identity properties. The properties associated with the user assigned identity. */
+@Immutable
+public final class UserAssignedIdentityProperties {
+ /*
+ * The id of the tenant which the identity belongs to.
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID tenantId;
+
+ /*
+ * The id of the service principal object associated with the created
+ * identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID principalId;
+
+ /*
+ * The id of the app associated with the identity. This is a random
+ * generated UUID by MSI.
+ */
+ @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID clientId;
+
+ /**
+ * Get the tenantId property: The id of the tenant which the identity belongs to.
+ *
+ * @return the tenantId value.
+ */
+ public UUID tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the principalId property: The id of the service principal object associated with the created identity.
+ *
+ * @return the principalId value.
+ */
+ public UUID principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the clientId property: The id of the app associated with the identity. This is a random generated UUID by
+ * MSI.
+ *
+ * @return the clientId value.
+ */
+ public UUID clientId() {
+ return this.clientId;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/package-info.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/models/package-info.java
new file mode 100644
index 000000000000..1ea8daad79fa
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/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 ManagedServiceIdentityClient. The Managed Service Identity Client. */
+package com.azure.resourcemanager.msi.generated.fluent.models;
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/package-info.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/fluent/package-info.java
new file mode 100644
index 000000000000..b05819f46a21
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/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 ManagedServiceIdentityClient. The Managed Service Identity Client. */
+package com.azure.resourcemanager.msi.generated.fluent;
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/implementation/AzureResourceImpl.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/implementation/AzureResourceImpl.java
new file mode 100644
index 000000000000..e297700ab6da
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/implementation/AzureResourceImpl.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.msi.generated.implementation;
+
+import com.azure.resourcemanager.msi.generated.fluent.models.AzureResourceInner;
+import com.azure.resourcemanager.msi.generated.models.AzureResource;
+
+public final class AzureResourceImpl implements AzureResource {
+ private AzureResourceInner innerObject;
+
+ private final com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager serviceManager;
+
+ AzureResourceImpl(
+ AzureResourceInner innerObject,
+ com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String resourceGroup() {
+ return this.innerModel().resourceGroup();
+ }
+
+ public String subscriptionId() {
+ return this.innerModel().subscriptionId();
+ }
+
+ public String subscriptionDisplayName() {
+ return this.innerModel().subscriptionDisplayName();
+ }
+
+ public AzureResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/implementation/IdentityImpl.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/implementation/IdentityImpl.java
new file mode 100644
index 000000000000..00bed5526c76
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/implementation/IdentityImpl.java
@@ -0,0 +1,201 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.msi.generated.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.msi.generated.fluent.models.IdentityInner;
+import com.azure.resourcemanager.msi.generated.models.AzureResource;
+import com.azure.resourcemanager.msi.generated.models.Identity;
+import com.azure.resourcemanager.msi.generated.models.IdentityUpdate;
+import java.util.Collections;
+import java.util.Map;
+import java.util.UUID;
+
+public final class IdentityImpl implements Identity, Identity.Definition, Identity.Update {
+ private IdentityInner innerObject;
+
+ private final com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager 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 UUID tenantId() {
+ return this.innerModel().tenantId();
+ }
+
+ public UUID principalId() {
+ return this.innerModel().principalId();
+ }
+
+ public UUID clientId() {
+ return this.innerModel().clientId();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public IdentityInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String resourceName;
+
+ private IdentityUpdate updateParameters;
+
+ public IdentityImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Identity create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getUserAssignedIdentities()
+ .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Identity create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getUserAssignedIdentities()
+ .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ IdentityImpl(String name, com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager serviceManager) {
+ this.innerObject = new IdentityInner();
+ this.serviceManager = serviceManager;
+ this.resourceName = name;
+ }
+
+ public IdentityImpl update() {
+ this.updateParameters = new IdentityUpdate();
+ return this;
+ }
+
+ public Identity apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getUserAssignedIdentities()
+ .updateWithResponse(resourceGroupName, resourceName, updateParameters, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Identity apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getUserAssignedIdentities()
+ .updateWithResponse(resourceGroupName, resourceName, updateParameters, context)
+ .getValue();
+ return this;
+ }
+
+ IdentityImpl(
+ IdentityInner innerObject,
+ com.azure.resourcemanager.msi.generated.ManagedServiceIdentityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "userAssignedIdentities");
+ }
+
+ public Identity refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getUserAssignedIdentities()
+ .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Identity refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getUserAssignedIdentities()
+ .getByResourceGroupWithResponse(resourceGroupName, resourceName, context)
+ .getValue();
+ return this;
+ }
+
+ public PagedIterable listAssociatedResources() {
+ return serviceManager.userAssignedIdentities().listAssociatedResources(resourceGroupName, resourceName);
+ }
+
+ public PagedIterable listAssociatedResources(
+ String filter, String orderby, Integer top, Integer skip, String skiptoken, Context context) {
+ return serviceManager
+ .userAssignedIdentities()
+ .listAssociatedResources(resourceGroupName, resourceName, filter, orderby, top, skip, skiptoken, context);
+ }
+
+ public IdentityImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public IdentityImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public IdentityImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateParameters.withTags(tags);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/implementation/ManagedServiceIdentityClientBuilder.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/implementation/ManagedServiceIdentityClientBuilder.java
new file mode 100644
index 000000000000..6f27cc2f0663
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/implementation/ManagedServiceIdentityClientBuilder.java
@@ -0,0 +1,142 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.msi.generated.implementation;
+
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/** A builder for creating a new instance of the ManagedServiceIdentityClientImpl type. */
+@ServiceClientBuilder(serviceClients = {ManagedServiceIdentityClientImpl.class})
+public final class ManagedServiceIdentityClientBuilder {
+ /*
+ * The Id of the Subscription to which the identity belongs.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The Id of the Subscription to which the identity belongs.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the ManagedServiceIdentityClientBuilder.
+ */
+ public ManagedServiceIdentityClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the ManagedServiceIdentityClientBuilder.
+ */
+ public ManagedServiceIdentityClientBuilder 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 ManagedServiceIdentityClientBuilder.
+ */
+ public ManagedServiceIdentityClientBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the ManagedServiceIdentityClientBuilder.
+ */
+ public ManagedServiceIdentityClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the ManagedServiceIdentityClientBuilder.
+ */
+ public ManagedServiceIdentityClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the ManagedServiceIdentityClientBuilder.
+ */
+ public ManagedServiceIdentityClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of ManagedServiceIdentityClientImpl with the provided parameters.
+ *
+ * @return an instance of ManagedServiceIdentityClientImpl.
+ */
+ public ManagedServiceIdentityClientImpl buildClient() {
+ if (endpoint == null) {
+ this.endpoint = "https://management.azure.com";
+ }
+ if (environment == null) {
+ this.environment = AzureEnvironment.AZURE;
+ }
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
+ if (defaultPollInterval == null) {
+ this.defaultPollInterval = Duration.ofSeconds(30);
+ }
+ if (serializerAdapter == null) {
+ this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
+ }
+ ManagedServiceIdentityClientImpl client =
+ new ManagedServiceIdentityClientImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/implementation/ManagedServiceIdentityClientImpl.java b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/implementation/ManagedServiceIdentityClientImpl.java
new file mode 100644
index 000000000000..abb91f235e81
--- /dev/null
+++ b/sdk/msi/azure-resourcemanager-msi-generated/src/main/java/com/azure/resourcemanager/msi/generated/implementation/ManagedServiceIdentityClientImpl.java
@@ -0,0 +1,321 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.msi.generated.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.msi.generated.fluent.ManagedServiceIdentityClient;
+import com.azure.resourcemanager.msi.generated.fluent.OperationsClient;
+import com.azure.resourcemanager.msi.generated.fluent.SystemAssignedIdentitiesClient;
+import com.azure.resourcemanager.msi.generated.fluent.UserAssignedIdentitiesClient;
+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 ManagedServiceIdentityClientImpl type. */
+@ServiceClient(builder = ManagedServiceIdentityClientBuilder.class)
+public final class ManagedServiceIdentityClientImpl implements ManagedServiceIdentityClient {
+ /** The Id of the Subscription to which the identity belongs. */
+ private final String subscriptionId;
+
+ /**
+ * Gets The Id of the Subscription to which the identity belongs.
+ *
+ * @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 SystemAssignedIdentitiesClient object to access its operations. */
+ private final SystemAssignedIdentitiesClient systemAssignedIdentities;
+
+ /**
+ * Gets the SystemAssignedIdentitiesClient object to access its operations.
+ *
+ * @return the SystemAssignedIdentitiesClient object.
+ */
+ public SystemAssignedIdentitiesClient getSystemAssignedIdentities() {
+ return this.systemAssignedIdentities;
+ }
+
+ /** 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 UserAssignedIdentitiesClient object to access its operations. */
+ private final UserAssignedIdentitiesClient userAssignedIdentities;
+
+ /**
+ * Gets the UserAssignedIdentitiesClient object to access its operations.
+ *
+ * @return the UserAssignedIdentitiesClient object.
+ */
+ public UserAssignedIdentitiesClient getUserAssignedIdentities() {
+ return this.userAssignedIdentities;
+ }
+
+ /**
+ * Initializes an instance of ManagedServiceIdentityClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId The Id of the Subscription to which the identity belongs.
+ * @param endpoint server parameter.
+ */
+ ManagedServiceIdentityClientImpl(
+ HttpPipeline httpPipeline,
+ SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval,
+ AzureEnvironment environment,
+ String subscriptionId,
+ String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2021-09-30-preview";
+ this.systemAssignedIdentities = new SystemAssignedIdentitiesClientImpl(this);
+ this.operations = new OperationsClientImpl(this);
+ this.userAssignedIdentities = new UserAssignedIdentitiesClientImpl(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