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 KeyVault service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the KeyVault service API instance.
+ */
+ public KeyVaultManager 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.keyvault.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 BearerTokenAuthenticationPolicy(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 KeyVaultManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Keys. It manages Key.
+ *
+ * @return Resource collection API of Keys.
+ */
+ public Keys keys() {
+ if (this.keys == null) {
+ this.keys = new KeysImpl(clientObject.getKeys(), this);
+ }
+ return keys;
+ }
+
+ /**
+ * Gets the resource collection API of ManagedHsmKeys. It manages ManagedHsmKey.
+ *
+ * @return Resource collection API of ManagedHsmKeys.
+ */
+ public ManagedHsmKeys managedHsmKeys() {
+ if (this.managedHsmKeys == null) {
+ this.managedHsmKeys = new ManagedHsmKeysImpl(clientObject.getManagedHsmKeys(), this);
+ }
+ return managedHsmKeys;
+ }
+
+ /**
+ * Gets the resource collection API of Vaults.
+ *
+ * @return Resource collection API of Vaults.
+ */
+ public Vaults vaults() {
+ if (this.vaults == null) {
+ this.vaults = new VaultsImpl(clientObject.getVaults(), this);
+ }
+ return vaults;
+ }
+
+ /**
+ * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection.
+ *
+ * @return Resource collection API of PrivateEndpointConnections.
+ */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections
+ = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
+ }
+ return privateEndpointConnections;
+ }
+
+ /**
+ * Gets the resource collection API of PrivateLinkResources.
+ *
+ * @return Resource collection API of PrivateLinkResources.
+ */
+ public PrivateLinkResources privateLinkResources() {
+ if (this.privateLinkResources == null) {
+ this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
+ }
+ return privateLinkResources;
+ }
+
+ /**
+ * Gets the resource collection API of ManagedHsms. It manages ManagedHsm.
+ *
+ * @return Resource collection API of ManagedHsms.
+ */
+ public ManagedHsms managedHsms() {
+ if (this.managedHsms == null) {
+ this.managedHsms = new ManagedHsmsImpl(clientObject.getManagedHsms(), this);
+ }
+ return managedHsms;
+ }
+
+ /**
+ * Gets the resource collection API of MhsmPrivateEndpointConnections. It manages MhsmPrivateEndpointConnection.
+ *
+ * @return Resource collection API of MhsmPrivateEndpointConnections.
+ */
+ public MhsmPrivateEndpointConnections mhsmPrivateEndpointConnections() {
+ if (this.mhsmPrivateEndpointConnections == null) {
+ this.mhsmPrivateEndpointConnections
+ = new MhsmPrivateEndpointConnectionsImpl(clientObject.getMhsmPrivateEndpointConnections(), this);
+ }
+ return mhsmPrivateEndpointConnections;
+ }
+
+ /**
+ * Gets the resource collection API of MhsmPrivateLinkResources.
+ *
+ * @return Resource collection API of MhsmPrivateLinkResources.
+ */
+ public MhsmPrivateLinkResources mhsmPrivateLinkResources() {
+ if (this.mhsmPrivateLinkResources == null) {
+ this.mhsmPrivateLinkResources
+ = new MhsmPrivateLinkResourcesImpl(clientObject.getMhsmPrivateLinkResources(), this);
+ }
+ return mhsmPrivateLinkResources;
+ }
+
+ /**
+ * Gets the resource collection API of MhsmRegions.
+ *
+ * @return Resource collection API of MhsmRegions.
+ */
+ public MhsmRegions mhsmRegions() {
+ if (this.mhsmRegions == null) {
+ this.mhsmRegions = new MhsmRegionsImpl(clientObject.getMhsmRegions(), this);
+ }
+ return mhsmRegions;
+ }
+
+ /**
+ * 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 Secrets. It manages Secret.
+ *
+ * @return Resource collection API of Secrets.
+ */
+ public Secrets secrets() {
+ if (this.secrets == null) {
+ this.secrets = new SecretsImpl(clientObject.getSecrets(), this);
+ }
+ return secrets;
+ }
+
+ /**
+ * Gets wrapped service client KeyVaultManagementClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client KeyVaultManagementClient.
+ */
+ public KeyVaultManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/KeyVaultManagementClient.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/KeyVaultManagementClient.java
new file mode 100644
index 000000000000..d972fc6a8a4d
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/KeyVaultManagementClient.java
@@ -0,0 +1,126 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for KeyVaultManagementClient class.
+ */
+public interface KeyVaultManagementClient {
+ /**
+ * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+ * part of the URI for every service call.
+ *
+ * @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 KeysClient object to access its operations.
+ *
+ * @return the KeysClient object.
+ */
+ KeysClient getKeys();
+
+ /**
+ * Gets the ManagedHsmKeysClient object to access its operations.
+ *
+ * @return the ManagedHsmKeysClient object.
+ */
+ ManagedHsmKeysClient getManagedHsmKeys();
+
+ /**
+ * Gets the VaultsClient object to access its operations.
+ *
+ * @return the VaultsClient object.
+ */
+ VaultsClient getVaults();
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ PrivateEndpointConnectionsClient getPrivateEndpointConnections();
+
+ /**
+ * Gets the PrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesClient object.
+ */
+ PrivateLinkResourcesClient getPrivateLinkResources();
+
+ /**
+ * Gets the ManagedHsmsClient object to access its operations.
+ *
+ * @return the ManagedHsmsClient object.
+ */
+ ManagedHsmsClient getManagedHsms();
+
+ /**
+ * Gets the MhsmPrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the MhsmPrivateEndpointConnectionsClient object.
+ */
+ MhsmPrivateEndpointConnectionsClient getMhsmPrivateEndpointConnections();
+
+ /**
+ * Gets the MhsmPrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the MhsmPrivateLinkResourcesClient object.
+ */
+ MhsmPrivateLinkResourcesClient getMhsmPrivateLinkResources();
+
+ /**
+ * Gets the MhsmRegionsClient object to access its operations.
+ *
+ * @return the MhsmRegionsClient object.
+ */
+ MhsmRegionsClient getMhsmRegions();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the SecretsClient object to access its operations.
+ *
+ * @return the SecretsClient object.
+ */
+ SecretsClient getSecrets();
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/KeysClient.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/KeysClient.java
new file mode 100644
index 000000000000..fc9023c1ce34
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/KeysClient.java
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.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.keyvault.generated.fluent.models.KeyInner;
+import com.azure.resourcemanager.keyvault.generated.models.KeyCreateParameters;
+
+/**
+ * An instance of this class provides access to all the operations defined in KeysClient.
+ */
+public interface KeysClient {
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the key vault which contains the key to be created.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createIfNotExistWithResponse(String resourceGroupName, String vaultName, String keyName,
+ KeyCreateParameters parameters, Context context);
+
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the key vault which contains the key to be created.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ KeyInner createIfNotExist(String resourceGroupName, String vaultName, String keyName,
+ KeyCreateParameters parameters);
+
+ /**
+ * Gets the current version of the specified key from the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key to be retrieved.
+ * @param keyName The name of the key to be retrieved.
+ * @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 current version of the specified key from the specified key vault along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String vaultName, String keyName, Context context);
+
+ /**
+ * Gets the current version of the specified key from the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key to be retrieved.
+ * @param keyName The name of the key to be retrieved.
+ * @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 current version of the specified key from the specified key vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ KeyInner get(String resourceGroupName, String vaultName, String keyName);
+
+ /**
+ * Lists the keys in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the keys to be retrieved.
+ * @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 page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName);
+
+ /**
+ * Lists the keys in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the keys to be retrieved.
+ * @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 page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName, Context context);
+
+ /**
+ * Gets the specified version of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key version to be retrieved.
+ * @param keyName The name of the key version to be retrieved.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified key vault along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getVersionWithResponse(String resourceGroupName, String vaultName, String keyName,
+ String keyVersion, Context context);
+
+ /**
+ * Gets the specified version of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key version to be retrieved.
+ * @param keyName The name of the key version to be retrieved.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified key vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ KeyInner getVersion(String resourceGroupName, String vaultName, String keyName, String keyVersion);
+
+ /**
+ * Lists the versions of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key versions to be retrieved.
+ * @param keyName The name of the key versions to be retrieved.
+ * @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 page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listVersions(String resourceGroupName, String vaultName, String keyName);
+
+ /**
+ * Lists the versions of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key versions to be retrieved.
+ * @param keyName The name of the key versions to be retrieved.
+ * @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 page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listVersions(String resourceGroupName, String vaultName, String keyName, Context context);
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/ManagedHsmKeysClient.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/ManagedHsmKeysClient.java
new file mode 100644
index 000000000000..4d4967a4085b
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/ManagedHsmKeysClient.java
@@ -0,0 +1,182 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.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.keyvault.generated.fluent.models.ManagedHsmKeyInner;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmKeyCreateParameters;
+
+/**
+ * An instance of this class provides access to all the operations defined in ManagedHsmKeysClient.
+ */
+public interface ManagedHsmKeysClient {
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createIfNotExistWithResponse(String resourceGroupName, String name, String keyName,
+ ManagedHsmKeyCreateParameters parameters, Context context);
+
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedHsmKeyInner createIfNotExist(String resourceGroupName, String name, String keyName,
+ ManagedHsmKeyCreateParameters parameters);
+
+ /**
+ * Gets the current version of the specified key from the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 current version of the specified key from the specified managed HSM along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String name, String keyName,
+ Context context);
+
+ /**
+ * Gets the current version of the specified key from the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 current version of the specified key from the specified managed HSM.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedHsmKeyInner get(String resourceGroupName, String name, String keyName);
+
+ /**
+ * Lists the keys in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String name);
+
+ /**
+ * Lists the keys in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String name, Context context);
+
+ /**
+ * Gets the specified version of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified managed HSM along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getVersionWithResponse(String resourceGroupName, String name, String keyName,
+ String keyVersion, Context context);
+
+ /**
+ * Gets the specified version of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified managed HSM.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedHsmKeyInner getVersion(String resourceGroupName, String name, String keyName, String keyVersion);
+
+ /**
+ * Lists the versions of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listVersions(String resourceGroupName, String name, String keyName);
+
+ /**
+ * Lists the versions of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listVersions(String resourceGroupName, String name, String keyName,
+ Context context);
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/ManagedHsmsClient.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/ManagedHsmsClient.java
new file mode 100644
index 000000000000..f5e28599830f
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/ManagedHsmsClient.java
@@ -0,0 +1,425 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.CheckMhsmNameAvailabilityResultInner;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.DeletedManagedHsmInner;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.ManagedHsmInner;
+import com.azure.resourcemanager.keyvault.generated.models.CheckMhsmNameAvailabilityParameters;
+
+/**
+ * An instance of this class provides access to all the operations defined in ManagedHsmsClient.
+ */
+public interface ManagedHsmsClient {
+ /**
+ * Create or update a managed HSM Pool in the specified subscription.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param parameters Parameters to create or update the managed HSM Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ManagedHsmInner> beginCreateOrUpdate(String resourceGroupName, String name,
+ ManagedHsmInner parameters);
+
+ /**
+ * Create or update a managed HSM Pool in the specified subscription.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param parameters Parameters to create or update the managed HSM Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ManagedHsmInner> beginCreateOrUpdate(String resourceGroupName, String name,
+ ManagedHsmInner parameters, Context context);
+
+ /**
+ * Create or update a managed HSM Pool in the specified subscription.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param parameters Parameters to create or update the managed HSM Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedHsmInner createOrUpdate(String resourceGroupName, String name, ManagedHsmInner parameters);
+
+ /**
+ * Create or update a managed HSM Pool in the specified subscription.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param parameters Parameters to create or update the managed HSM Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedHsmInner createOrUpdate(String resourceGroupName, String name, ManagedHsmInner parameters, Context context);
+
+ /**
+ * Update a managed HSM Pool in the specified subscription.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param parameters Parameters to patch the managed HSM Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ManagedHsmInner> beginUpdate(String resourceGroupName, String name,
+ ManagedHsmInner parameters);
+
+ /**
+ * Update a managed HSM Pool in the specified subscription.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param parameters Parameters to patch the managed HSM Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ManagedHsmInner> beginUpdate(String resourceGroupName, String name,
+ ManagedHsmInner parameters, Context context);
+
+ /**
+ * Update a managed HSM Pool in the specified subscription.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param parameters Parameters to patch the managed HSM Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedHsmInner update(String resourceGroupName, String name, ManagedHsmInner parameters);
+
+ /**
+ * Update a managed HSM Pool in the specified subscription.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param parameters Parameters to patch the managed HSM Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedHsmInner update(String resourceGroupName, String name, ManagedHsmInner parameters, Context context);
+
+ /**
+ * Deletes the specified managed HSM Pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name The name of the managed HSM Pool to delete.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String name);
+
+ /**
+ * Deletes the specified managed HSM Pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name The name of the managed HSM Pool to delete.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context);
+
+ /**
+ * Deletes the specified managed HSM Pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name The name of the managed HSM Pool to delete.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 name);
+
+ /**
+ * Deletes the specified managed HSM Pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name The name of the managed HSM Pool to delete.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 name, Context context);
+
+ /**
+ * Gets the specified managed HSM Pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name The name of the managed HSM Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified managed HSM Pool along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context);
+
+ /**
+ * Gets the specified managed HSM Pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name The name of the managed HSM Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified managed HSM Pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedHsmInner getByResourceGroup(String resourceGroupName, String name);
+
+ /**
+ * The List operation gets information about the managed HSM Pools associated with the subscription and within the
+ * specified resource group.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 managed HSM Pools as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * The List operation gets information about the managed HSM Pools associated with the subscription and within the
+ * specified resource group.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param top Maximum number of results to return.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 managed HSM Pools as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Integer top, Context context);
+
+ /**
+ * The List operation gets information about the managed HSM Pools associated with the subscription.
+ *
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 managed HSM Pools as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * The List operation gets information about the managed HSM Pools associated with the subscription.
+ *
+ * @param top Maximum number of results to return.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 managed HSM Pools as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Integer top, Context context);
+
+ /**
+ * The List operation gets information about the deleted managed HSMs associated with the subscription.
+ *
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 deleted managed HSM Pools as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listDeleted();
+
+ /**
+ * The List operation gets information about the deleted managed HSMs associated with the subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 deleted managed HSM Pools as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listDeleted(Context context);
+
+ /**
+ * Gets the specified deleted managed HSM.
+ *
+ * @param name The name of the deleted managed HSM.
+ * @param location The location of the deleted managed HSM.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified deleted managed HSM along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getDeletedWithResponse(String name, String location, Context context);
+
+ /**
+ * Gets the specified deleted managed HSM.
+ *
+ * @param name The name of the deleted managed HSM.
+ * @param location The location of the deleted managed HSM.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified deleted managed HSM.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeletedManagedHsmInner getDeleted(String name, String location);
+
+ /**
+ * Permanently deletes the specified managed HSM.
+ *
+ * @param name The name of the soft-deleted managed HSM.
+ * @param location The location of the soft-deleted managed HSM.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginPurgeDeleted(String name, String location);
+
+ /**
+ * Permanently deletes the specified managed HSM.
+ *
+ * @param name The name of the soft-deleted managed HSM.
+ * @param location The location of the soft-deleted managed HSM.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginPurgeDeleted(String name, String location, Context context);
+
+ /**
+ * Permanently deletes the specified managed HSM.
+ *
+ * @param name The name of the soft-deleted managed HSM.
+ * @param location The location of the soft-deleted managed HSM.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 purgeDeleted(String name, String location);
+
+ /**
+ * Permanently deletes the specified managed HSM.
+ *
+ * @param name The name of the soft-deleted managed HSM.
+ * @param location The location of the soft-deleted managed HSM.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 purgeDeleted(String name, String location, Context context);
+
+ /**
+ * Checks that the managed hsm name is valid and is not already in use.
+ *
+ * @param mhsmName The name of the managed hsm.
+ * @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 CheckMhsmNameAvailability operation response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response
+ checkMhsmNameAvailabilityWithResponse(CheckMhsmNameAvailabilityParameters mhsmName, Context context);
+
+ /**
+ * Checks that the managed hsm name is valid and is not already in use.
+ *
+ * @param mhsmName The name of the managed hsm.
+ * @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 CheckMhsmNameAvailability operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CheckMhsmNameAvailabilityResultInner checkMhsmNameAvailability(CheckMhsmNameAvailabilityParameters mhsmName);
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/MhsmPrivateEndpointConnectionsClient.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/MhsmPrivateEndpointConnectionsClient.java
new file mode 100644
index 000000000000..74bce4215cd3
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/MhsmPrivateEndpointConnectionsClient.java
@@ -0,0 +1,188 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.MhsmPrivateEndpointConnectionInner;
+import com.azure.resourcemanager.keyvault.generated.models.MhsmPrivateEndpointConnectionsPutResponse;
+
+/**
+ * An instance of this class provides access to all the operations defined in MhsmPrivateEndpointConnectionsClient.
+ */
+public interface MhsmPrivateEndpointConnectionsClient {
+ /**
+ * The List operation gets information about the private endpoint connections associated with the managed HSM Pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 private endpoint connections associated with a managed HSM Pools as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResource(String resourceGroupName, String name);
+
+ /**
+ * The List operation gets information about the private endpoint connections associated with the managed HSM Pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 private endpoint connections associated with a managed HSM Pools as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResource(String resourceGroupName, String name,
+ Context context);
+
+ /**
+ * Gets the specified private endpoint connection associated with the managed HSM Pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the managed hsm
+ * pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified private endpoint connection associated with the managed HSM Pool along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String name,
+ String privateEndpointConnectionName, Context context);
+
+ /**
+ * Gets the specified private endpoint connection associated with the managed HSM Pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the managed hsm
+ * pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException thrown if the request is rejected by
+ * server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified private endpoint connection associated with the managed HSM Pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MhsmPrivateEndpointConnectionInner get(String resourceGroupName, String name, String privateEndpointConnectionName);
+
+ /**
+ * Updates the specified private endpoint connection associated with the managed hsm pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the managed hsm
+ * pool.
+ * @param properties The intended state of private endpoint connection.
+ * @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 private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MhsmPrivateEndpointConnectionsPutResponse putWithResponse(String resourceGroupName, String name,
+ String privateEndpointConnectionName, MhsmPrivateEndpointConnectionInner properties, Context context);
+
+ /**
+ * Updates the specified private endpoint connection associated with the managed hsm pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the managed hsm
+ * pool.
+ * @param properties The intended state of private endpoint connection.
+ * @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 private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MhsmPrivateEndpointConnectionInner put(String resourceGroupName, String name, String privateEndpointConnectionName,
+ MhsmPrivateEndpointConnectionInner properties);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the managed hsm pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the managed hsm
+ * pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MhsmPrivateEndpointConnectionInner>
+ beginDelete(String resourceGroupName, String name, String privateEndpointConnectionName);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the managed hsm pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the managed hsm
+ * pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MhsmPrivateEndpointConnectionInner>
+ beginDelete(String resourceGroupName, String name, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the managed hsm pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the managed hsm
+ * pool.
+ * @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 private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MhsmPrivateEndpointConnectionInner delete(String resourceGroupName, String name,
+ String privateEndpointConnectionName);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the managed hsm pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the managed hsm
+ * pool.
+ * @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 private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MhsmPrivateEndpointConnectionInner delete(String resourceGroupName, String name,
+ String privateEndpointConnectionName, Context context);
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/MhsmPrivateLinkResourcesClient.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/MhsmPrivateLinkResourcesClient.java
new file mode 100644
index 000000000000..41f05ba921e1
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/MhsmPrivateLinkResourcesClient.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.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.keyvault.generated.fluent.models.MhsmPrivateLinkResourceListResultInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in MhsmPrivateLinkResourcesClient.
+ */
+public interface MhsmPrivateLinkResourcesClient {
+ /**
+ * Gets the private link resources supported for the managed hsm pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @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 private link resources supported for the managed hsm pool along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listByMhsmResourceWithResponse(String resourceGroupName,
+ String name, Context context);
+
+ /**
+ * Gets the private link resources supported for the managed hsm pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @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 private link resources supported for the managed hsm pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MhsmPrivateLinkResourceListResultInner listByMhsmResource(String resourceGroupName, String name);
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/MhsmRegionsClient.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/MhsmRegionsClient.java
new file mode 100644
index 000000000000..46b8b0f54f26
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/MhsmRegionsClient.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.keyvault.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.keyvault.generated.fluent.models.MhsmGeoReplicatedRegionInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in MhsmRegionsClient.
+ */
+public interface MhsmRegionsClient {
+ /**
+ * The List operation gets information about the regions associated with the managed HSM Pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 regions associated with a managed HSM Pools as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResource(String resourceGroupName, String name);
+
+ /**
+ * The List operation gets information about the regions associated with the managed HSM Pool.
+ *
+ * @param resourceGroupName Name of the resource group that contains the managed HSM pool.
+ * @param name Name of the managed HSM Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.keyvault.generated.models.ErrorException 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 regions associated with a managed HSM Pools as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResource(String resourceGroupName, String name, Context context);
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/OperationsClient.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/OperationsClient.java
new file mode 100644
index 000000000000..da07ac20f5a0
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/OperationsClient.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.keyvault.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.keyvault.generated.fluent.models.OperationInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
+public interface OperationsClient {
+ /**
+ * Lists all of the available Key Vault Rest API operations.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to list Storage operations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all of the available Key Vault Rest API operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to list Storage operations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/PrivateEndpointConnectionsClient.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/PrivateEndpointConnectionsClient.java
new file mode 100644
index 000000000000..6ad0dddf1176
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateEndpointConnectionsPutResponse;
+
+/**
+ * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient.
+ */
+public interface PrivateEndpointConnectionsClient {
+ /**
+ * Gets the specified private endpoint connection associated with the key vault.
+ *
+ * @param resourceGroupName Name of the resource group that contains the key vault.
+ * @param vaultName The name of the key vault.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the key vault.
+ * @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 specified private endpoint connection associated with the key vault along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String vaultName,
+ String privateEndpointConnectionName, Context context);
+
+ /**
+ * Gets the specified private endpoint connection associated with the key vault.
+ *
+ * @param resourceGroupName Name of the resource group that contains the key vault.
+ * @param vaultName The name of the key vault.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the key vault.
+ * @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 specified private endpoint connection associated with the key vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner get(String resourceGroupName, String vaultName,
+ String privateEndpointConnectionName);
+
+ /**
+ * Updates the specified private endpoint connection associated with the key vault.
+ *
+ * @param resourceGroupName Name of the resource group that contains the key vault.
+ * @param vaultName The name of the key vault.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the key vault.
+ * @param properties The intended state of private endpoint connection.
+ * @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 private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionsPutResponse putWithResponse(String resourceGroupName, String vaultName,
+ String privateEndpointConnectionName, PrivateEndpointConnectionInner properties, Context context);
+
+ /**
+ * Updates the specified private endpoint connection associated with the key vault.
+ *
+ * @param resourceGroupName Name of the resource group that contains the key vault.
+ * @param vaultName The name of the key vault.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the key vault.
+ * @param properties The intended state of private endpoint connection.
+ * @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 private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner put(String resourceGroupName, String vaultName, String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the key vault.
+ *
+ * @param resourceGroupName Name of the resource group that contains the key vault.
+ * @param vaultName The name of the key vault.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the key vault.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionInner>
+ beginDelete(String resourceGroupName, String vaultName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the key vault.
+ *
+ * @param resourceGroupName Name of the resource group that contains the key vault.
+ * @param vaultName The name of the key vault.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the key vault.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionInner>
+ beginDelete(String resourceGroupName, String vaultName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the key vault.
+ *
+ * @param resourceGroupName Name of the resource group that contains the key vault.
+ * @param vaultName The name of the key vault.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the key vault.
+ * @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 private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner delete(String resourceGroupName, String vaultName,
+ String privateEndpointConnectionName);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the key vault.
+ *
+ * @param resourceGroupName Name of the resource group that contains the key vault.
+ * @param vaultName The name of the key vault.
+ * @param privateEndpointConnectionName Name of the private endpoint connection associated with the key vault.
+ * @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 private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner delete(String resourceGroupName, String vaultName,
+ String privateEndpointConnectionName, Context context);
+
+ /**
+ * The List operation gets information about the private endpoint connections associated with the vault.
+ *
+ * @param resourceGroupName Name of the resource group that contains the key vault.
+ * @param vaultName The name of the key vault.
+ * @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 private endpoint connections as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResource(String resourceGroupName, String vaultName);
+
+ /**
+ * The List operation gets information about the private endpoint connections associated with the vault.
+ *
+ * @param resourceGroupName Name of the resource group that contains the key vault.
+ * @param vaultName The name of the key vault.
+ * @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 private endpoint connections as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResource(String resourceGroupName, String vaultName,
+ Context context);
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/PrivateLinkResourcesClient.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/PrivateLinkResourcesClient.java
new file mode 100644
index 000000000000..1a05237c2dde
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/PrivateLinkResourcesClient.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.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.keyvault.generated.fluent.models.PrivateLinkResourceListResultInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient.
+ */
+public interface PrivateLinkResourcesClient {
+ /**
+ * Gets the private link resources supported for the key vault.
+ *
+ * @param resourceGroupName Name of the resource group that contains the key vault.
+ * @param vaultName The name of the key vault.
+ * @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 private link resources supported for the key vault along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listByVaultWithResponse(String resourceGroupName, String vaultName,
+ Context context);
+
+ /**
+ * Gets the private link resources supported for the key vault.
+ *
+ * @param resourceGroupName Name of the resource group that contains the key vault.
+ * @param vaultName The name of the key vault.
+ * @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 private link resources supported for the key vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateLinkResourceListResultInner listByVault(String resourceGroupName, String vaultName);
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/SecretsClient.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/SecretsClient.java
new file mode 100644
index 000000000000..8c1c5995a8a2
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/SecretsClient.java
@@ -0,0 +1,152 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.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.keyvault.generated.fluent.models.SecretInner;
+import com.azure.resourcemanager.keyvault.generated.models.SecretCreateOrUpdateParameters;
+import com.azure.resourcemanager.keyvault.generated.models.SecretPatchParameters;
+
+/**
+ * An instance of this class provides access to all the operations defined in SecretsClient.
+ */
+public interface SecretsClient {
+ /**
+ * Create or update a secret in a key vault in the specified subscription. NOTE: This API is intended for internal
+ * use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @param vaultName Name of the vault.
+ * @param secretName Name of the secret. The value you provide may be copied globally for the purpose of running the
+ * service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters Parameters to create or update the secret.
+ * @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 resource information with extended details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName, String vaultName, String secretName,
+ SecretCreateOrUpdateParameters parameters, Context context);
+
+ /**
+ * Create or update a secret in a key vault in the specified subscription. NOTE: This API is intended for internal
+ * use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @param vaultName Name of the vault.
+ * @param secretName Name of the secret. The value you provide may be copied globally for the purpose of running the
+ * service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters Parameters to create or update the secret.
+ * @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 resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SecretInner createOrUpdate(String resourceGroupName, String vaultName, String secretName,
+ SecretCreateOrUpdateParameters parameters);
+
+ /**
+ * Update a secret in the specified subscription. NOTE: This API is intended for internal use in ARM deployments.
+ * Users should use the data-plane REST service for interaction with vault secrets.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @param vaultName Name of the vault.
+ * @param secretName Name of the secret.
+ * @param parameters Parameters to patch the secret.
+ * @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 resource information with extended details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName, String vaultName, String secretName,
+ SecretPatchParameters parameters, Context context);
+
+ /**
+ * Update a secret in the specified subscription. NOTE: This API is intended for internal use in ARM deployments.
+ * Users should use the data-plane REST service for interaction with vault secrets.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @param vaultName Name of the vault.
+ * @param secretName Name of the secret.
+ * @param parameters Parameters to patch the secret.
+ * @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 resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SecretInner update(String resourceGroupName, String vaultName, String secretName, SecretPatchParameters parameters);
+
+ /**
+ * Gets the specified secret. NOTE: This API is intended for internal use in ARM deployments. Users should use the
+ * data-plane REST service for interaction with vault secrets.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @param vaultName The name of the vault.
+ * @param secretName The name of the secret.
+ * @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 specified secret along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String vaultName, String secretName,
+ Context context);
+
+ /**
+ * Gets the specified secret. NOTE: This API is intended for internal use in ARM deployments. Users should use the
+ * data-plane REST service for interaction with vault secrets.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @param vaultName The name of the vault.
+ * @param secretName The name of the secret.
+ * @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 specified secret.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SecretInner get(String resourceGroupName, String vaultName, String secretName);
+
+ /**
+ * The List operation gets information about the secrets in a vault. NOTE: This API is intended for internal use in
+ * ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @param vaultName The name of the vault.
+ * @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 secrets as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName);
+
+ /**
+ * The List operation gets information about the secrets in a vault. NOTE: This API is intended for internal use in
+ * ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @param vaultName The name of the vault.
+ * @param top Maximum number of results to return.
+ * @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 secrets as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName, Integer top, Context context);
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/VaultsClient.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/VaultsClient.java
new file mode 100644
index 000000000000..93ccc90ecd5d
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/VaultsClient.java
@@ -0,0 +1,260 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.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.management.Resource;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.CheckNameAvailabilityResultInner;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.DeletedVaultInner;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.VaultAccessPolicyParametersInner;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.VaultInner;
+import com.azure.resourcemanager.keyvault.generated.models.AccessPolicyUpdateKind;
+import com.azure.resourcemanager.keyvault.generated.models.VaultCheckNameAvailabilityParameters;
+
+/**
+ * An instance of this class provides access to all the operations defined in VaultsClient.
+ */
+public interface VaultsClient {
+ /**
+ * Update access policies in a key vault in the specified subscription.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @param vaultName Name of the vault.
+ * @param operationKind Name of the operation.
+ * @param parameters Access policy to merge into the vault.
+ * @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 parameters for updating the access policy in a vault along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateAccessPolicyWithResponse(String resourceGroupName,
+ String vaultName, AccessPolicyUpdateKind operationKind, VaultAccessPolicyParametersInner parameters,
+ Context context);
+
+ /**
+ * Update access policies in a key vault in the specified subscription.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @param vaultName Name of the vault.
+ * @param operationKind Name of the operation.
+ * @param parameters Access policy to merge into the vault.
+ * @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 parameters for updating the access policy in a vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VaultAccessPolicyParametersInner updateAccessPolicy(String resourceGroupName, String vaultName,
+ AccessPolicyUpdateKind operationKind, VaultAccessPolicyParametersInner parameters);
+
+ /**
+ * The List operation gets information about the vaults associated with the subscription and within the specified
+ * resource group.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault 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 list of vaults as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * The List operation gets information about the vaults associated with the subscription and within the specified
+ * resource group.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @param top Maximum number of results to return.
+ * @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 vaults as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Integer top, Context context);
+
+ /**
+ * The List operation gets information about the vaults associated with the 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 list of vaults as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySubscription();
+
+ /**
+ * The List operation gets information about the vaults associated with the subscription.
+ *
+ * @param top Maximum number of results to return.
+ * @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 vaults as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySubscription(Integer top, Context context);
+
+ /**
+ * Gets information about the deleted vaults in 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 information about the deleted vaults in a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listDeleted();
+
+ /**
+ * Gets information about the deleted vaults in 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 information about the deleted vaults in a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listDeleted(Context context);
+
+ /**
+ * Gets the deleted Azure key vault.
+ *
+ * @param vaultName The name of the vault.
+ * @param location The location of the deleted vault.
+ * @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 deleted Azure key vault along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getDeletedWithResponse(String vaultName, String location, Context context);
+
+ /**
+ * Gets the deleted Azure key vault.
+ *
+ * @param vaultName The name of the vault.
+ * @param location The location of the deleted vault.
+ * @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 deleted Azure key vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeletedVaultInner getDeleted(String vaultName, String location);
+
+ /**
+ * Permanently deletes the specified vault. aka Purges the deleted Azure key vault.
+ *
+ * @param vaultName The name of the soft-deleted vault.
+ * @param location The location of the soft-deleted vault.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginPurgeDeleted(String vaultName, String location);
+
+ /**
+ * Permanently deletes the specified vault. aka Purges the deleted Azure key vault.
+ *
+ * @param vaultName The name of the soft-deleted vault.
+ * @param location The location of the soft-deleted vault.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginPurgeDeleted(String vaultName, String location, Context context);
+
+ /**
+ * Permanently deletes the specified vault. aka Purges the deleted Azure key vault.
+ *
+ * @param vaultName The name of the soft-deleted vault.
+ * @param location The location of the soft-deleted vault.
+ * @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 purgeDeleted(String vaultName, String location);
+
+ /**
+ * Permanently deletes the specified vault. aka Purges the deleted Azure key vault.
+ *
+ * @param vaultName The name of the soft-deleted vault.
+ * @param location The location of the soft-deleted vault.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void purgeDeleted(String vaultName, String location, Context context);
+
+ /**
+ * The List operation gets information about the vaults associated with the 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 list of vault resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * The List operation gets information about the vaults associated with the subscription.
+ *
+ * @param top Maximum number of results to return.
+ * @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 vault resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Integer top, Context context);
+
+ /**
+ * Checks that the vault name is valid and is not already in use.
+ *
+ * @param vaultName The name of the vault.
+ * @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 CheckNameAvailability operation response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response
+ checkNameAvailabilityWithResponse(VaultCheckNameAvailabilityParameters vaultName, Context context);
+
+ /**
+ * Checks that the vault name is valid and is not already in use.
+ *
+ * @param vaultName The name of the vault.
+ * @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 CheckNameAvailability operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CheckNameAvailabilityResultInner checkNameAvailability(VaultCheckNameAvailabilityParameters vaultName);
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/CheckMhsmNameAvailabilityResultInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/CheckMhsmNameAvailabilityResultInner.java
new file mode 100644
index 000000000000..ab83dd91ff49
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/CheckMhsmNameAvailabilityResultInner.java
@@ -0,0 +1,121 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.Reason;
+import java.io.IOException;
+
+/**
+ * The CheckMhsmNameAvailability operation response.
+ */
+@Immutable
+public final class CheckMhsmNameAvailabilityResultInner
+ implements JsonSerializable {
+ /*
+ * A boolean value that indicates whether the name is available for you to use. If true, the name is available. If
+ * false, the name has already been taken or is invalid and cannot be used.
+ */
+ private Boolean nameAvailable;
+
+ /*
+ * The reason that a managed hsm name could not be used. The reason element is only returned if NameAvailable is
+ * false.
+ */
+ private Reason reason;
+
+ /*
+ * An error message explaining the Reason value in more detail.
+ */
+ private String message;
+
+ /**
+ * Creates an instance of CheckMhsmNameAvailabilityResultInner class.
+ */
+ public CheckMhsmNameAvailabilityResultInner() {
+ }
+
+ /**
+ * Get the nameAvailable property: A boolean value that indicates whether the name is available for you to use. If
+ * true, the name is available. If false, the name has already been taken or is invalid and cannot be used.
+ *
+ * @return the nameAvailable value.
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Get the reason property: The reason that a managed hsm name could not be used. The reason element is only
+ * returned if NameAvailable is false.
+ *
+ * @return the reason value.
+ */
+ public Reason reason() {
+ return this.reason;
+ }
+
+ /**
+ * Get the message property: An error message explaining the Reason value in more detail.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CheckMhsmNameAvailabilityResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CheckMhsmNameAvailabilityResultInner if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CheckMhsmNameAvailabilityResultInner.
+ */
+ public static CheckMhsmNameAvailabilityResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CheckMhsmNameAvailabilityResultInner deserializedCheckMhsmNameAvailabilityResultInner
+ = new CheckMhsmNameAvailabilityResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("nameAvailable".equals(fieldName)) {
+ deserializedCheckMhsmNameAvailabilityResultInner.nameAvailable
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("reason".equals(fieldName)) {
+ deserializedCheckMhsmNameAvailabilityResultInner.reason = Reason.fromString(reader.getString());
+ } else if ("message".equals(fieldName)) {
+ deserializedCheckMhsmNameAvailabilityResultInner.message = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCheckMhsmNameAvailabilityResultInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/CheckNameAvailabilityResultInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/CheckNameAvailabilityResultInner.java
new file mode 100644
index 000000000000..cf8644ab3ac2
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/CheckNameAvailabilityResultInner.java
@@ -0,0 +1,119 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.Reason;
+import java.io.IOException;
+
+/**
+ * The CheckNameAvailability operation response.
+ */
+@Immutable
+public final class CheckNameAvailabilityResultInner implements JsonSerializable {
+ /*
+ * A boolean value that indicates whether the name is available for you to use. If true, the name is available. If
+ * false, the name has already been taken or is invalid and cannot be used.
+ */
+ private Boolean nameAvailable;
+
+ /*
+ * The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false.
+ */
+ private Reason reason;
+
+ /*
+ * An error message explaining the Reason value in more detail.
+ */
+ private String message;
+
+ /**
+ * Creates an instance of CheckNameAvailabilityResultInner class.
+ */
+ public CheckNameAvailabilityResultInner() {
+ }
+
+ /**
+ * Get the nameAvailable property: A boolean value that indicates whether the name is available for you to use. If
+ * true, the name is available. If false, the name has already been taken or is invalid and cannot be used.
+ *
+ * @return the nameAvailable value.
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Get the reason property: The reason that a vault name could not be used. The Reason element is only returned if
+ * NameAvailable is false.
+ *
+ * @return the reason value.
+ */
+ public Reason reason() {
+ return this.reason;
+ }
+
+ /**
+ * Get the message property: An error message explaining the Reason value in more detail.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CheckNameAvailabilityResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CheckNameAvailabilityResultInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CheckNameAvailabilityResultInner.
+ */
+ public static CheckNameAvailabilityResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CheckNameAvailabilityResultInner deserializedCheckNameAvailabilityResultInner
+ = new CheckNameAvailabilityResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("nameAvailable".equals(fieldName)) {
+ deserializedCheckNameAvailabilityResultInner.nameAvailable
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("reason".equals(fieldName)) {
+ deserializedCheckNameAvailabilityResultInner.reason = Reason.fromString(reader.getString());
+ } else if ("message".equals(fieldName)) {
+ deserializedCheckNameAvailabilityResultInner.message = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCheckNameAvailabilityResultInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/DeletedManagedHsmInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/DeletedManagedHsmInner.java
new file mode 100644
index 000000000000..c31eca0ca21e
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/DeletedManagedHsmInner.java
@@ -0,0 +1,145 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.DeletedManagedHsmProperties;
+import java.io.IOException;
+
+/**
+ * The DeletedManagedHsm model.
+ */
+@Fluent
+public final class DeletedManagedHsmInner implements JsonSerializable {
+ /*
+ * The Azure Resource Manager resource ID for the deleted managed HSM Pool.
+ */
+ private String id;
+
+ /*
+ * The name of the managed HSM Pool.
+ */
+ private String name;
+
+ /*
+ * The resource type of the managed HSM Pool.
+ */
+ private String type;
+
+ /*
+ * Properties of the deleted managed HSM
+ */
+ private DeletedManagedHsmProperties properties;
+
+ /**
+ * Creates an instance of DeletedManagedHsmInner class.
+ */
+ public DeletedManagedHsmInner() {
+ }
+
+ /**
+ * Get the id property: The Azure Resource Manager resource ID for the deleted managed HSM Pool.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the managed HSM Pool.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The resource type of the managed HSM Pool.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the properties property: Properties of the deleted managed HSM.
+ *
+ * @return the properties value.
+ */
+ public DeletedManagedHsmProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of the deleted managed HSM.
+ *
+ * @param properties the properties value to set.
+ * @return the DeletedManagedHsmInner object itself.
+ */
+ public DeletedManagedHsmInner withProperties(DeletedManagedHsmProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DeletedManagedHsmInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DeletedManagedHsmInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DeletedManagedHsmInner.
+ */
+ public static DeletedManagedHsmInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DeletedManagedHsmInner deserializedDeletedManagedHsmInner = new DeletedManagedHsmInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedDeletedManagedHsmInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedDeletedManagedHsmInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedDeletedManagedHsmInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedDeletedManagedHsmInner.properties = DeletedManagedHsmProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDeletedManagedHsmInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/DeletedVaultInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/DeletedVaultInner.java
new file mode 100644
index 000000000000..2f59c3f93b2b
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/DeletedVaultInner.java
@@ -0,0 +1,145 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.DeletedVaultProperties;
+import java.io.IOException;
+
+/**
+ * Deleted vault information with extended details.
+ */
+@Fluent
+public final class DeletedVaultInner implements JsonSerializable {
+ /*
+ * The resource ID for the deleted key vault.
+ */
+ private String id;
+
+ /*
+ * The name of the key vault.
+ */
+ private String name;
+
+ /*
+ * The resource type of the key vault.
+ */
+ private String type;
+
+ /*
+ * Properties of the vault
+ */
+ private DeletedVaultProperties properties;
+
+ /**
+ * Creates an instance of DeletedVaultInner class.
+ */
+ public DeletedVaultInner() {
+ }
+
+ /**
+ * Get the id property: The resource ID for the deleted key vault.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the key vault.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The resource type of the key vault.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the properties property: Properties of the vault.
+ *
+ * @return the properties value.
+ */
+ public DeletedVaultProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of the vault.
+ *
+ * @param properties the properties value to set.
+ * @return the DeletedVaultInner object itself.
+ */
+ public DeletedVaultInner withProperties(DeletedVaultProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DeletedVaultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DeletedVaultInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DeletedVaultInner.
+ */
+ public static DeletedVaultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DeletedVaultInner deserializedDeletedVaultInner = new DeletedVaultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedDeletedVaultInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedDeletedVaultInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedDeletedVaultInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedDeletedVaultInner.properties = DeletedVaultProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDeletedVaultInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/KeyInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/KeyInner.java
new file mode 100644
index 000000000000..b1feba32c6ed
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/KeyInner.java
@@ -0,0 +1,359 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyCurveName;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyOperation;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyType;
+import com.azure.resourcemanager.keyvault.generated.models.KeyAttributes;
+import com.azure.resourcemanager.keyvault.generated.models.KeyReleasePolicy;
+import com.azure.resourcemanager.keyvault.generated.models.RotationPolicy;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The key resource.
+ */
+@Fluent
+public final class KeyInner extends Resource {
+ /*
+ * The properties of the key.
+ */
+ private KeyProperties innerProperties = new KeyProperties();
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of KeyInner class.
+ */
+ public KeyInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of the key.
+ *
+ * @return the innerProperties value.
+ */
+ private KeyProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public KeyInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public KeyInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the attributes property: The attributes of the key.
+ *
+ * @return the attributes value.
+ */
+ public KeyAttributes attributes() {
+ return this.innerProperties() == null ? null : this.innerProperties().attributes();
+ }
+
+ /**
+ * Set the attributes property: The attributes of the key.
+ *
+ * @param attributes the attributes value to set.
+ * @return the KeyInner object itself.
+ */
+ public KeyInner withAttributes(KeyAttributes attributes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new KeyProperties();
+ }
+ this.innerProperties().withAttributes(attributes);
+ return this;
+ }
+
+ /**
+ * Get the kty property: The type of the key. For valid values, see JsonWebKeyType.
+ *
+ * @return the kty value.
+ */
+ public JsonWebKeyType kty() {
+ return this.innerProperties() == null ? null : this.innerProperties().kty();
+ }
+
+ /**
+ * Set the kty property: The type of the key. For valid values, see JsonWebKeyType.
+ *
+ * @param kty the kty value to set.
+ * @return the KeyInner object itself.
+ */
+ public KeyInner withKty(JsonWebKeyType kty) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new KeyProperties();
+ }
+ this.innerProperties().withKty(kty);
+ return this;
+ }
+
+ /**
+ * Get the keyOps property: The keyOps property.
+ *
+ * @return the keyOps value.
+ */
+ public List keyOps() {
+ return this.innerProperties() == null ? null : this.innerProperties().keyOps();
+ }
+
+ /**
+ * Set the keyOps property: The keyOps property.
+ *
+ * @param keyOps the keyOps value to set.
+ * @return the KeyInner object itself.
+ */
+ public KeyInner withKeyOps(List keyOps) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new KeyProperties();
+ }
+ this.innerProperties().withKeyOps(keyOps);
+ return this;
+ }
+
+ /**
+ * Get the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA.
+ *
+ * @return the keySize value.
+ */
+ public Integer keySize() {
+ return this.innerProperties() == null ? null : this.innerProperties().keySize();
+ }
+
+ /**
+ * Set the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA.
+ *
+ * @param keySize the keySize value to set.
+ * @return the KeyInner object itself.
+ */
+ public KeyInner withKeySize(Integer keySize) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new KeyProperties();
+ }
+ this.innerProperties().withKeySize(keySize);
+ return this;
+ }
+
+ /**
+ * Get the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName.
+ *
+ * @return the curveName value.
+ */
+ public JsonWebKeyCurveName curveName() {
+ return this.innerProperties() == null ? null : this.innerProperties().curveName();
+ }
+
+ /**
+ * Set the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName.
+ *
+ * @param curveName the curveName value to set.
+ * @return the KeyInner object itself.
+ */
+ public KeyInner withCurveName(JsonWebKeyCurveName curveName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new KeyProperties();
+ }
+ this.innerProperties().withCurveName(curveName);
+ return this;
+ }
+
+ /**
+ * Get the keyUri property: The URI to retrieve the current version of the key.
+ *
+ * @return the keyUri value.
+ */
+ public String keyUri() {
+ return this.innerProperties() == null ? null : this.innerProperties().keyUri();
+ }
+
+ /**
+ * Get the keyUriWithVersion property: The URI to retrieve the specific version of the key.
+ *
+ * @return the keyUriWithVersion value.
+ */
+ public String keyUriWithVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().keyUriWithVersion();
+ }
+
+ /**
+ * Get the rotationPolicy property: Key rotation policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @return the rotationPolicy value.
+ */
+ public RotationPolicy rotationPolicy() {
+ return this.innerProperties() == null ? null : this.innerProperties().rotationPolicy();
+ }
+
+ /**
+ * Set the rotationPolicy property: Key rotation policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @param rotationPolicy the rotationPolicy value to set.
+ * @return the KeyInner object itself.
+ */
+ public KeyInner withRotationPolicy(RotationPolicy rotationPolicy) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new KeyProperties();
+ }
+ this.innerProperties().withRotationPolicy(rotationPolicy);
+ return this;
+ }
+
+ /**
+ * Get the releasePolicy property: Key release policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @return the releasePolicy value.
+ */
+ public KeyReleasePolicy releasePolicy() {
+ return this.innerProperties() == null ? null : this.innerProperties().releasePolicy();
+ }
+
+ /**
+ * Set the releasePolicy property: Key release policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @param releasePolicy the releasePolicy value to set.
+ * @return the KeyInner object itself.
+ */
+ public KeyInner withReleasePolicy(KeyReleasePolicy releasePolicy) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new KeyProperties();
+ }
+ this.innerProperties().withReleasePolicy(releasePolicy);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property innerProperties in model KeyInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(KeyInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of KeyInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of KeyInner if the JsonReader was pointing to an instance of it, or null if it was pointing
+ * to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the KeyInner.
+ */
+ public static KeyInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ KeyInner deserializedKeyInner = new KeyInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedKeyInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedKeyInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedKeyInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedKeyInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedKeyInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedKeyInner.innerProperties = KeyProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedKeyInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/KeyProperties.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/KeyProperties.java
new file mode 100644
index 000000000000..d0f5a0e8948f
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/KeyProperties.java
@@ -0,0 +1,316 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyCurveName;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyOperation;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyType;
+import com.azure.resourcemanager.keyvault.generated.models.KeyAttributes;
+import com.azure.resourcemanager.keyvault.generated.models.KeyReleasePolicy;
+import com.azure.resourcemanager.keyvault.generated.models.RotationPolicy;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The properties of the key.
+ */
+@Fluent
+public final class KeyProperties implements JsonSerializable {
+ /*
+ * The attributes of the key.
+ */
+ private KeyAttributes attributes;
+
+ /*
+ * The type of the key. For valid values, see JsonWebKeyType.
+ */
+ private JsonWebKeyType kty;
+
+ /*
+ * The keyOps property.
+ */
+ private List keyOps;
+
+ /*
+ * The key size in bits. For example: 2048, 3072, or 4096 for RSA.
+ */
+ private Integer keySize;
+
+ /*
+ * The elliptic curve name. For valid values, see JsonWebKeyCurveName.
+ */
+ private JsonWebKeyCurveName curveName;
+
+ /*
+ * The URI to retrieve the current version of the key.
+ */
+ private String keyUri;
+
+ /*
+ * The URI to retrieve the specific version of the key.
+ */
+ private String keyUriWithVersion;
+
+ /*
+ * Key rotation policy in response. It will be used for both output and input. Omitted if empty
+ */
+ private RotationPolicy rotationPolicy;
+
+ /*
+ * Key release policy in response. It will be used for both output and input. Omitted if empty
+ */
+ private KeyReleasePolicy releasePolicy;
+
+ /**
+ * Creates an instance of KeyProperties class.
+ */
+ public KeyProperties() {
+ }
+
+ /**
+ * Get the attributes property: The attributes of the key.
+ *
+ * @return the attributes value.
+ */
+ public KeyAttributes attributes() {
+ return this.attributes;
+ }
+
+ /**
+ * Set the attributes property: The attributes of the key.
+ *
+ * @param attributes the attributes value to set.
+ * @return the KeyProperties object itself.
+ */
+ public KeyProperties withAttributes(KeyAttributes attributes) {
+ this.attributes = attributes;
+ return this;
+ }
+
+ /**
+ * Get the kty property: The type of the key. For valid values, see JsonWebKeyType.
+ *
+ * @return the kty value.
+ */
+ public JsonWebKeyType kty() {
+ return this.kty;
+ }
+
+ /**
+ * Set the kty property: The type of the key. For valid values, see JsonWebKeyType.
+ *
+ * @param kty the kty value to set.
+ * @return the KeyProperties object itself.
+ */
+ public KeyProperties withKty(JsonWebKeyType kty) {
+ this.kty = kty;
+ return this;
+ }
+
+ /**
+ * Get the keyOps property: The keyOps property.
+ *
+ * @return the keyOps value.
+ */
+ public List keyOps() {
+ return this.keyOps;
+ }
+
+ /**
+ * Set the keyOps property: The keyOps property.
+ *
+ * @param keyOps the keyOps value to set.
+ * @return the KeyProperties object itself.
+ */
+ public KeyProperties withKeyOps(List keyOps) {
+ this.keyOps = keyOps;
+ return this;
+ }
+
+ /**
+ * Get the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA.
+ *
+ * @return the keySize value.
+ */
+ public Integer keySize() {
+ return this.keySize;
+ }
+
+ /**
+ * Set the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA.
+ *
+ * @param keySize the keySize value to set.
+ * @return the KeyProperties object itself.
+ */
+ public KeyProperties withKeySize(Integer keySize) {
+ this.keySize = keySize;
+ return this;
+ }
+
+ /**
+ * Get the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName.
+ *
+ * @return the curveName value.
+ */
+ public JsonWebKeyCurveName curveName() {
+ return this.curveName;
+ }
+
+ /**
+ * Set the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName.
+ *
+ * @param curveName the curveName value to set.
+ * @return the KeyProperties object itself.
+ */
+ public KeyProperties withCurveName(JsonWebKeyCurveName curveName) {
+ this.curveName = curveName;
+ return this;
+ }
+
+ /**
+ * Get the keyUri property: The URI to retrieve the current version of the key.
+ *
+ * @return the keyUri value.
+ */
+ public String keyUri() {
+ return this.keyUri;
+ }
+
+ /**
+ * Get the keyUriWithVersion property: The URI to retrieve the specific version of the key.
+ *
+ * @return the keyUriWithVersion value.
+ */
+ public String keyUriWithVersion() {
+ return this.keyUriWithVersion;
+ }
+
+ /**
+ * Get the rotationPolicy property: Key rotation policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @return the rotationPolicy value.
+ */
+ public RotationPolicy rotationPolicy() {
+ return this.rotationPolicy;
+ }
+
+ /**
+ * Set the rotationPolicy property: Key rotation policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @param rotationPolicy the rotationPolicy value to set.
+ * @return the KeyProperties object itself.
+ */
+ public KeyProperties withRotationPolicy(RotationPolicy rotationPolicy) {
+ this.rotationPolicy = rotationPolicy;
+ return this;
+ }
+
+ /**
+ * Get the releasePolicy property: Key release policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @return the releasePolicy value.
+ */
+ public KeyReleasePolicy releasePolicy() {
+ return this.releasePolicy;
+ }
+
+ /**
+ * Set the releasePolicy property: Key release policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @param releasePolicy the releasePolicy value to set.
+ * @return the KeyProperties object itself.
+ */
+ public KeyProperties withReleasePolicy(KeyReleasePolicy releasePolicy) {
+ this.releasePolicy = releasePolicy;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (attributes() != null) {
+ attributes().validate();
+ }
+ if (rotationPolicy() != null) {
+ rotationPolicy().validate();
+ }
+ if (releasePolicy() != null) {
+ releasePolicy().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("attributes", this.attributes);
+ jsonWriter.writeStringField("kty", this.kty == null ? null : this.kty.toString());
+ jsonWriter.writeArrayField("keyOps", this.keyOps,
+ (writer, element) -> writer.writeString(element == null ? null : element.toString()));
+ jsonWriter.writeNumberField("keySize", this.keySize);
+ jsonWriter.writeStringField("curveName", this.curveName == null ? null : this.curveName.toString());
+ jsonWriter.writeJsonField("rotationPolicy", this.rotationPolicy);
+ jsonWriter.writeJsonField("release_policy", this.releasePolicy);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of KeyProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of KeyProperties if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the KeyProperties.
+ */
+ public static KeyProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ KeyProperties deserializedKeyProperties = new KeyProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("attributes".equals(fieldName)) {
+ deserializedKeyProperties.attributes = KeyAttributes.fromJson(reader);
+ } else if ("kty".equals(fieldName)) {
+ deserializedKeyProperties.kty = JsonWebKeyType.fromString(reader.getString());
+ } else if ("keyOps".equals(fieldName)) {
+ List keyOps
+ = reader.readArray(reader1 -> JsonWebKeyOperation.fromString(reader1.getString()));
+ deserializedKeyProperties.keyOps = keyOps;
+ } else if ("keySize".equals(fieldName)) {
+ deserializedKeyProperties.keySize = reader.getNullable(JsonReader::getInt);
+ } else if ("curveName".equals(fieldName)) {
+ deserializedKeyProperties.curveName = JsonWebKeyCurveName.fromString(reader.getString());
+ } else if ("keyUri".equals(fieldName)) {
+ deserializedKeyProperties.keyUri = reader.getString();
+ } else if ("keyUriWithVersion".equals(fieldName)) {
+ deserializedKeyProperties.keyUriWithVersion = reader.getString();
+ } else if ("rotationPolicy".equals(fieldName)) {
+ deserializedKeyProperties.rotationPolicy = RotationPolicy.fromJson(reader);
+ } else if ("release_policy".equals(fieldName)) {
+ deserializedKeyProperties.releasePolicy = KeyReleasePolicy.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedKeyProperties;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/ManagedHsmInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/ManagedHsmInner.java
new file mode 100644
index 000000000000..013825de869d
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/ManagedHsmInner.java
@@ -0,0 +1,226 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmProperties;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmResource;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmSku;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedServiceIdentity;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Resource information with extended details.
+ */
+@Fluent
+public final class ManagedHsmInner extends ManagedHsmResource {
+ /*
+ * Properties of the managed HSM
+ */
+ private ManagedHsmProperties properties;
+
+ /*
+ * Metadata pertaining to creation and last modification of the key vault resource.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of ManagedHsmInner class.
+ */
+ public ManagedHsmInner() {
+ }
+
+ /**
+ * Get the properties property: Properties of the managed HSM.
+ *
+ * @return the properties value.
+ */
+ public ManagedHsmProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of the managed HSM.
+ *
+ * @param properties the properties value to set.
+ * @return the ManagedHsmInner object itself.
+ */
+ public ManagedHsmInner withProperties(ManagedHsmProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the key vault resource.
+ *
+ * @return the systemData value.
+ */
+ @Override
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ManagedHsmInner withSku(ManagedHsmSku sku) {
+ super.withSku(sku);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ManagedHsmInner withIdentity(ManagedServiceIdentity identity) {
+ super.withIdentity(identity);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ManagedHsmInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ManagedHsmInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ if (sku() != null) {
+ sku().validate();
+ }
+ if (identity() != null) {
+ identity().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("sku", sku());
+ jsonWriter.writeJsonField("identity", identity());
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ManagedHsmInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ManagedHsmInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ManagedHsmInner.
+ */
+ public static ManagedHsmInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ManagedHsmInner deserializedManagedHsmInner = new ManagedHsmInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedManagedHsmInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedManagedHsmInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedManagedHsmInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedManagedHsmInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedManagedHsmInner.withTags(tags);
+ } else if ("sku".equals(fieldName)) {
+ deserializedManagedHsmInner.withSku(ManagedHsmSku.fromJson(reader));
+ } else if ("systemData".equals(fieldName)) {
+ deserializedManagedHsmInner.systemData = SystemData.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedManagedHsmInner.withIdentity(ManagedServiceIdentity.fromJson(reader));
+ } else if ("properties".equals(fieldName)) {
+ deserializedManagedHsmInner.properties = ManagedHsmProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedManagedHsmInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/ManagedHsmKeyInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/ManagedHsmKeyInner.java
new file mode 100644
index 000000000000..53c9d93c2b34
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/ManagedHsmKeyInner.java
@@ -0,0 +1,349 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyCurveName;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyOperation;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyType;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmKeyAttributes;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmKeyReleasePolicy;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmRotationPolicy;
+import com.azure.resourcemanager.keyvault.generated.models.ProxyResourceWithoutSystemData;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The key resource.
+ */
+@Fluent
+public final class ManagedHsmKeyInner extends ProxyResourceWithoutSystemData {
+ /*
+ * The properties of the key.
+ */
+ private ManagedHsmKeyProperties innerProperties = new ManagedHsmKeyProperties();
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of ManagedHsmKeyInner class.
+ */
+ public ManagedHsmKeyInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of the key.
+ *
+ * @return the innerProperties value.
+ */
+ private ManagedHsmKeyProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ManagedHsmKeyInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the attributes property: The attributes of the key.
+ *
+ * @return the attributes value.
+ */
+ public ManagedHsmKeyAttributes attributes() {
+ return this.innerProperties() == null ? null : this.innerProperties().attributes();
+ }
+
+ /**
+ * Set the attributes property: The attributes of the key.
+ *
+ * @param attributes the attributes value to set.
+ * @return the ManagedHsmKeyInner object itself.
+ */
+ public ManagedHsmKeyInner withAttributes(ManagedHsmKeyAttributes attributes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagedHsmKeyProperties();
+ }
+ this.innerProperties().withAttributes(attributes);
+ return this;
+ }
+
+ /**
+ * Get the kty property: The type of the key. For valid values, see JsonWebKeyType.
+ *
+ * @return the kty value.
+ */
+ public JsonWebKeyType kty() {
+ return this.innerProperties() == null ? null : this.innerProperties().kty();
+ }
+
+ /**
+ * Set the kty property: The type of the key. For valid values, see JsonWebKeyType.
+ *
+ * @param kty the kty value to set.
+ * @return the ManagedHsmKeyInner object itself.
+ */
+ public ManagedHsmKeyInner withKty(JsonWebKeyType kty) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagedHsmKeyProperties();
+ }
+ this.innerProperties().withKty(kty);
+ return this;
+ }
+
+ /**
+ * Get the keyOps property: The keyOps property.
+ *
+ * @return the keyOps value.
+ */
+ public List keyOps() {
+ return this.innerProperties() == null ? null : this.innerProperties().keyOps();
+ }
+
+ /**
+ * Set the keyOps property: The keyOps property.
+ *
+ * @param keyOps the keyOps value to set.
+ * @return the ManagedHsmKeyInner object itself.
+ */
+ public ManagedHsmKeyInner withKeyOps(List keyOps) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagedHsmKeyProperties();
+ }
+ this.innerProperties().withKeyOps(keyOps);
+ return this;
+ }
+
+ /**
+ * Get the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA.
+ *
+ * @return the keySize value.
+ */
+ public Integer keySize() {
+ return this.innerProperties() == null ? null : this.innerProperties().keySize();
+ }
+
+ /**
+ * Set the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA.
+ *
+ * @param keySize the keySize value to set.
+ * @return the ManagedHsmKeyInner object itself.
+ */
+ public ManagedHsmKeyInner withKeySize(Integer keySize) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagedHsmKeyProperties();
+ }
+ this.innerProperties().withKeySize(keySize);
+ return this;
+ }
+
+ /**
+ * Get the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName.
+ *
+ * @return the curveName value.
+ */
+ public JsonWebKeyCurveName curveName() {
+ return this.innerProperties() == null ? null : this.innerProperties().curveName();
+ }
+
+ /**
+ * Set the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName.
+ *
+ * @param curveName the curveName value to set.
+ * @return the ManagedHsmKeyInner object itself.
+ */
+ public ManagedHsmKeyInner withCurveName(JsonWebKeyCurveName curveName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagedHsmKeyProperties();
+ }
+ this.innerProperties().withCurveName(curveName);
+ return this;
+ }
+
+ /**
+ * Get the keyUri property: The URI to retrieve the current version of the key.
+ *
+ * @return the keyUri value.
+ */
+ public String keyUri() {
+ return this.innerProperties() == null ? null : this.innerProperties().keyUri();
+ }
+
+ /**
+ * Get the keyUriWithVersion property: The URI to retrieve the specific version of the key.
+ *
+ * @return the keyUriWithVersion value.
+ */
+ public String keyUriWithVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().keyUriWithVersion();
+ }
+
+ /**
+ * Get the rotationPolicy property: Key rotation policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @return the rotationPolicy value.
+ */
+ public ManagedHsmRotationPolicy rotationPolicy() {
+ return this.innerProperties() == null ? null : this.innerProperties().rotationPolicy();
+ }
+
+ /**
+ * Set the rotationPolicy property: Key rotation policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @param rotationPolicy the rotationPolicy value to set.
+ * @return the ManagedHsmKeyInner object itself.
+ */
+ public ManagedHsmKeyInner withRotationPolicy(ManagedHsmRotationPolicy rotationPolicy) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagedHsmKeyProperties();
+ }
+ this.innerProperties().withRotationPolicy(rotationPolicy);
+ return this;
+ }
+
+ /**
+ * Get the releasePolicy property: Key release policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @return the releasePolicy value.
+ */
+ public ManagedHsmKeyReleasePolicy releasePolicy() {
+ return this.innerProperties() == null ? null : this.innerProperties().releasePolicy();
+ }
+
+ /**
+ * Set the releasePolicy property: Key release policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @param releasePolicy the releasePolicy value to set.
+ * @return the ManagedHsmKeyInner object itself.
+ */
+ public ManagedHsmKeyInner withReleasePolicy(ManagedHsmKeyReleasePolicy releasePolicy) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagedHsmKeyProperties();
+ }
+ this.innerProperties().withReleasePolicy(releasePolicy);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ if (innerProperties() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property innerProperties in model ManagedHsmKeyInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ManagedHsmKeyInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ManagedHsmKeyInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ManagedHsmKeyInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ManagedHsmKeyInner.
+ */
+ public static ManagedHsmKeyInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ManagedHsmKeyInner deserializedManagedHsmKeyInner = new ManagedHsmKeyInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedManagedHsmKeyInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedManagedHsmKeyInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedManagedHsmKeyInner.type = reader.getString();
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedManagedHsmKeyInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedManagedHsmKeyInner.innerProperties = ManagedHsmKeyProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedManagedHsmKeyInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/ManagedHsmKeyProperties.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/ManagedHsmKeyProperties.java
new file mode 100644
index 000000000000..160b9b7942e5
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/ManagedHsmKeyProperties.java
@@ -0,0 +1,316 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyCurveName;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyOperation;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyType;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmKeyAttributes;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmKeyReleasePolicy;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmRotationPolicy;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The properties of the key.
+ */
+@Fluent
+public final class ManagedHsmKeyProperties implements JsonSerializable {
+ /*
+ * The attributes of the key.
+ */
+ private ManagedHsmKeyAttributes attributes;
+
+ /*
+ * The type of the key. For valid values, see JsonWebKeyType.
+ */
+ private JsonWebKeyType kty;
+
+ /*
+ * The keyOps property.
+ */
+ private List keyOps;
+
+ /*
+ * The key size in bits. For example: 2048, 3072, or 4096 for RSA.
+ */
+ private Integer keySize;
+
+ /*
+ * The elliptic curve name. For valid values, see JsonWebKeyCurveName.
+ */
+ private JsonWebKeyCurveName curveName;
+
+ /*
+ * The URI to retrieve the current version of the key.
+ */
+ private String keyUri;
+
+ /*
+ * The URI to retrieve the specific version of the key.
+ */
+ private String keyUriWithVersion;
+
+ /*
+ * Key rotation policy in response. It will be used for both output and input. Omitted if empty
+ */
+ private ManagedHsmRotationPolicy rotationPolicy;
+
+ /*
+ * Key release policy in response. It will be used for both output and input. Omitted if empty
+ */
+ private ManagedHsmKeyReleasePolicy releasePolicy;
+
+ /**
+ * Creates an instance of ManagedHsmKeyProperties class.
+ */
+ public ManagedHsmKeyProperties() {
+ }
+
+ /**
+ * Get the attributes property: The attributes of the key.
+ *
+ * @return the attributes value.
+ */
+ public ManagedHsmKeyAttributes attributes() {
+ return this.attributes;
+ }
+
+ /**
+ * Set the attributes property: The attributes of the key.
+ *
+ * @param attributes the attributes value to set.
+ * @return the ManagedHsmKeyProperties object itself.
+ */
+ public ManagedHsmKeyProperties withAttributes(ManagedHsmKeyAttributes attributes) {
+ this.attributes = attributes;
+ return this;
+ }
+
+ /**
+ * Get the kty property: The type of the key. For valid values, see JsonWebKeyType.
+ *
+ * @return the kty value.
+ */
+ public JsonWebKeyType kty() {
+ return this.kty;
+ }
+
+ /**
+ * Set the kty property: The type of the key. For valid values, see JsonWebKeyType.
+ *
+ * @param kty the kty value to set.
+ * @return the ManagedHsmKeyProperties object itself.
+ */
+ public ManagedHsmKeyProperties withKty(JsonWebKeyType kty) {
+ this.kty = kty;
+ return this;
+ }
+
+ /**
+ * Get the keyOps property: The keyOps property.
+ *
+ * @return the keyOps value.
+ */
+ public List keyOps() {
+ return this.keyOps;
+ }
+
+ /**
+ * Set the keyOps property: The keyOps property.
+ *
+ * @param keyOps the keyOps value to set.
+ * @return the ManagedHsmKeyProperties object itself.
+ */
+ public ManagedHsmKeyProperties withKeyOps(List keyOps) {
+ this.keyOps = keyOps;
+ return this;
+ }
+
+ /**
+ * Get the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA.
+ *
+ * @return the keySize value.
+ */
+ public Integer keySize() {
+ return this.keySize;
+ }
+
+ /**
+ * Set the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA.
+ *
+ * @param keySize the keySize value to set.
+ * @return the ManagedHsmKeyProperties object itself.
+ */
+ public ManagedHsmKeyProperties withKeySize(Integer keySize) {
+ this.keySize = keySize;
+ return this;
+ }
+
+ /**
+ * Get the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName.
+ *
+ * @return the curveName value.
+ */
+ public JsonWebKeyCurveName curveName() {
+ return this.curveName;
+ }
+
+ /**
+ * Set the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName.
+ *
+ * @param curveName the curveName value to set.
+ * @return the ManagedHsmKeyProperties object itself.
+ */
+ public ManagedHsmKeyProperties withCurveName(JsonWebKeyCurveName curveName) {
+ this.curveName = curveName;
+ return this;
+ }
+
+ /**
+ * Get the keyUri property: The URI to retrieve the current version of the key.
+ *
+ * @return the keyUri value.
+ */
+ public String keyUri() {
+ return this.keyUri;
+ }
+
+ /**
+ * Get the keyUriWithVersion property: The URI to retrieve the specific version of the key.
+ *
+ * @return the keyUriWithVersion value.
+ */
+ public String keyUriWithVersion() {
+ return this.keyUriWithVersion;
+ }
+
+ /**
+ * Get the rotationPolicy property: Key rotation policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @return the rotationPolicy value.
+ */
+ public ManagedHsmRotationPolicy rotationPolicy() {
+ return this.rotationPolicy;
+ }
+
+ /**
+ * Set the rotationPolicy property: Key rotation policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @param rotationPolicy the rotationPolicy value to set.
+ * @return the ManagedHsmKeyProperties object itself.
+ */
+ public ManagedHsmKeyProperties withRotationPolicy(ManagedHsmRotationPolicy rotationPolicy) {
+ this.rotationPolicy = rotationPolicy;
+ return this;
+ }
+
+ /**
+ * Get the releasePolicy property: Key release policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @return the releasePolicy value.
+ */
+ public ManagedHsmKeyReleasePolicy releasePolicy() {
+ return this.releasePolicy;
+ }
+
+ /**
+ * Set the releasePolicy property: Key release policy in response. It will be used for both output and input.
+ * Omitted if empty.
+ *
+ * @param releasePolicy the releasePolicy value to set.
+ * @return the ManagedHsmKeyProperties object itself.
+ */
+ public ManagedHsmKeyProperties withReleasePolicy(ManagedHsmKeyReleasePolicy releasePolicy) {
+ this.releasePolicy = releasePolicy;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (attributes() != null) {
+ attributes().validate();
+ }
+ if (rotationPolicy() != null) {
+ rotationPolicy().validate();
+ }
+ if (releasePolicy() != null) {
+ releasePolicy().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("attributes", this.attributes);
+ jsonWriter.writeStringField("kty", this.kty == null ? null : this.kty.toString());
+ jsonWriter.writeArrayField("keyOps", this.keyOps,
+ (writer, element) -> writer.writeString(element == null ? null : element.toString()));
+ jsonWriter.writeNumberField("keySize", this.keySize);
+ jsonWriter.writeStringField("curveName", this.curveName == null ? null : this.curveName.toString());
+ jsonWriter.writeJsonField("rotationPolicy", this.rotationPolicy);
+ jsonWriter.writeJsonField("release_policy", this.releasePolicy);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ManagedHsmKeyProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ManagedHsmKeyProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ManagedHsmKeyProperties.
+ */
+ public static ManagedHsmKeyProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ManagedHsmKeyProperties deserializedManagedHsmKeyProperties = new ManagedHsmKeyProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("attributes".equals(fieldName)) {
+ deserializedManagedHsmKeyProperties.attributes = ManagedHsmKeyAttributes.fromJson(reader);
+ } else if ("kty".equals(fieldName)) {
+ deserializedManagedHsmKeyProperties.kty = JsonWebKeyType.fromString(reader.getString());
+ } else if ("keyOps".equals(fieldName)) {
+ List keyOps
+ = reader.readArray(reader1 -> JsonWebKeyOperation.fromString(reader1.getString()));
+ deserializedManagedHsmKeyProperties.keyOps = keyOps;
+ } else if ("keySize".equals(fieldName)) {
+ deserializedManagedHsmKeyProperties.keySize = reader.getNullable(JsonReader::getInt);
+ } else if ("curveName".equals(fieldName)) {
+ deserializedManagedHsmKeyProperties.curveName = JsonWebKeyCurveName.fromString(reader.getString());
+ } else if ("keyUri".equals(fieldName)) {
+ deserializedManagedHsmKeyProperties.keyUri = reader.getString();
+ } else if ("keyUriWithVersion".equals(fieldName)) {
+ deserializedManagedHsmKeyProperties.keyUriWithVersion = reader.getString();
+ } else if ("rotationPolicy".equals(fieldName)) {
+ deserializedManagedHsmKeyProperties.rotationPolicy = ManagedHsmRotationPolicy.fromJson(reader);
+ } else if ("release_policy".equals(fieldName)) {
+ deserializedManagedHsmKeyProperties.releasePolicy = ManagedHsmKeyReleasePolicy.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedManagedHsmKeyProperties;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmGeoReplicatedRegionInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmGeoReplicatedRegionInner.java
new file mode 100644
index 000000000000..9db8f3930003
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmGeoReplicatedRegionInner.java
@@ -0,0 +1,141 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.GeoReplicationRegionProvisioningState;
+import java.io.IOException;
+
+/**
+ * A region that this managed HSM Pool has been extended to.
+ */
+@Fluent
+public final class MhsmGeoReplicatedRegionInner implements JsonSerializable {
+ /*
+ * Name of the geo replicated region.
+ */
+ private String name;
+
+ /*
+ * Provisioning state of the geo replicated region.
+ */
+ private GeoReplicationRegionProvisioningState provisioningState;
+
+ /*
+ * A boolean value that indicates whether the region is the primary region or a secondary region.
+ */
+ private Boolean isPrimary;
+
+ /**
+ * Creates an instance of MhsmGeoReplicatedRegionInner class.
+ */
+ public MhsmGeoReplicatedRegionInner() {
+ }
+
+ /**
+ * Get the name property: Name of the geo replicated region.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name of the geo replicated region.
+ *
+ * @param name the name value to set.
+ * @return the MhsmGeoReplicatedRegionInner object itself.
+ */
+ public MhsmGeoReplicatedRegionInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the geo replicated region.
+ *
+ * @return the provisioningState value.
+ */
+ public GeoReplicationRegionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the isPrimary property: A boolean value that indicates whether the region is the primary region or a
+ * secondary region.
+ *
+ * @return the isPrimary value.
+ */
+ public Boolean isPrimary() {
+ return this.isPrimary;
+ }
+
+ /**
+ * Set the isPrimary property: A boolean value that indicates whether the region is the primary region or a
+ * secondary region.
+ *
+ * @param isPrimary the isPrimary value to set.
+ * @return the MhsmGeoReplicatedRegionInner object itself.
+ */
+ public MhsmGeoReplicatedRegionInner withIsPrimary(Boolean isPrimary) {
+ this.isPrimary = isPrimary;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeBooleanField("isPrimary", this.isPrimary);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MhsmGeoReplicatedRegionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MhsmGeoReplicatedRegionInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MhsmGeoReplicatedRegionInner.
+ */
+ public static MhsmGeoReplicatedRegionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MhsmGeoReplicatedRegionInner deserializedMhsmGeoReplicatedRegionInner = new MhsmGeoReplicatedRegionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedMhsmGeoReplicatedRegionInner.name = reader.getString();
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedMhsmGeoReplicatedRegionInner.provisioningState
+ = GeoReplicationRegionProvisioningState.fromString(reader.getString());
+ } else if ("isPrimary".equals(fieldName)) {
+ deserializedMhsmGeoReplicatedRegionInner.isPrimary = reader.getNullable(JsonReader::getBoolean);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMhsmGeoReplicatedRegionInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateEndpointConnectionInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateEndpointConnectionInner.java
new file mode 100644
index 000000000000..721263fac12b
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateEndpointConnectionInner.java
@@ -0,0 +1,319 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmResource;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmSku;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.keyvault.generated.models.MhsmPrivateEndpoint;
+import com.azure.resourcemanager.keyvault.generated.models.MhsmPrivateLinkServiceConnectionState;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateEndpointConnectionProvisioningState;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Private endpoint connection resource.
+ */
+@Fluent
+public final class MhsmPrivateEndpointConnectionInner extends ManagedHsmResource {
+ /*
+ * Resource properties.
+ */
+ private MhsmPrivateEndpointConnectionProperties innerProperties;
+
+ /*
+ * Modified whenever there is a change in the state of private endpoint connection.
+ */
+ private String etag;
+
+ /*
+ * Metadata pertaining to creation and last modification of the key vault resource.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of MhsmPrivateEndpointConnectionInner class.
+ */
+ public MhsmPrivateEndpointConnectionInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private MhsmPrivateEndpointConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the etag property: Modified whenever there is a change in the state of private endpoint connection.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: Modified whenever there is a change in the state of private endpoint connection.
+ *
+ * @param etag the etag value to set.
+ * @return the MhsmPrivateEndpointConnectionInner object itself.
+ */
+ public MhsmPrivateEndpointConnectionInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the key vault resource.
+ *
+ * @return the systemData value.
+ */
+ @Override
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public MhsmPrivateEndpointConnectionInner withSku(ManagedHsmSku sku) {
+ super.withSku(sku);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public MhsmPrivateEndpointConnectionInner withIdentity(ManagedServiceIdentity identity) {
+ super.withIdentity(identity);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public MhsmPrivateEndpointConnectionInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public MhsmPrivateEndpointConnectionInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the privateEndpoint property: Properties of the private endpoint object.
+ *
+ * @return the privateEndpoint value.
+ */
+ public MhsmPrivateEndpoint privateEndpoint() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint();
+ }
+
+ /**
+ * Set the privateEndpoint property: Properties of the private endpoint object.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the MhsmPrivateEndpointConnectionInner object itself.
+ */
+ public MhsmPrivateEndpointConnectionInner withPrivateEndpoint(MhsmPrivateEndpoint privateEndpoint) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MhsmPrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateEndpoint(privateEndpoint);
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: Approval state of the private link connection.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public MhsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState();
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: Approval state of the private link connection.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the MhsmPrivateEndpointConnectionInner object itself.
+ */
+ public MhsmPrivateEndpointConnectionInner
+ withPrivateLinkServiceConnectionState(MhsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MhsmPrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the private endpoint connection.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the private endpoint connection.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the MhsmPrivateEndpointConnectionInner object itself.
+ */
+ public MhsmPrivateEndpointConnectionInner
+ withProvisioningState(PrivateEndpointConnectionProvisioningState provisioningState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MhsmPrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withProvisioningState(provisioningState);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ if (sku() != null) {
+ sku().validate();
+ }
+ if (identity() != null) {
+ identity().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("sku", sku());
+ jsonWriter.writeJsonField("identity", identity());
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeStringField("etag", this.etag);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MhsmPrivateEndpointConnectionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MhsmPrivateEndpointConnectionInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the MhsmPrivateEndpointConnectionInner.
+ */
+ public static MhsmPrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MhsmPrivateEndpointConnectionInner deserializedMhsmPrivateEndpointConnectionInner
+ = new MhsmPrivateEndpointConnectionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedMhsmPrivateEndpointConnectionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedMhsmPrivateEndpointConnectionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedMhsmPrivateEndpointConnectionInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedMhsmPrivateEndpointConnectionInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedMhsmPrivateEndpointConnectionInner.withTags(tags);
+ } else if ("sku".equals(fieldName)) {
+ deserializedMhsmPrivateEndpointConnectionInner.withSku(ManagedHsmSku.fromJson(reader));
+ } else if ("systemData".equals(fieldName)) {
+ deserializedMhsmPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedMhsmPrivateEndpointConnectionInner
+ .withIdentity(ManagedServiceIdentity.fromJson(reader));
+ } else if ("properties".equals(fieldName)) {
+ deserializedMhsmPrivateEndpointConnectionInner.innerProperties
+ = MhsmPrivateEndpointConnectionProperties.fromJson(reader);
+ } else if ("etag".equals(fieldName)) {
+ deserializedMhsmPrivateEndpointConnectionInner.etag = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMhsmPrivateEndpointConnectionInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateEndpointConnectionProperties.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateEndpointConnectionProperties.java
new file mode 100644
index 000000000000..b65e446333d6
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateEndpointConnectionProperties.java
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.MhsmPrivateEndpoint;
+import com.azure.resourcemanager.keyvault.generated.models.MhsmPrivateLinkServiceConnectionState;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateEndpointConnectionProvisioningState;
+import java.io.IOException;
+
+/**
+ * Properties of the private endpoint connection resource.
+ */
+@Fluent
+public final class MhsmPrivateEndpointConnectionProperties
+ implements JsonSerializable {
+ /*
+ * Properties of the private endpoint object.
+ */
+ private MhsmPrivateEndpoint privateEndpoint;
+
+ /*
+ * Approval state of the private link connection.
+ */
+ private MhsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * Provisioning state of the private endpoint connection.
+ */
+ private PrivateEndpointConnectionProvisioningState provisioningState;
+
+ /**
+ * Creates an instance of MhsmPrivateEndpointConnectionProperties class.
+ */
+ public MhsmPrivateEndpointConnectionProperties() {
+ }
+
+ /**
+ * Get the privateEndpoint property: Properties of the private endpoint object.
+ *
+ * @return the privateEndpoint value.
+ */
+ public MhsmPrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: Properties of the private endpoint object.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the MhsmPrivateEndpointConnectionProperties object itself.
+ */
+ public MhsmPrivateEndpointConnectionProperties withPrivateEndpoint(MhsmPrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: Approval state of the private link connection.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public MhsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: Approval state of the private link connection.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the MhsmPrivateEndpointConnectionProperties object itself.
+ */
+ public MhsmPrivateEndpointConnectionProperties
+ withPrivateLinkServiceConnectionState(MhsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the private endpoint connection.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the private endpoint connection.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the MhsmPrivateEndpointConnectionProperties object itself.
+ */
+ public MhsmPrivateEndpointConnectionProperties
+ withProvisioningState(PrivateEndpointConnectionProvisioningState provisioningState) {
+ this.provisioningState = provisioningState;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() != null) {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint);
+ jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState);
+ jsonWriter.writeStringField("provisioningState",
+ this.provisioningState == null ? null : this.provisioningState.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MhsmPrivateEndpointConnectionProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MhsmPrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MhsmPrivateEndpointConnectionProperties.
+ */
+ public static MhsmPrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MhsmPrivateEndpointConnectionProperties deserializedMhsmPrivateEndpointConnectionProperties
+ = new MhsmPrivateEndpointConnectionProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("privateEndpoint".equals(fieldName)) {
+ deserializedMhsmPrivateEndpointConnectionProperties.privateEndpoint
+ = MhsmPrivateEndpoint.fromJson(reader);
+ } else if ("privateLinkServiceConnectionState".equals(fieldName)) {
+ deserializedMhsmPrivateEndpointConnectionProperties.privateLinkServiceConnectionState
+ = MhsmPrivateLinkServiceConnectionState.fromJson(reader);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedMhsmPrivateEndpointConnectionProperties.provisioningState
+ = PrivateEndpointConnectionProvisioningState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMhsmPrivateEndpointConnectionProperties;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateLinkResourceListResultInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateLinkResourceListResultInner.java
new file mode 100644
index 000000000000..a97086236979
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateLinkResourceListResultInner.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.MhsmPrivateLinkResource;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A list of private link resources.
+ */
+@Fluent
+public final class MhsmPrivateLinkResourceListResultInner
+ implements JsonSerializable {
+ /*
+ * Array of private link resources
+ */
+ private List value;
+
+ /**
+ * Creates an instance of MhsmPrivateLinkResourceListResultInner class.
+ */
+ public MhsmPrivateLinkResourceListResultInner() {
+ }
+
+ /**
+ * Get the value property: Array of private link resources.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Array of private link resources.
+ *
+ * @param value the value value to set.
+ * @return the MhsmPrivateLinkResourceListResultInner object itself.
+ */
+ public MhsmPrivateLinkResourceListResultInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MhsmPrivateLinkResourceListResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MhsmPrivateLinkResourceListResultInner if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MhsmPrivateLinkResourceListResultInner.
+ */
+ public static MhsmPrivateLinkResourceListResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MhsmPrivateLinkResourceListResultInner deserializedMhsmPrivateLinkResourceListResultInner
+ = new MhsmPrivateLinkResourceListResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> MhsmPrivateLinkResource.fromJson(reader1));
+ deserializedMhsmPrivateLinkResourceListResultInner.value = value;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMhsmPrivateLinkResourceListResultInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateLinkResourceProperties.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateLinkResourceProperties.java
new file mode 100644
index 000000000000..918d8ca1c2b7
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateLinkResourceProperties.java
@@ -0,0 +1,130 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Properties of a private link resource.
+ */
+@Fluent
+public final class MhsmPrivateLinkResourceProperties implements JsonSerializable {
+ /*
+ * Group identifier of private link resource.
+ */
+ private String groupId;
+
+ /*
+ * Required member names of private link resource.
+ */
+ private List requiredMembers;
+
+ /*
+ * Required DNS zone names of the the private link resource.
+ */
+ private List requiredZoneNames;
+
+ /**
+ * Creates an instance of MhsmPrivateLinkResourceProperties class.
+ */
+ public MhsmPrivateLinkResourceProperties() {
+ }
+
+ /**
+ * Get the groupId property: Group identifier of private link resource.
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Get the requiredMembers property: Required member names of private link resource.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Get the requiredZoneNames property: Required DNS zone names of the the private link resource.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Set the requiredZoneNames property: Required DNS zone names of the the private link resource.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set.
+ * @return the MhsmPrivateLinkResourceProperties object itself.
+ */
+ public MhsmPrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) {
+ this.requiredZoneNames = requiredZoneNames;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames,
+ (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MhsmPrivateLinkResourceProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MhsmPrivateLinkResourceProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MhsmPrivateLinkResourceProperties.
+ */
+ public static MhsmPrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MhsmPrivateLinkResourceProperties deserializedMhsmPrivateLinkResourceProperties
+ = new MhsmPrivateLinkResourceProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("groupId".equals(fieldName)) {
+ deserializedMhsmPrivateLinkResourceProperties.groupId = reader.getString();
+ } else if ("requiredMembers".equals(fieldName)) {
+ List requiredMembers = reader.readArray(reader1 -> reader1.getString());
+ deserializedMhsmPrivateLinkResourceProperties.requiredMembers = requiredMembers;
+ } else if ("requiredZoneNames".equals(fieldName)) {
+ List requiredZoneNames = reader.readArray(reader1 -> reader1.getString());
+ deserializedMhsmPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMhsmPrivateLinkResourceProperties;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/OperationInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..3367eb596643
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/OperationInner.java
@@ -0,0 +1,225 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.OperationDisplay;
+import com.azure.resourcemanager.keyvault.generated.models.ServiceSpecification;
+import java.io.IOException;
+
+/**
+ * Key Vault REST API operation definition.
+ */
+@Fluent
+public final class OperationInner implements JsonSerializable {
+ /*
+ * Operation name: {provider}/{resource}/{operation}
+ */
+ private String name;
+
+ /*
+ * Display metadata associated with the operation.
+ */
+ private OperationDisplay display;
+
+ /*
+ * The origin of operations.
+ */
+ private String origin;
+
+ /*
+ * Properties of operation, include metric specifications.
+ */
+ private OperationProperties innerOperationProperties;
+
+ /*
+ * Property to specify whether the action is a data action.
+ */
+ private Boolean isDataAction;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ public OperationInner() {
+ }
+
+ /**
+ * Get the name property: Operation name: {provider}/{resource}/{operation}.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Operation name: {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: Display metadata associated with the operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Display metadata associated with the operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The origin of operations.
+ *
+ * @return the origin value.
+ */
+ public String origin() {
+ return this.origin;
+ }
+
+ /**
+ * Set the origin property: The origin of operations.
+ *
+ * @param origin the origin value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withOrigin(String origin) {
+ this.origin = origin;
+ return this;
+ }
+
+ /**
+ * Get the innerOperationProperties property: Properties of operation, include metric specifications.
+ *
+ * @return the innerOperationProperties value.
+ */
+ private OperationProperties innerOperationProperties() {
+ return this.innerOperationProperties;
+ }
+
+ /**
+ * Get the isDataAction property: Property to specify whether the action is a data action.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Set the isDataAction property: Property to specify whether the action is a data action.
+ *
+ * @param isDataAction the isDataAction value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withIsDataAction(Boolean isDataAction) {
+ this.isDataAction = isDataAction;
+ return this;
+ }
+
+ /**
+ * Get the serviceSpecification property: One property of operation, include metric specifications.
+ *
+ * @return the serviceSpecification value.
+ */
+ public ServiceSpecification serviceSpecification() {
+ return this.innerOperationProperties() == null ? null : this.innerOperationProperties().serviceSpecification();
+ }
+
+ /**
+ * Set the serviceSpecification property: One property of operation, include metric specifications.
+ *
+ * @param serviceSpecification the serviceSpecification value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withServiceSpecification(ServiceSpecification serviceSpecification) {
+ if (this.innerOperationProperties() == null) {
+ this.innerOperationProperties = new OperationProperties();
+ }
+ this.innerOperationProperties().withServiceSpecification(serviceSpecification);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ if (innerOperationProperties() != null) {
+ innerOperationProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeJsonField("display", this.display);
+ jsonWriter.writeStringField("origin", this.origin);
+ jsonWriter.writeJsonField("properties", this.innerOperationProperties);
+ jsonWriter.writeBooleanField("isDataAction", this.isDataAction);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedOperationInner.innerOperationProperties = OperationProperties.fromJson(reader);
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/OperationProperties.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/OperationProperties.java
new file mode 100644
index 000000000000..da11da174614
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/OperationProperties.java
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.ServiceSpecification;
+import java.io.IOException;
+
+/**
+ * Properties of operation, include metric specifications.
+ */
+@Fluent
+public final class OperationProperties implements JsonSerializable {
+ /*
+ * One property of operation, include metric specifications.
+ */
+ private ServiceSpecification serviceSpecification;
+
+ /**
+ * Creates an instance of OperationProperties class.
+ */
+ public OperationProperties() {
+ }
+
+ /**
+ * Get the serviceSpecification property: One property of operation, include metric specifications.
+ *
+ * @return the serviceSpecification value.
+ */
+ public ServiceSpecification serviceSpecification() {
+ return this.serviceSpecification;
+ }
+
+ /**
+ * Set the serviceSpecification property: One property of operation, include metric specifications.
+ *
+ * @param serviceSpecification the serviceSpecification value to set.
+ * @return the OperationProperties object itself.
+ */
+ public OperationProperties withServiceSpecification(ServiceSpecification serviceSpecification) {
+ this.serviceSpecification = serviceSpecification;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (serviceSpecification() != null) {
+ serviceSpecification().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("serviceSpecification", this.serviceSpecification);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationProperties if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationProperties.
+ */
+ public static OperationProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationProperties deserializedOperationProperties = new OperationProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("serviceSpecification".equals(fieldName)) {
+ deserializedOperationProperties.serviceSpecification = ServiceSpecification.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationProperties;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateEndpointConnectionInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateEndpointConnectionInner.java
new file mode 100644
index 000000000000..aa3e6b927648
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,267 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateEndpoint;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateLinkServiceConnectionState;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Private endpoint connection resource.
+ */
+@Fluent
+public final class PrivateEndpointConnectionInner extends Resource {
+ /*
+ * Resource properties.
+ */
+ private PrivateEndpointConnectionProperties innerProperties;
+
+ /*
+ * Modified whenever there is a change in the state of private endpoint connection.
+ */
+ private String etag;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of PrivateEndpointConnectionInner class.
+ */
+ public PrivateEndpointConnectionInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateEndpointConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the etag property: Modified whenever there is a change in the state of private endpoint connection.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: Modified whenever there is a change in the state of private endpoint connection.
+ *
+ * @param etag the etag value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public PrivateEndpointConnectionInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public PrivateEndpointConnectionInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the privateEndpoint property: Properties of the private endpoint object.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint();
+ }
+
+ /**
+ * Set the privateEndpoint property: Properties of the private endpoint object.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateEndpoint(privateEndpoint);
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: Approval state of the private link connection.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState();
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: Approval state of the private link connection.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner
+ withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the private endpoint connection.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the private endpoint connection.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner
+ withProvisioningState(PrivateEndpointConnectionProvisioningState provisioningState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withProvisioningState(provisioningState);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeStringField("etag", this.etag);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateEndpointConnectionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateEndpointConnectionInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the PrivateEndpointConnectionInner.
+ */
+ public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner
+ = new PrivateEndpointConnectionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedPrivateEndpointConnectionInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.innerProperties
+ = PrivateEndpointConnectionProperties.fromJson(reader);
+ } else if ("etag".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.etag = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateEndpointConnectionInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateEndpointConnectionProperties.java
new file mode 100644
index 000000000000..e7c5079dc568
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,165 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateEndpoint;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateLinkServiceConnectionState;
+import java.io.IOException;
+
+/**
+ * Properties of the private endpoint connection resource.
+ */
+@Fluent
+public final class PrivateEndpointConnectionProperties
+ implements JsonSerializable {
+ /*
+ * Properties of the private endpoint object.
+ */
+ private PrivateEndpoint privateEndpoint;
+
+ /*
+ * Approval state of the private link connection.
+ */
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * Provisioning state of the private endpoint connection.
+ */
+ private PrivateEndpointConnectionProvisioningState provisioningState;
+
+ /**
+ * Creates an instance of PrivateEndpointConnectionProperties class.
+ */
+ public PrivateEndpointConnectionProperties() {
+ }
+
+ /**
+ * Get the privateEndpoint property: Properties of the private endpoint object.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: Properties of the private endpoint object.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: Approval state of the private link connection.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: Approval state of the private link connection.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties
+ withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the private endpoint connection.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the private endpoint connection.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties
+ withProvisioningState(PrivateEndpointConnectionProvisioningState provisioningState) {
+ this.provisioningState = provisioningState;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() != null) {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint);
+ jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState);
+ jsonWriter.writeStringField("provisioningState",
+ this.provisioningState == null ? null : this.provisioningState.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the PrivateEndpointConnectionProperties.
+ */
+ public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties
+ = new PrivateEndpointConnectionProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("privateEndpoint".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader);
+ } else if ("privateLinkServiceConnectionState".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState
+ = PrivateLinkServiceConnectionState.fromJson(reader);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionProperties.provisioningState
+ = PrivateEndpointConnectionProvisioningState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateEndpointConnectionProperties;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateLinkResourceListResultInner.java
new file mode 100644
index 000000000000..aa31cf4fa224
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateLinkResourceListResultInner.java
@@ -0,0 +1,101 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateLinkResource;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A list of private link resources.
+ */
+@Fluent
+public final class PrivateLinkResourceListResultInner implements JsonSerializable {
+ /*
+ * Array of private link resources
+ */
+ private List value;
+
+ /**
+ * Creates an instance of PrivateLinkResourceListResultInner class.
+ */
+ public PrivateLinkResourceListResultInner() {
+ }
+
+ /**
+ * Get the value property: Array of private link resources.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Array of private link resources.
+ *
+ * @param value the value value to set.
+ * @return the PrivateLinkResourceListResultInner object itself.
+ */
+ public PrivateLinkResourceListResultInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateLinkResourceListResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateLinkResourceListResultInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the PrivateLinkResourceListResultInner.
+ */
+ public static PrivateLinkResourceListResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateLinkResourceListResultInner deserializedPrivateLinkResourceListResultInner
+ = new PrivateLinkResourceListResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> PrivateLinkResource.fromJson(reader1));
+ deserializedPrivateLinkResourceListResultInner.value = value;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateLinkResourceListResultInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateLinkResourceProperties.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateLinkResourceProperties.java
new file mode 100644
index 000000000000..cf34a1b6fcff
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateLinkResourceProperties.java
@@ -0,0 +1,130 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Properties of a private link resource.
+ */
+@Fluent
+public final class PrivateLinkResourceProperties implements JsonSerializable {
+ /*
+ * Group identifier of private link resource.
+ */
+ private String groupId;
+
+ /*
+ * Required member names of private link resource.
+ */
+ private List requiredMembers;
+
+ /*
+ * Required DNS zone names of the the private link resource.
+ */
+ private List requiredZoneNames;
+
+ /**
+ * Creates an instance of PrivateLinkResourceProperties class.
+ */
+ public PrivateLinkResourceProperties() {
+ }
+
+ /**
+ * Get the groupId property: Group identifier of private link resource.
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Get the requiredMembers property: Required member names of private link resource.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Get the requiredZoneNames property: Required DNS zone names of the the private link resource.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Set the requiredZoneNames property: Required DNS zone names of the the private link resource.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set.
+ * @return the PrivateLinkResourceProperties object itself.
+ */
+ public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) {
+ this.requiredZoneNames = requiredZoneNames;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames,
+ (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateLinkResourceProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateLinkResourceProperties if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the PrivateLinkResourceProperties.
+ */
+ public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties
+ = new PrivateLinkResourceProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("groupId".equals(fieldName)) {
+ deserializedPrivateLinkResourceProperties.groupId = reader.getString();
+ } else if ("requiredMembers".equals(fieldName)) {
+ List requiredMembers = reader.readArray(reader1 -> reader1.getString());
+ deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers;
+ } else if ("requiredZoneNames".equals(fieldName)) {
+ List requiredZoneNames = reader.readArray(reader1 -> reader1.getString());
+ deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateLinkResourceProperties;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/SecretInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/SecretInner.java
new file mode 100644
index 000000000000..abcd4784c791
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/SecretInner.java
@@ -0,0 +1,181 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.SecretProperties;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Resource information with extended details.
+ */
+@Fluent
+public final class SecretInner extends Resource {
+ /*
+ * Properties of the secret
+ */
+ private SecretProperties properties;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of SecretInner class.
+ */
+ public SecretInner() {
+ }
+
+ /**
+ * Get the properties property: Properties of the secret.
+ *
+ * @return the properties value.
+ */
+ public SecretProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of the secret.
+ *
+ * @param properties the properties value to set.
+ * @return the SecretInner object itself.
+ */
+ public SecretInner withProperties(SecretProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public SecretInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public SecretInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property properties in model SecretInner"));
+ } else {
+ properties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(SecretInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SecretInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SecretInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the SecretInner.
+ */
+ public static SecretInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SecretInner deserializedSecretInner = new SecretInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedSecretInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedSecretInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedSecretInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedSecretInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedSecretInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedSecretInner.properties = SecretProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSecretInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/VaultAccessPolicyParametersInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/VaultAccessPolicyParametersInner.java
new file mode 100644
index 000000000000..254d67b81b55
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/VaultAccessPolicyParametersInner.java
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.VaultAccessPolicyProperties;
+import java.io.IOException;
+
+/**
+ * Parameters for updating the access policy in a vault.
+ */
+@Fluent
+public final class VaultAccessPolicyParametersInner extends ProxyResource {
+ /*
+ * The resource type of the access policy.
+ */
+ private String location;
+
+ /*
+ * Properties of the access policy
+ */
+ private VaultAccessPolicyProperties properties;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of VaultAccessPolicyParametersInner class.
+ */
+ public VaultAccessPolicyParametersInner() {
+ }
+
+ /**
+ * Get the location property: The resource type of the access policy.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Get the properties property: Properties of the access policy.
+ *
+ * @return the properties value.
+ */
+ public VaultAccessPolicyProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of the access policy.
+ *
+ * @param properties the properties value to set.
+ * @return the VaultAccessPolicyParametersInner object itself.
+ */
+ public VaultAccessPolicyParametersInner withProperties(VaultAccessPolicyProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property properties in model VaultAccessPolicyParametersInner"));
+ } else {
+ properties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(VaultAccessPolicyParametersInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of VaultAccessPolicyParametersInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of VaultAccessPolicyParametersInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the VaultAccessPolicyParametersInner.
+ */
+ public static VaultAccessPolicyParametersInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ VaultAccessPolicyParametersInner deserializedVaultAccessPolicyParametersInner
+ = new VaultAccessPolicyParametersInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedVaultAccessPolicyParametersInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedVaultAccessPolicyParametersInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedVaultAccessPolicyParametersInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedVaultAccessPolicyParametersInner.properties
+ = VaultAccessPolicyProperties.fromJson(reader);
+ } else if ("location".equals(fieldName)) {
+ deserializedVaultAccessPolicyParametersInner.location = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedVaultAccessPolicyParametersInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/VaultInner.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/VaultInner.java
new file mode 100644
index 000000000000..7318105fcd3b
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/VaultInner.java
@@ -0,0 +1,198 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.keyvault.generated.models.VaultProperties;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Resource information with extended details.
+ */
+@Fluent
+public final class VaultInner extends Resource {
+ /*
+ * System metadata for the key vault.
+ */
+ private SystemData systemData;
+
+ /*
+ * Properties of the vault
+ */
+ private VaultProperties properties;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of VaultInner class.
+ */
+ public VaultInner() {
+ }
+
+ /**
+ * Get the systemData property: System metadata for the key vault.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the properties property: Properties of the vault.
+ *
+ * @return the properties value.
+ */
+ public VaultProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of the vault.
+ *
+ * @param properties the properties value to set.
+ * @return the VaultInner object itself.
+ */
+ public VaultInner withProperties(VaultProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public VaultInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public VaultInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property properties in model VaultInner"));
+ } else {
+ properties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(VaultInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of VaultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of VaultInner if the JsonReader was pointing to an instance of it, or null if it was pointing
+ * to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the VaultInner.
+ */
+ public static VaultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ VaultInner deserializedVaultInner = new VaultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedVaultInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedVaultInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedVaultInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedVaultInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedVaultInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedVaultInner.properties = VaultProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedVaultInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedVaultInner;
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/package-info.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/package-info.java
new file mode 100644
index 000000000000..84a9118c0e83
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for KeyVaultManagementClient.
+ * The Azure management API provides a RESTful set of web services that interact with Azure Key Vault.
+ */
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/package-info.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/package-info.java
new file mode 100644
index 000000000000..bac9c26370bf
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for KeyVaultManagementClient.
+ * The Azure management API provides a RESTful set of web services that interact with Azure Key Vault.
+ */
+package com.azure.resourcemanager.keyvault.generated.fluent;
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/CheckMhsmNameAvailabilityResultImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/CheckMhsmNameAvailabilityResultImpl.java
new file mode 100644
index 000000000000..165fc215da57
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/CheckMhsmNameAvailabilityResultImpl.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.implementation;
+
+import com.azure.resourcemanager.keyvault.generated.fluent.models.CheckMhsmNameAvailabilityResultInner;
+import com.azure.resourcemanager.keyvault.generated.models.CheckMhsmNameAvailabilityResult;
+import com.azure.resourcemanager.keyvault.generated.models.Reason;
+
+public final class CheckMhsmNameAvailabilityResultImpl implements CheckMhsmNameAvailabilityResult {
+ private CheckMhsmNameAvailabilityResultInner innerObject;
+
+ private final com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager;
+
+ CheckMhsmNameAvailabilityResultImpl(CheckMhsmNameAvailabilityResultInner innerObject,
+ com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public Boolean nameAvailable() {
+ return this.innerModel().nameAvailable();
+ }
+
+ public Reason reason() {
+ return this.innerModel().reason();
+ }
+
+ public String message() {
+ return this.innerModel().message();
+ }
+
+ public CheckMhsmNameAvailabilityResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.keyvault.generated.KeyVaultManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/CheckNameAvailabilityResultImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/CheckNameAvailabilityResultImpl.java
new file mode 100644
index 000000000000..63b72565282f
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/CheckNameAvailabilityResultImpl.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.implementation;
+
+import com.azure.resourcemanager.keyvault.generated.fluent.models.CheckNameAvailabilityResultInner;
+import com.azure.resourcemanager.keyvault.generated.models.CheckNameAvailabilityResult;
+import com.azure.resourcemanager.keyvault.generated.models.Reason;
+
+public final class CheckNameAvailabilityResultImpl implements CheckNameAvailabilityResult {
+ private CheckNameAvailabilityResultInner innerObject;
+
+ private final com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager;
+
+ CheckNameAvailabilityResultImpl(CheckNameAvailabilityResultInner innerObject,
+ com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public Boolean nameAvailable() {
+ return this.innerModel().nameAvailable();
+ }
+
+ public Reason reason() {
+ return this.innerModel().reason();
+ }
+
+ public String message() {
+ return this.innerModel().message();
+ }
+
+ public CheckNameAvailabilityResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.keyvault.generated.KeyVaultManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/DeletedManagedHsmImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/DeletedManagedHsmImpl.java
new file mode 100644
index 000000000000..8ab5dff5eefe
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/DeletedManagedHsmImpl.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.keyvault.generated.implementation;
+
+import com.azure.resourcemanager.keyvault.generated.fluent.models.DeletedManagedHsmInner;
+import com.azure.resourcemanager.keyvault.generated.models.DeletedManagedHsm;
+import com.azure.resourcemanager.keyvault.generated.models.DeletedManagedHsmProperties;
+
+public final class DeletedManagedHsmImpl implements DeletedManagedHsm {
+ private DeletedManagedHsmInner innerObject;
+
+ private final com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager;
+
+ DeletedManagedHsmImpl(DeletedManagedHsmInner innerObject,
+ com.azure.resourcemanager.keyvault.generated.KeyVaultManager 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 DeletedManagedHsmProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public DeletedManagedHsmInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.keyvault.generated.KeyVaultManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/DeletedVaultImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/DeletedVaultImpl.java
new file mode 100644
index 000000000000..11be35669e84
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/DeletedVaultImpl.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.keyvault.generated.implementation;
+
+import com.azure.resourcemanager.keyvault.generated.fluent.models.DeletedVaultInner;
+import com.azure.resourcemanager.keyvault.generated.models.DeletedVault;
+import com.azure.resourcemanager.keyvault.generated.models.DeletedVaultProperties;
+
+public final class DeletedVaultImpl implements DeletedVault {
+ private DeletedVaultInner innerObject;
+
+ private final com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager;
+
+ DeletedVaultImpl(DeletedVaultInner innerObject,
+ com.azure.resourcemanager.keyvault.generated.KeyVaultManager 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 DeletedVaultProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public DeletedVaultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.keyvault.generated.KeyVaultManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeyImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeyImpl.java
new file mode 100644
index 000000000000..a99eb619ada3
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeyImpl.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.keyvault.generated.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.KeyInner;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.KeyProperties;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyCurveName;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyOperation;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyType;
+import com.azure.resourcemanager.keyvault.generated.models.Key;
+import com.azure.resourcemanager.keyvault.generated.models.KeyAttributes;
+import com.azure.resourcemanager.keyvault.generated.models.KeyCreateParameters;
+import com.azure.resourcemanager.keyvault.generated.models.KeyReleasePolicy;
+import com.azure.resourcemanager.keyvault.generated.models.RotationPolicy;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class KeyImpl implements Key, Key.Definition {
+ private KeyInner innerObject;
+
+ private final com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager;
+
+ KeyImpl(KeyInner innerObject, com.azure.resourcemanager.keyvault.generated.KeyVaultManager 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 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 KeyAttributes attributes() {
+ return this.innerModel().attributes();
+ }
+
+ public JsonWebKeyType kty() {
+ return this.innerModel().kty();
+ }
+
+ public List keyOps() {
+ List inner = this.innerModel().keyOps();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Integer keySize() {
+ return this.innerModel().keySize();
+ }
+
+ public JsonWebKeyCurveName curveName() {
+ return this.innerModel().curveName();
+ }
+
+ public String keyUri() {
+ return this.innerModel().keyUri();
+ }
+
+ public String keyUriWithVersion() {
+ return this.innerModel().keyUriWithVersion();
+ }
+
+ public RotationPolicy rotationPolicy() {
+ return this.innerModel().rotationPolicy();
+ }
+
+ public KeyReleasePolicy releasePolicy() {
+ return this.innerModel().releasePolicy();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public KeyInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.keyvault.generated.KeyVaultManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String vaultName;
+
+ private String keyName;
+
+ private KeyCreateParameters createParameters;
+
+ public KeyImpl withExistingVault(String resourceGroupName, String vaultName) {
+ this.resourceGroupName = resourceGroupName;
+ this.vaultName = vaultName;
+ return this;
+ }
+
+ public Key create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getKeys()
+ .createIfNotExistWithResponse(resourceGroupName, vaultName, keyName, createParameters, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Key create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getKeys()
+ .createIfNotExistWithResponse(resourceGroupName, vaultName, keyName, createParameters, context)
+ .getValue();
+ return this;
+ }
+
+ KeyImpl(String name, com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager) {
+ this.innerObject = new KeyInner();
+ this.serviceManager = serviceManager;
+ this.keyName = name;
+ this.createParameters = new KeyCreateParameters();
+ }
+
+ public Key refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getKeys()
+ .getWithResponse(resourceGroupName, vaultName, keyName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Key refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getKeys()
+ .getWithResponse(resourceGroupName, vaultName, keyName, context)
+ .getValue();
+ return this;
+ }
+
+ public KeyImpl withProperties(KeyProperties properties) {
+ this.createParameters.withProperties(properties);
+ return this;
+ }
+
+ public KeyImpl withTags(Map tags) {
+ this.createParameters.withTags(tags);
+ return this;
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeyVaultManagementClientBuilder.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeyVaultManagementClientBuilder.java
new file mode 100644
index 000000000000..431628ee8ebf
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeyVaultManagementClientBuilder.java
@@ -0,0 +1,140 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.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 KeyVaultManagementClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { KeyVaultManagementClientImpl.class })
+public final class KeyVaultManagementClientBuilder {
+ /*
+ * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of
+ * the URI for every service call.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+ * part of the URI for every service call.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the KeyVaultManagementClientBuilder.
+ */
+ public KeyVaultManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the KeyVaultManagementClientBuilder.
+ */
+ public KeyVaultManagementClientBuilder 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 KeyVaultManagementClientBuilder.
+ */
+ public KeyVaultManagementClientBuilder 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 KeyVaultManagementClientBuilder.
+ */
+ public KeyVaultManagementClientBuilder 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 KeyVaultManagementClientBuilder.
+ */
+ public KeyVaultManagementClientBuilder 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 KeyVaultManagementClientBuilder.
+ */
+ public KeyVaultManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of KeyVaultManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of KeyVaultManagementClientImpl.
+ */
+ public KeyVaultManagementClientImpl buildClient() {
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline = (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval
+ = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ KeyVaultManagementClientImpl client = new KeyVaultManagementClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ return client;
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeyVaultManagementClientImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeyVaultManagementClientImpl.java
new file mode 100644
index 000000000000..8fb9de37b4ef
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeyVaultManagementClientImpl.java
@@ -0,0 +1,451 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaderName;
+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.CoreUtils;
+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.keyvault.generated.fluent.KeyVaultManagementClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.KeysClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.ManagedHsmKeysClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.ManagedHsmsClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.MhsmPrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.MhsmPrivateLinkResourcesClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.MhsmRegionsClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.OperationsClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.PrivateLinkResourcesClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.SecretsClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.VaultsClient;
+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 reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * Initializes a new instance of the KeyVaultManagementClientImpl type.
+ */
+@ServiceClient(builder = KeyVaultManagementClientBuilder.class)
+public final class KeyVaultManagementClientImpl implements KeyVaultManagementClient {
+ /**
+ * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of
+ * the URI for every service call.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+ * part of the URI for every service call.
+ *
+ * @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 KeysClient object to access its operations.
+ */
+ private final KeysClient keys;
+
+ /**
+ * Gets the KeysClient object to access its operations.
+ *
+ * @return the KeysClient object.
+ */
+ public KeysClient getKeys() {
+ return this.keys;
+ }
+
+ /**
+ * The ManagedHsmKeysClient object to access its operations.
+ */
+ private final ManagedHsmKeysClient managedHsmKeys;
+
+ /**
+ * Gets the ManagedHsmKeysClient object to access its operations.
+ *
+ * @return the ManagedHsmKeysClient object.
+ */
+ public ManagedHsmKeysClient getManagedHsmKeys() {
+ return this.managedHsmKeys;
+ }
+
+ /**
+ * The VaultsClient object to access its operations.
+ */
+ private final VaultsClient vaults;
+
+ /**
+ * Gets the VaultsClient object to access its operations.
+ *
+ * @return the VaultsClient object.
+ */
+ public VaultsClient getVaults() {
+ return this.vaults;
+ }
+
+ /**
+ * The PrivateEndpointConnectionsClient object to access its operations.
+ */
+ private final PrivateEndpointConnectionsClient privateEndpointConnections;
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /**
+ * The PrivateLinkResourcesClient object to access its operations.
+ */
+ private final PrivateLinkResourcesClient privateLinkResources;
+
+ /**
+ * Gets the PrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesClient object.
+ */
+ public PrivateLinkResourcesClient getPrivateLinkResources() {
+ return this.privateLinkResources;
+ }
+
+ /**
+ * The ManagedHsmsClient object to access its operations.
+ */
+ private final ManagedHsmsClient managedHsms;
+
+ /**
+ * Gets the ManagedHsmsClient object to access its operations.
+ *
+ * @return the ManagedHsmsClient object.
+ */
+ public ManagedHsmsClient getManagedHsms() {
+ return this.managedHsms;
+ }
+
+ /**
+ * The MhsmPrivateEndpointConnectionsClient object to access its operations.
+ */
+ private final MhsmPrivateEndpointConnectionsClient mhsmPrivateEndpointConnections;
+
+ /**
+ * Gets the MhsmPrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the MhsmPrivateEndpointConnectionsClient object.
+ */
+ public MhsmPrivateEndpointConnectionsClient getMhsmPrivateEndpointConnections() {
+ return this.mhsmPrivateEndpointConnections;
+ }
+
+ /**
+ * The MhsmPrivateLinkResourcesClient object to access its operations.
+ */
+ private final MhsmPrivateLinkResourcesClient mhsmPrivateLinkResources;
+
+ /**
+ * Gets the MhsmPrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the MhsmPrivateLinkResourcesClient object.
+ */
+ public MhsmPrivateLinkResourcesClient getMhsmPrivateLinkResources() {
+ return this.mhsmPrivateLinkResources;
+ }
+
+ /**
+ * The MhsmRegionsClient object to access its operations.
+ */
+ private final MhsmRegionsClient mhsmRegions;
+
+ /**
+ * Gets the MhsmRegionsClient object to access its operations.
+ *
+ * @return the MhsmRegionsClient object.
+ */
+ public MhsmRegionsClient getMhsmRegions() {
+ return this.mhsmRegions;
+ }
+
+ /**
+ * 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 SecretsClient object to access its operations.
+ */
+ private final SecretsClient secrets;
+
+ /**
+ * Gets the SecretsClient object to access its operations.
+ *
+ * @return the SecretsClient object.
+ */
+ public SecretsClient getSecrets() {
+ return this.secrets;
+ }
+
+ /**
+ * Initializes an instance of KeyVaultManagementClient 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 Subscription credentials which uniquely identify Microsoft Azure subscription. The
+ * subscription ID forms part of the URI for every service call.
+ * @param endpoint server parameter.
+ */
+ KeyVaultManagementClientImpl(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 = "2023-07-01";
+ this.keys = new KeysClientImpl(this);
+ this.managedHsmKeys = new ManagedHsmKeysClientImpl(this);
+ this.vaults = new VaultsClientImpl(this);
+ this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this);
+ this.privateLinkResources = new PrivateLinkResourcesClientImpl(this);
+ this.managedHsms = new ManagedHsmsClientImpl(this);
+ this.mhsmPrivateEndpointConnections = new MhsmPrivateEndpointConnectionsClientImpl(this);
+ this.mhsmPrivateLinkResources = new MhsmPrivateLinkResourcesClientImpl(this);
+ this.mhsmRegions = new MhsmRegionsClientImpl(this);
+ this.operations = new OperationsClientImpl(this);
+ this.secrets = new SecretsClientImpl(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) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(Mono>> activationResponse,
+ HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) {
+ return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, activationResponse, context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(),
+ lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError = this.getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(HttpHeaderName.fromString(s));
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(KeyVaultManagementClientImpl.class);
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeysClientImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeysClientImpl.java
new file mode 100644
index 000000000000..5406c35908f6
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeysClientImpl.java
@@ -0,0 +1,961 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.keyvault.generated.fluent.KeysClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.KeyInner;
+import com.azure.resourcemanager.keyvault.generated.models.KeyCreateParameters;
+import com.azure.resourcemanager.keyvault.generated.models.KeyListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in KeysClient.
+ */
+public final class KeysClientImpl implements KeysClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final KeysService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final KeyVaultManagementClientImpl client;
+
+ /**
+ * Initializes an instance of KeysClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ KeysClientImpl(KeyVaultManagementClientImpl client) {
+ this.service = RestProxy.create(KeysService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for KeyVaultManagementClientKeys to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "KeyVaultManagementCl")
+ public interface KeysService {
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createIfNotExist(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("keyName") String keyName, @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") KeyCreateParameters parameters, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("keyName") String keyName, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions/{keyVersion}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getVersion(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("keyName") String keyName, @PathParam("keyVersion") String keyVersion,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listVersions(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("keyName") String keyName, @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);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listVersionsNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the key vault which contains the key to be created.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createIfNotExistWithResponseAsync(String resourceGroupName, String vaultName,
+ String keyName, KeyCreateParameters parameters) {
+ 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 (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createIfNotExist(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, keyName, this.client.getApiVersion(), parameters, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the key vault which contains the key to be created.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createIfNotExistWithResponseAsync(String resourceGroupName, String vaultName,
+ String keyName, KeyCreateParameters parameters, 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 (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createIfNotExist(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ vaultName, keyName, this.client.getApiVersion(), parameters, accept, context);
+ }
+
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the key vault which contains the key to be created.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createIfNotExistAsync(String resourceGroupName, String vaultName, String keyName,
+ KeyCreateParameters parameters) {
+ return createIfNotExistWithResponseAsync(resourceGroupName, vaultName, keyName, parameters)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the key vault which contains the key to be created.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createIfNotExistWithResponse(String resourceGroupName, String vaultName, String keyName,
+ KeyCreateParameters parameters, Context context) {
+ return createIfNotExistWithResponseAsync(resourceGroupName, vaultName, keyName, parameters, context).block();
+ }
+
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the key vault which contains the key to be created.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public KeyInner createIfNotExist(String resourceGroupName, String vaultName, String keyName,
+ KeyCreateParameters parameters) {
+ return createIfNotExistWithResponse(resourceGroupName, vaultName, keyName, parameters, Context.NONE).getValue();
+ }
+
+ /**
+ * Gets the current version of the specified key from the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key to be retrieved.
+ * @param keyName The name of the key to be retrieved.
+ * @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 current version of the specified key from the specified key vault along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String vaultName, String keyName) {
+ 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 (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, keyName, this.client.getApiVersion(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the current version of the specified key from the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key to be retrieved.
+ * @param keyName The name of the key to be retrieved.
+ * @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 current version of the specified key from the specified key vault along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String vaultName, String keyName,
+ 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 (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, vaultName,
+ keyName, this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * Gets the current version of the specified key from the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key to be retrieved.
+ * @param keyName The name of the key to be retrieved.
+ * @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 current version of the specified key from the specified key vault on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String vaultName, String keyName) {
+ return getWithResponseAsync(resourceGroupName, vaultName, keyName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the current version of the specified key from the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key to be retrieved.
+ * @param keyName The name of the key to be retrieved.
+ * @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 current version of the specified key from the specified key vault along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String vaultName, String keyName,
+ Context context) {
+ return getWithResponseAsync(resourceGroupName, vaultName, keyName, context).block();
+ }
+
+ /**
+ * Gets the current version of the specified key from the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key to be retrieved.
+ * @param keyName The name of the key to be retrieved.
+ * @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 current version of the specified key from the specified key vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public KeyInner get(String resourceGroupName, String vaultName, String keyName) {
+ return getWithResponse(resourceGroupName, vaultName, keyName, Context.NONE).getValue();
+ }
+
+ /**
+ * Lists the keys in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the keys to be retrieved.
+ * @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 page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName, String vaultName) {
+ 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 (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, 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()));
+ }
+
+ /**
+ * Lists the keys in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the keys to be retrieved.
+ * @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 page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName, String vaultName,
+ 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 (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName 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(), resourceGroupName, vaultName,
+ this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Lists the keys in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the keys to be retrieved.
+ * @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 page of keys as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String vaultName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the keys in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the keys to be retrieved.
+ * @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 page of keys as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String vaultName, Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists the keys in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the keys to be retrieved.
+ * @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 page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String vaultName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, vaultName));
+ }
+
+ /**
+ * Lists the keys in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the keys to be retrieved.
+ * @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 page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String vaultName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, vaultName, context));
+ }
+
+ /**
+ * Gets the specified version of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key version to be retrieved.
+ * @param keyName The name of the key version to be retrieved.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified key vault along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getVersionWithResponseAsync(String resourceGroupName, String vaultName,
+ String keyName, String keyVersion) {
+ 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 (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ if (keyVersion == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyVersion is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getVersion(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, keyName, keyVersion, this.client.getApiVersion(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the specified version of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key version to be retrieved.
+ * @param keyName The name of the key version to be retrieved.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified key vault along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getVersionWithResponseAsync(String resourceGroupName, String vaultName,
+ String keyName, String keyVersion, 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 (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ if (keyVersion == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyVersion is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getVersion(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ vaultName, keyName, keyVersion, this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * Gets the specified version of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key version to be retrieved.
+ * @param keyName The name of the key version to be retrieved.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified key vault on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getVersionAsync(String resourceGroupName, String vaultName, String keyName,
+ String keyVersion) {
+ return getVersionWithResponseAsync(resourceGroupName, vaultName, keyName, keyVersion)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the specified version of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key version to be retrieved.
+ * @param keyName The name of the key version to be retrieved.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified key vault along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getVersionWithResponse(String resourceGroupName, String vaultName, String keyName,
+ String keyVersion, Context context) {
+ return getVersionWithResponseAsync(resourceGroupName, vaultName, keyName, keyVersion, context).block();
+ }
+
+ /**
+ * Gets the specified version of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key version to be retrieved.
+ * @param keyName The name of the key version to be retrieved.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified key vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public KeyInner getVersion(String resourceGroupName, String vaultName, String keyName, String keyVersion) {
+ return getVersionWithResponse(resourceGroupName, vaultName, keyName, keyVersion, Context.NONE).getValue();
+ }
+
+ /**
+ * Lists the versions of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key versions to be retrieved.
+ * @param keyName The name of the key versions to be retrieved.
+ * @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 page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listVersionsSinglePageAsync(String resourceGroupName, String vaultName,
+ String keyName) {
+ 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 (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listVersions(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, keyName, 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()));
+ }
+
+ /**
+ * Lists the versions of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key versions to be retrieved.
+ * @param keyName The name of the key versions to be retrieved.
+ * @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 page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listVersionsSinglePageAsync(String resourceGroupName, String vaultName,
+ String keyName, 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 (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listVersions(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, vaultName,
+ keyName, this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Lists the versions of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key versions to be retrieved.
+ * @param keyName The name of the key versions to be retrieved.
+ * @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 page of keys as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listVersionsAsync(String resourceGroupName, String vaultName, String keyName) {
+ return new PagedFlux<>(() -> listVersionsSinglePageAsync(resourceGroupName, vaultName, keyName),
+ nextLink -> listVersionsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the versions of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key versions to be retrieved.
+ * @param keyName The name of the key versions to be retrieved.
+ * @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 page of keys as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listVersionsAsync(String resourceGroupName, String vaultName, String keyName,
+ Context context) {
+ return new PagedFlux<>(() -> listVersionsSinglePageAsync(resourceGroupName, vaultName, keyName, context),
+ nextLink -> listVersionsNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists the versions of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key versions to be retrieved.
+ * @param keyName The name of the key versions to be retrieved.
+ * @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 page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listVersions(String resourceGroupName, String vaultName, String keyName) {
+ return new PagedIterable<>(listVersionsAsync(resourceGroupName, vaultName, keyName));
+ }
+
+ /**
+ * Lists the versions of the specified key in the specified key vault.
+ *
+ * @param resourceGroupName The name of the resource group which contains the specified key vault.
+ * @param vaultName The name of the vault which contains the key versions to be retrieved.
+ * @param keyName The name of the key versions to be retrieved.
+ * @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 page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listVersions(String resourceGroupName, String vaultName, String keyName,
+ Context context) {
+ return new PagedIterable<>(listVersionsAsync(resourceGroupName, vaultName, keyName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @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 URL to get the next list of items.
+ * @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 page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @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));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listVersionsNextSinglePageAsync(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.listVersionsNext(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 URL to get the next list of items.
+ * @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 page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listVersionsNextSinglePageAsync(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.listVersionsNext(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/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeysImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeysImpl.java
new file mode 100644
index 000000000000..220a67bae87f
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeysImpl.java
@@ -0,0 +1,141 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.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.keyvault.generated.fluent.KeysClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.KeyInner;
+import com.azure.resourcemanager.keyvault.generated.models.Key;
+import com.azure.resourcemanager.keyvault.generated.models.Keys;
+
+public final class KeysImpl implements Keys {
+ private static final ClientLogger LOGGER = new ClientLogger(KeysImpl.class);
+
+ private final KeysClient innerClient;
+
+ private final com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager;
+
+ public KeysImpl(KeysClient innerClient,
+ com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String vaultName, String keyName, Context context) {
+ Response inner = this.serviceClient().getWithResponse(resourceGroupName, vaultName, keyName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new KeyImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Key get(String resourceGroupName, String vaultName, String keyName) {
+ KeyInner inner = this.serviceClient().get(resourceGroupName, vaultName, keyName);
+ if (inner != null) {
+ return new KeyImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list(String resourceGroupName, String vaultName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, vaultName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new KeyImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String vaultName, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, vaultName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new KeyImpl(inner1, this.manager()));
+ }
+
+ public Response getVersionWithResponse(String resourceGroupName, String vaultName, String keyName,
+ String keyVersion, Context context) {
+ Response inner
+ = this.serviceClient().getVersionWithResponse(resourceGroupName, vaultName, keyName, keyVersion, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new KeyImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Key getVersion(String resourceGroupName, String vaultName, String keyName, String keyVersion) {
+ KeyInner inner = this.serviceClient().getVersion(resourceGroupName, vaultName, keyName, keyVersion);
+ if (inner != null) {
+ return new KeyImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listVersions(String resourceGroupName, String vaultName, String keyName) {
+ PagedIterable inner = this.serviceClient().listVersions(resourceGroupName, vaultName, keyName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new KeyImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listVersions(String resourceGroupName, String vaultName, String keyName,
+ Context context) {
+ PagedIterable inner
+ = this.serviceClient().listVersions(resourceGroupName, vaultName, keyName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new KeyImpl(inner1, this.manager()));
+ }
+
+ public Key getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.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 vaultName = ResourceManagerUtils.getValueFromIdByName(id, "vaults");
+ if (vaultName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id)));
+ }
+ String keyName = ResourceManagerUtils.getValueFromIdByName(id, "keys");
+ if (keyName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'keys'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, vaultName, keyName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.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 vaultName = ResourceManagerUtils.getValueFromIdByName(id, "vaults");
+ if (vaultName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id)));
+ }
+ String keyName = ResourceManagerUtils.getValueFromIdByName(id, "keys");
+ if (keyName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'keys'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, vaultName, keyName, context);
+ }
+
+ private KeysClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.keyvault.generated.KeyVaultManager manager() {
+ return this.serviceManager;
+ }
+
+ public KeyImpl define(String name) {
+ return new KeyImpl(name, this.manager());
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmImpl.java
new file mode 100644
index 000000000000..8281d689636b
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmImpl.java
@@ -0,0 +1,184 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.ManagedHsmInner;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsm;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmProperties;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmSku;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedServiceIdentity;
+import java.util.Collections;
+import java.util.Map;
+
+public final class ManagedHsmImpl implements ManagedHsm, ManagedHsm.Definition, ManagedHsm.Update {
+ private ManagedHsmInner innerObject;
+
+ private final com.azure.resourcemanager.keyvault.generated.KeyVaultManager 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 ManagedHsmSku sku() {
+ return this.innerModel().sku();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public ManagedServiceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
+ public ManagedHsmProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public ManagedHsmInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.keyvault.generated.KeyVaultManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String name;
+
+ public ManagedHsmImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public ManagedHsm create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedHsms()
+ .createOrUpdate(resourceGroupName, name, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public ManagedHsm create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedHsms()
+ .createOrUpdate(resourceGroupName, name, this.innerModel(), context);
+ return this;
+ }
+
+ ManagedHsmImpl(String name, com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager) {
+ this.innerObject = new ManagedHsmInner();
+ this.serviceManager = serviceManager;
+ this.name = name;
+ }
+
+ public ManagedHsmImpl update() {
+ return this;
+ }
+
+ public ManagedHsm apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedHsms()
+ .update(resourceGroupName, name, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public ManagedHsm apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedHsms()
+ .update(resourceGroupName, name, this.innerModel(), context);
+ return this;
+ }
+
+ ManagedHsmImpl(ManagedHsmInner innerObject,
+ com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedHSMs");
+ }
+
+ public ManagedHsm refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedHsms()
+ .getByResourceGroupWithResponse(resourceGroupName, name, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ManagedHsm refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedHsms()
+ .getByResourceGroupWithResponse(resourceGroupName, name, context)
+ .getValue();
+ return this;
+ }
+
+ public ManagedHsmImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public ManagedHsmImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public ManagedHsmImpl withTags(Map tags) {
+ this.innerModel().withTags(tags);
+ return this;
+ }
+
+ public ManagedHsmImpl withSku(ManagedHsmSku sku) {
+ this.innerModel().withSku(sku);
+ return this;
+ }
+
+ public ManagedHsmImpl withIdentity(ManagedServiceIdentity identity) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ }
+
+ public ManagedHsmImpl withProperties(ManagedHsmProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmKeyImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmKeyImpl.java
new file mode 100644
index 000000000000..2018efd8c8fe
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmKeyImpl.java
@@ -0,0 +1,165 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.ManagedHsmKeyInner;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.ManagedHsmKeyProperties;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyCurveName;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyOperation;
+import com.azure.resourcemanager.keyvault.generated.models.JsonWebKeyType;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmKey;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmKeyAttributes;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmKeyCreateParameters;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmKeyReleasePolicy;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmRotationPolicy;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class ManagedHsmKeyImpl implements ManagedHsmKey, ManagedHsmKey.Definition {
+ private ManagedHsmKeyInner innerObject;
+
+ private final com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager;
+
+ ManagedHsmKeyImpl(ManagedHsmKeyInner innerObject,
+ com.azure.resourcemanager.keyvault.generated.KeyVaultManager 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 Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public ManagedHsmKeyAttributes attributes() {
+ return this.innerModel().attributes();
+ }
+
+ public JsonWebKeyType kty() {
+ return this.innerModel().kty();
+ }
+
+ public List keyOps() {
+ List inner = this.innerModel().keyOps();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Integer keySize() {
+ return this.innerModel().keySize();
+ }
+
+ public JsonWebKeyCurveName curveName() {
+ return this.innerModel().curveName();
+ }
+
+ public String keyUri() {
+ return this.innerModel().keyUri();
+ }
+
+ public String keyUriWithVersion() {
+ return this.innerModel().keyUriWithVersion();
+ }
+
+ public ManagedHsmRotationPolicy rotationPolicy() {
+ return this.innerModel().rotationPolicy();
+ }
+
+ public ManagedHsmKeyReleasePolicy releasePolicy() {
+ return this.innerModel().releasePolicy();
+ }
+
+ public ManagedHsmKeyInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.keyvault.generated.KeyVaultManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String name;
+
+ private String keyName;
+
+ private ManagedHsmKeyCreateParameters createParameters;
+
+ public ManagedHsmKeyImpl withExistingManagedHSM(String resourceGroupName, String name) {
+ this.resourceGroupName = resourceGroupName;
+ this.name = name;
+ return this;
+ }
+
+ public ManagedHsmKey create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedHsmKeys()
+ .createIfNotExistWithResponse(resourceGroupName, name, keyName, createParameters, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ManagedHsmKey create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedHsmKeys()
+ .createIfNotExistWithResponse(resourceGroupName, name, keyName, createParameters, context)
+ .getValue();
+ return this;
+ }
+
+ ManagedHsmKeyImpl(String name, com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager) {
+ this.innerObject = new ManagedHsmKeyInner();
+ this.serviceManager = serviceManager;
+ this.keyName = name;
+ this.createParameters = new ManagedHsmKeyCreateParameters();
+ }
+
+ public ManagedHsmKey refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedHsmKeys()
+ .getWithResponse(resourceGroupName, name, keyName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ManagedHsmKey refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedHsmKeys()
+ .getWithResponse(resourceGroupName, name, keyName, context)
+ .getValue();
+ return this;
+ }
+
+ public ManagedHsmKeyImpl withProperties(ManagedHsmKeyProperties properties) {
+ this.createParameters.withProperties(properties);
+ return this;
+ }
+
+ public ManagedHsmKeyImpl withTags(Map tags) {
+ this.createParameters.withTags(tags);
+ return this;
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmKeysClientImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmKeysClientImpl.java
new file mode 100644
index 000000000000..39958e06ffd1
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmKeysClientImpl.java
@@ -0,0 +1,979 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.keyvault.generated.fluent.ManagedHsmKeysClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.ManagedHsmKeyInner;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmKeyCreateParameters;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmKeyListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in ManagedHsmKeysClient.
+ */
+public final class ManagedHsmKeysClientImpl implements ManagedHsmKeysClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final ManagedHsmKeysService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final KeyVaultManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ManagedHsmKeysClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ManagedHsmKeysClientImpl(KeyVaultManagementClientImpl client) {
+ this.service
+ = RestProxy.create(ManagedHsmKeysService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for KeyVaultManagementClientManagedHsmKeys to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "KeyVaultManagementCl")
+ public interface ManagedHsmKeysService {
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createIfNotExist(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name,
+ @QueryParam("api-version") String apiVersion, @PathParam("keyName") String keyName,
+ @BodyParam("application/json") ManagedHsmKeyCreateParameters parameters,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name,
+ @PathParam("keyName") String keyName, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}/versions/{keyVersion}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getVersion(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name,
+ @PathParam("keyName") String keyName, @PathParam("keyVersion") String keyVersion,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}/versions")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listVersions(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name,
+ @PathParam("keyName") String keyName, @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);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listVersionsNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createIfNotExistWithResponseAsync(String resourceGroupName, String name,
+ String keyName, ManagedHsmKeyCreateParameters parameters) {
+ 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createIfNotExist(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, name, this.client.getApiVersion(), keyName, parameters, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createIfNotExistWithResponseAsync(String resourceGroupName, String name,
+ String keyName, ManagedHsmKeyCreateParameters parameters, 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createIfNotExist(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ name, this.client.getApiVersion(), keyName, parameters, accept, context);
+ }
+
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createIfNotExistAsync(String resourceGroupName, String name, String keyName,
+ ManagedHsmKeyCreateParameters parameters) {
+ return createIfNotExistWithResponseAsync(resourceGroupName, name, keyName, parameters)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createIfNotExistWithResponse(String resourceGroupName, String name,
+ String keyName, ManagedHsmKeyCreateParameters parameters, Context context) {
+ return createIfNotExistWithResponseAsync(resourceGroupName, name, keyName, parameters, context).block();
+ }
+
+ /**
+ * Creates the first version of a new key if it does not exist. If it already exists, then the existing key is
+ * returned without any write operations being performed. This API does not create subsequent versions, and does not
+ * update existing keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param parameters The parameters used to create the specified key.
+ * @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 key resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ManagedHsmKeyInner createIfNotExist(String resourceGroupName, String name, String keyName,
+ ManagedHsmKeyCreateParameters parameters) {
+ return createIfNotExistWithResponse(resourceGroupName, name, keyName, parameters, Context.NONE).getValue();
+ }
+
+ /**
+ * Gets the current version of the specified key from the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 current version of the specified key from the specified managed HSM along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String name,
+ String keyName) {
+ 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, name, keyName, this.client.getApiVersion(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the current version of the specified key from the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 current version of the specified key from the specified managed HSM along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String name,
+ String keyName, 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, name, keyName,
+ this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * Gets the current version of the specified key from the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 current version of the specified key from the specified managed HSM on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String name, String keyName) {
+ return getWithResponseAsync(resourceGroupName, name, keyName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the current version of the specified key from the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 current version of the specified key from the specified managed HSM along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String name, String keyName,
+ Context context) {
+ return getWithResponseAsync(resourceGroupName, name, keyName, context).block();
+ }
+
+ /**
+ * Gets the current version of the specified key from the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 current version of the specified key from the specified managed HSM.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ManagedHsmKeyInner get(String resourceGroupName, String name, String keyName) {
+ return getWithResponse(resourceGroupName, name, keyName, Context.NONE).getValue();
+ }
+
+ /**
+ * Lists the keys in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified 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 the page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName, String name) {
+ 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, name, 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()));
+ }
+
+ /**
+ * Lists the keys in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified 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 the page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName, String name,
+ 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, name,
+ this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Lists the keys in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified 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 the page of keys as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String name) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, name),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the keys in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified 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 the page of keys as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String name, Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, name, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists the keys in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified 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 the page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String name) {
+ return new PagedIterable<>(listAsync(resourceGroupName, name));
+ }
+
+ /**
+ * Lists the keys in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified 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 the page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String name, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, name, context));
+ }
+
+ /**
+ * Gets the specified version of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified managed HSM along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getVersionWithResponseAsync(String resourceGroupName, String name,
+ String keyName, String keyVersion) {
+ 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ if (keyVersion == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyVersion is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getVersion(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, name, keyName, keyVersion, this.client.getApiVersion(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the specified version of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified managed HSM along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getVersionWithResponseAsync(String resourceGroupName, String name,
+ String keyName, String keyVersion, 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ if (keyVersion == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyVersion is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getVersion(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, name,
+ keyName, keyVersion, this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * Gets the specified version of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified managed HSM on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getVersionAsync(String resourceGroupName, String name, String keyName,
+ String keyVersion) {
+ return getVersionWithResponseAsync(resourceGroupName, name, keyName, keyVersion)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the specified version of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified managed HSM along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getVersionWithResponse(String resourceGroupName, String name, String keyName,
+ String keyVersion, Context context) {
+ return getVersionWithResponseAsync(resourceGroupName, name, keyName, keyVersion, context).block();
+ }
+
+ /**
+ * Gets the specified version of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @param keyVersion The version of the key to be retrieved.
+ * @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 specified version of the specified key in the specified managed HSM.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ManagedHsmKeyInner getVersion(String resourceGroupName, String name, String keyName, String keyVersion) {
+ return getVersionWithResponse(resourceGroupName, name, keyName, keyVersion, Context.NONE).getValue();
+ }
+
+ /**
+ * Lists the versions of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listVersionsSinglePageAsync(String resourceGroupName, String name,
+ String keyName) {
+ 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listVersions(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, name, keyName, 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()));
+ }
+
+ /**
+ * Lists the versions of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listVersionsSinglePageAsync(String resourceGroupName, String name,
+ String keyName, 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (keyName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listVersions(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, name, keyName,
+ this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Lists the versions of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 page of keys as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listVersionsAsync(String resourceGroupName, String name, String keyName) {
+ return new PagedFlux<>(() -> listVersionsSinglePageAsync(resourceGroupName, name, keyName),
+ nextLink -> listVersionsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the versions of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 page of keys as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listVersionsAsync(String resourceGroupName, String name, String keyName,
+ Context context) {
+ return new PagedFlux<>(() -> listVersionsSinglePageAsync(resourceGroupName, name, keyName, context),
+ nextLink -> listVersionsNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists the versions of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listVersions(String resourceGroupName, String name, String keyName) {
+ return new PagedIterable<>(listVersionsAsync(resourceGroupName, name, keyName));
+ }
+
+ /**
+ * Lists the versions of the specified key in the specified managed HSM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Managed HSM Pool within the specified resource group.
+ * @param keyName The name of the key to be created. The value you provide may be copied globally for the purpose of
+ * running the service. The value provided should not include personally identifiable or sensitive information.
+ * @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 page of keys as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listVersions(String resourceGroupName, String name, String keyName,
+ Context context) {
+ return new PagedIterable<>(listVersionsAsync(resourceGroupName, name, keyName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @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 URL to get the next list of items.
+ * @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 page of keys along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono