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 ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new 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 Vaults. It manages Vault.
+ *
+ * @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 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 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;
+ }
+
+ /**
+ * @return Wrapped service client KeyVaultManagementClient providing direct access to the underlying auto-generated
+ * API implementation, based on Azure REST API.
+ */
+ 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 0000000000000..fbee2a3d88d10
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/KeyVaultManagementClient.java
@@ -0,0 +1,117 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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 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 ManagedHsmKeysClient object to access its operations.
+ *
+ * @return the ManagedHsmKeysClient object.
+ */
+ ManagedHsmKeysClient getManagedHsmKeys();
+
+ /**
+ * 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 0000000000000..d364645421dac
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/KeysClient.java
@@ -0,0 +1,172 @@
+// 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 0000000000000..19746a2f228b4
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/ManagedHsmKeysClient.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.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 0000000000000..de5df824e1d25
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/ManagedHsmsClient.java
@@ -0,0 +1,423 @@
+// 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 0000000000000..8ad25a28cf499
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/MhsmPrivateEndpointConnectionsClient.java
@@ -0,0 +1,193 @@
+// 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 0000000000000..e2670563f617e
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/MhsmPrivateLinkResourcesClient.java
@@ -0,0 +1,42 @@
+// 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/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 0000000000000..d052731fcdc26
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/OperationsClient.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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 0000000000000..701d30c70e0fc
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,179 @@
+// 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 0000000000000..d3b80b5eaeb7a
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/PrivateLinkResourcesClient.java
@@ -0,0 +1,42 @@
+// 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 0000000000000..33b141c7c674e
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/SecretsClient.java
@@ -0,0 +1,158 @@
+// 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 0000000000000..771323b12e43a
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/VaultsClient.java
@@ -0,0 +1,410 @@
+// 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;
+import com.azure.resourcemanager.keyvault.generated.models.VaultCreateOrUpdateParameters;
+import com.azure.resourcemanager.keyvault.generated.models.VaultPatchParameters;
+
+/** An instance of this class provides access to all the operations defined in VaultsClient. */
+public interface VaultsClient {
+ /**
+ * Create or update a key vault in the specified subscription.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the server belongs.
+ * @param vaultName Name of the vault.
+ * @param parameters Parameters to create or update 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 {@link SyncPoller} for polling of resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, VaultInner> beginCreateOrUpdate(
+ String resourceGroupName, String vaultName, VaultCreateOrUpdateParameters parameters);
+
+ /**
+ * Create or update a key vault in the specified subscription.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the server belongs.
+ * @param vaultName Name of the vault.
+ * @param parameters Parameters to create or update 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 {@link SyncPoller} for polling of resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, VaultInner> beginCreateOrUpdate(
+ String resourceGroupName, String vaultName, VaultCreateOrUpdateParameters parameters, Context context);
+
+ /**
+ * Create or update a key vault in the specified subscription.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the server belongs.
+ * @param vaultName Name of the vault.
+ * @param parameters Parameters to create or update 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 resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VaultInner createOrUpdate(String resourceGroupName, String vaultName, VaultCreateOrUpdateParameters parameters);
+
+ /**
+ * Create or update a key vault in the specified subscription.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the server belongs.
+ * @param vaultName Name of the vault.
+ * @param parameters Parameters to create or update 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 resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VaultInner createOrUpdate(
+ String resourceGroupName, String vaultName, VaultCreateOrUpdateParameters parameters, Context context);
+
+ /**
+ * Update a key vault in the specified subscription.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the server belongs.
+ * @param vaultName Name of the vault.
+ * @param parameters Parameters to patch 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 resource information with extended details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String vaultName, VaultPatchParameters parameters, Context context);
+
+ /**
+ * Update a key vault in the specified subscription.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the server belongs.
+ * @param vaultName Name of the vault.
+ * @param parameters Parameters to patch 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 resource information with extended details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VaultInner update(String resourceGroupName, String vaultName, VaultPatchParameters parameters);
+
+ /**
+ * Deletes the specified Azure key vault.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @param vaultName The name of the vault to delete.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String vaultName, Context context);
+
+ /**
+ * Deletes the specified Azure key vault.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @param vaultName The name of the vault to delete.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String vaultName);
+
+ /**
+ * Gets the specified Azure key vault.
+ *
+ * @param resourceGroupName The name of the Resource Group to which the vault belongs.
+ * @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 specified Azure key vault along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String vaultName, Context context);
+
+ /**
+ * Gets the specified Azure key vault.
+ *
+ * @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 the specified Azure key vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VaultInner getByResourceGroup(String resourceGroupName, String vaultName);
+
+ /**
+ * 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 0000000000000..639ce631d4040
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/CheckMhsmNameAvailabilityResultInner.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.keyvault.generated.models.Reason;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The CheckMhsmNameAvailability operation response. */
+@Immutable
+public final class CheckMhsmNameAvailabilityResultInner {
+ /*
+ * 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.
+ */
+ @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean nameAvailable;
+
+ /*
+ * The reason that a managed hsm name could not be used. The reason element is only returned if NameAvailable is
+ * false.
+ */
+ @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY)
+ private Reason reason;
+
+ /*
+ * An error message explaining the Reason value in more detail.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ 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() {
+ }
+}
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 0000000000000..76d650f79da6b
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/CheckNameAvailabilityResultInner.java
@@ -0,0 +1,73 @@
+// 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.resourcemanager.keyvault.generated.models.Reason;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The CheckNameAvailability operation response. */
+@Immutable
+public final class CheckNameAvailabilityResultInner {
+ /*
+ * 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.
+ */
+ @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean nameAvailable;
+
+ /*
+ * The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false.
+ */
+ @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY)
+ private Reason reason;
+
+ /*
+ * An error message explaining the Reason value in more detail.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ 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() {
+ }
+}
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 0000000000000..070129530d957
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/DeletedManagedHsmInner.java
@@ -0,0 +1,99 @@
+// 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.resourcemanager.keyvault.generated.models.DeletedManagedHsmProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The DeletedManagedHsm model. */
+@Fluent
+public final class DeletedManagedHsmInner {
+ /*
+ * The Azure Resource Manager resource ID for the deleted managed HSM Pool.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * The name of the managed HSM Pool.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The resource type of the managed HSM Pool.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /*
+ * Properties of the deleted managed HSM
+ */
+ @JsonProperty(value = "properties")
+ 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();
+ }
+ }
+}
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 0000000000000..b83b059235aa5
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/DeletedVaultInner.java
@@ -0,0 +1,99 @@
+// 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.resourcemanager.keyvault.generated.models.DeletedVaultProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Deleted vault information with extended details. */
+@Fluent
+public final class DeletedVaultInner {
+ /*
+ * The resource ID for the deleted key vault.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * The name of the key vault.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The resource type of the key vault.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /*
+ * Properties of the vault
+ */
+ @JsonProperty(value = "properties")
+ 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();
+ }
+ }
+}
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 0000000000000..252a133e77973
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/KeyInner.java
@@ -0,0 +1,255 @@
+// 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.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 com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** The key resource. */
+@Fluent
+public final class KeyInner extends Resource {
+ /*
+ * The properties of the key.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private KeyProperties innerProperties = new KeyProperties();
+
+ /** 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;
+ }
+
+ /** {@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
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property innerProperties in model KeyInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(KeyInner.class);
+}
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 0000000000000..92755c73c4902
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/KeyProperties.java
@@ -0,0 +1,256 @@
+// 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.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 com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The properties of the key. */
+@Fluent
+public final class KeyProperties {
+ /*
+ * The attributes of the key.
+ */
+ @JsonProperty(value = "attributes")
+ private KeyAttributes attributes;
+
+ /*
+ * The type of the key. For valid values, see JsonWebKeyType.
+ */
+ @JsonProperty(value = "kty")
+ private JsonWebKeyType kty;
+
+ /*
+ * The keyOps property.
+ */
+ @JsonProperty(value = "keyOps")
+ private List keyOps;
+
+ /*
+ * The key size in bits. For example: 2048, 3072, or 4096 for RSA.
+ */
+ @JsonProperty(value = "keySize")
+ private Integer keySize;
+
+ /*
+ * The elliptic curve name. For valid values, see JsonWebKeyCurveName.
+ */
+ @JsonProperty(value = "curveName")
+ private JsonWebKeyCurveName curveName;
+
+ /*
+ * The URI to retrieve the current version of the key.
+ */
+ @JsonProperty(value = "keyUri", access = JsonProperty.Access.WRITE_ONLY)
+ private String keyUri;
+
+ /*
+ * The URI to retrieve the specific version of the key.
+ */
+ @JsonProperty(value = "keyUriWithVersion", access = JsonProperty.Access.WRITE_ONLY)
+ private String keyUriWithVersion;
+
+ /*
+ * Key rotation policy in response. It will be used for both output and input. Omitted if empty
+ */
+ @JsonProperty(value = "rotationPolicy")
+ private RotationPolicy rotationPolicy;
+
+ /*
+ * Key release policy in response. It will be used for both output and input. Omitted if empty
+ */
+ @JsonProperty(value = "release_policy")
+ 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();
+ }
+ }
+}
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 0000000000000..b9ff96d6e260c
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/ManagedHsmInner.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+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.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Resource information with extended details. */
+@Fluent
+public final class ManagedHsmInner extends ManagedHsmResource {
+ /*
+ * Properties of the managed HSM
+ */
+ @JsonProperty(value = "properties")
+ private ManagedHsmProperties properties;
+
+ /** 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;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ManagedHsmInner withSku(ManagedHsmSku sku) {
+ super.withSku(sku);
+ 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() {
+ super.validate();
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
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 0000000000000..925df803020a7
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/ManagedHsmKeyInner.java
@@ -0,0 +1,251 @@
+// 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.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 com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** The key resource. */
+@Fluent
+public final class ManagedHsmKeyInner extends ProxyResourceWithoutSystemData {
+ /*
+ * The properties of the key.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private ManagedHsmKeyProperties innerProperties = new ManagedHsmKeyProperties();
+
+ /** 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;
+ }
+
+ /** {@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() {
+ super.validate();
+ if (innerProperties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model ManagedHsmKeyInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ManagedHsmKeyInner.class);
+}
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 0000000000000..515aeb0ca8b32
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/ManagedHsmKeyProperties.java
@@ -0,0 +1,256 @@
+// 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.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.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The properties of the key. */
+@Fluent
+public final class ManagedHsmKeyProperties {
+ /*
+ * The attributes of the key.
+ */
+ @JsonProperty(value = "attributes")
+ private ManagedHsmKeyAttributes attributes;
+
+ /*
+ * The type of the key. For valid values, see JsonWebKeyType.
+ */
+ @JsonProperty(value = "kty")
+ private JsonWebKeyType kty;
+
+ /*
+ * The keyOps property.
+ */
+ @JsonProperty(value = "keyOps")
+ private List keyOps;
+
+ /*
+ * The key size in bits. For example: 2048, 3072, or 4096 for RSA.
+ */
+ @JsonProperty(value = "keySize")
+ private Integer keySize;
+
+ /*
+ * The elliptic curve name. For valid values, see JsonWebKeyCurveName.
+ */
+ @JsonProperty(value = "curveName")
+ private JsonWebKeyCurveName curveName;
+
+ /*
+ * The URI to retrieve the current version of the key.
+ */
+ @JsonProperty(value = "keyUri", access = JsonProperty.Access.WRITE_ONLY)
+ private String keyUri;
+
+ /*
+ * The URI to retrieve the specific version of the key.
+ */
+ @JsonProperty(value = "keyUriWithVersion", access = JsonProperty.Access.WRITE_ONLY)
+ private String keyUriWithVersion;
+
+ /*
+ * Key rotation policy in response. It will be used for both output and input. Omitted if empty
+ */
+ @JsonProperty(value = "rotationPolicy")
+ private ManagedHsmRotationPolicy rotationPolicy;
+
+ /*
+ * Key release policy in response. It will be used for both output and input. Omitted if empty
+ */
+ @JsonProperty(value = "release_policy")
+ 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();
+ }
+ }
+}
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 0000000000000..2b4ad46d3836e
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateEndpointConnectionInner.java
@@ -0,0 +1,168 @@
+// 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.resourcemanager.keyvault.generated.models.ManagedHsmResource;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmSku;
+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 com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Private endpoint connection resource. */
+@Fluent
+public final class MhsmPrivateEndpointConnectionInner extends ManagedHsmResource {
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private MhsmPrivateEndpointConnectionProperties innerProperties;
+
+ /*
+ * Modified whenever there is a change in the state of private endpoint connection.
+ */
+ @JsonProperty(value = "etag")
+ private String etag;
+
+ /** 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;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public MhsmPrivateEndpointConnectionInner withSku(ManagedHsmSku sku) {
+ super.withSku(sku);
+ 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() {
+ super.validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
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 0000000000000..becd63a6e3b1b
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateEndpointConnectionProperties.java
@@ -0,0 +1,113 @@
+// 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.resourcemanager.keyvault.generated.models.MhsmPrivateEndpoint;
+import com.azure.resourcemanager.keyvault.generated.models.MhsmPrivateLinkServiceConnectionState;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateEndpointConnectionProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of the private endpoint connection resource. */
+@Fluent
+public final class MhsmPrivateEndpointConnectionProperties {
+ /*
+ * Properties of the private endpoint object.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private MhsmPrivateEndpoint privateEndpoint;
+
+ /*
+ * Approval state of the private link connection.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState")
+ private MhsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * Provisioning state of the private endpoint connection.
+ */
+ @JsonProperty(value = "provisioningState")
+ 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();
+ }
+ }
+}
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 0000000000000..700e1095d8b34
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateLinkResourceListResultInner.java
@@ -0,0 +1,55 @@
+// 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.resourcemanager.keyvault.generated.models.MhsmPrivateLinkResource;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A list of private link resources. */
+@Fluent
+public final class MhsmPrivateLinkResourceListResultInner {
+ /*
+ * Array of private link resources
+ */
+ @JsonProperty(value = "value")
+ 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());
+ }
+ }
+}
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 0000000000000..951d8684d8097
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/MhsmPrivateLinkResourceProperties.java
@@ -0,0 +1,81 @@
+// 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.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of a private link resource. */
+@Fluent
+public final class MhsmPrivateLinkResourceProperties {
+ /*
+ * Group identifier of private link resource.
+ */
+ @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY)
+ private String groupId;
+
+ /*
+ * Required member names of private link resource.
+ */
+ @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
+ private List requiredMembers;
+
+ /*
+ * Required DNS zone names of the the private link resource.
+ */
+ @JsonProperty(value = "requiredZoneNames")
+ 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() {
+ }
+}
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 0000000000000..328b1f784217e
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/OperationInner.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.resourcemanager.keyvault.generated.models.OperationDisplay;
+import com.azure.resourcemanager.keyvault.generated.models.ServiceSpecification;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Key Vault REST API operation definition. */
+@Fluent
+public final class OperationInner {
+ /*
+ * Operation name: {provider}/{resource}/{operation}
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Display metadata associated with the operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /*
+ * The origin of operations.
+ */
+ @JsonProperty(value = "origin")
+ private String origin;
+
+ /*
+ * Properties of operation, include metric specifications.
+ */
+ @JsonProperty(value = "properties")
+ private OperationProperties innerOperationProperties;
+
+ /*
+ * Property to specify whether the action is a data action.
+ */
+ @JsonProperty(value = "isDataAction")
+ 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();
+ }
+ }
+}
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 0000000000000..77bd6d678cc68
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/OperationProperties.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.keyvault.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.keyvault.generated.models.ServiceSpecification;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of operation, include metric specifications. */
+@Fluent
+public final class OperationProperties {
+ /*
+ * One property of operation, include metric specifications.
+ */
+ @JsonProperty(value = "serviceSpecification")
+ 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();
+ }
+ }
+}
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 0000000000000..a07004704384b
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,158 @@
+// 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.resourcemanager.keyvault.generated.models.PrivateEndpoint;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Private endpoint connection resource. */
+@Fluent
+public final class PrivateEndpointConnectionInner extends Resource {
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties innerProperties;
+
+ /*
+ * Modified whenever there is a change in the state of private endpoint connection.
+ */
+ @JsonProperty(value = "etag")
+ private String etag;
+
+ /** 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;
+ }
+
+ /** {@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();
+ }
+ }
+}
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 0000000000000..c6cc33220be38
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,113 @@
+// 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.resourcemanager.keyvault.generated.models.PrivateEndpoint;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.keyvault.generated.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of the private endpoint connection resource. */
+@Fluent
+public final class PrivateEndpointConnectionProperties {
+ /*
+ * Properties of the private endpoint object.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpoint privateEndpoint;
+
+ /*
+ * Approval state of the private link connection.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState")
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * Provisioning state of the private endpoint connection.
+ */
+ @JsonProperty(value = "provisioningState")
+ 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();
+ }
+ }
+}
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 0000000000000..8cdbb1df2fef6
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateLinkResourceListResultInner.java
@@ -0,0 +1,55 @@
+// 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.resourcemanager.keyvault.generated.models.PrivateLinkResource;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A list of private link resources. */
+@Fluent
+public final class PrivateLinkResourceListResultInner {
+ /*
+ * Array of private link resources
+ */
+ @JsonProperty(value = "value")
+ 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());
+ }
+ }
+}
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 0000000000000..fe052d5113be6
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/PrivateLinkResourceProperties.java
@@ -0,0 +1,81 @@
+// 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.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of a private link resource. */
+@Fluent
+public final class PrivateLinkResourceProperties {
+ /*
+ * Group identifier of private link resource.
+ */
+ @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY)
+ private String groupId;
+
+ /*
+ * Required member names of private link resource.
+ */
+ @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
+ private List requiredMembers;
+
+ /*
+ * Required DNS zone names of the the private link resource.
+ */
+ @JsonProperty(value = "requiredZoneNames")
+ 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() {
+ }
+}
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 0000000000000..bc09500ffcedd
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/SecretInner.java
@@ -0,0 +1,77 @@
+// 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.resourcemanager.keyvault.generated.models.SecretProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Resource information with extended details. */
+@Fluent
+public final class SecretInner extends Resource {
+ /*
+ * Properties of the secret
+ */
+ @JsonProperty(value = "properties", required = true)
+ private SecretProperties properties;
+
+ /** 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;
+ }
+
+ /** {@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
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property properties in model SecretInner"));
+ } else {
+ properties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(SecretInner.class);
+}
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 0000000000000..d549af86516d4
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/VaultAccessPolicyParametersInner.java
@@ -0,0 +1,78 @@
+// 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.resourcemanager.keyvault.generated.models.VaultAccessPolicyProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Parameters for updating the access policy in a vault. */
+@Fluent
+public final class VaultAccessPolicyParametersInner extends ProxyResource {
+ /*
+ * The resource type of the access policy.
+ */
+ @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY)
+ private String location;
+
+ /*
+ * Properties of the access policy
+ */
+ @JsonProperty(value = "properties", required = true)
+ private VaultAccessPolicyProperties properties;
+
+ /** 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;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property properties in model VaultAccessPolicyParametersInner"));
+ } else {
+ properties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(VaultAccessPolicyParametersInner.class);
+}
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 0000000000000..629d51dc4fd6d
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/fluent/models/VaultInner.java
@@ -0,0 +1,93 @@
+// 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.resourcemanager.keyvault.generated.models.VaultProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Resource information with extended details. */
+@Fluent
+public final class VaultInner extends Resource {
+ /*
+ * System metadata for the key vault.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * Properties of the vault
+ */
+ @JsonProperty(value = "properties", required = true)
+ private VaultProperties properties;
+
+ /** 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;
+ }
+
+ /** {@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
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property properties in model VaultInner"));
+ } else {
+ properties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(VaultInner.class);
+}
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 0000000000000..b8b64813b1fe5
--- /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 0000000000000..701bc9105a453
--- /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 0000000000000..ed4582b751781
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/CheckMhsmNameAvailabilityResultImpl.java
@@ -0,0 +1,42 @@
+// 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 0000000000000..d0d72a84f82c6
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/CheckNameAvailabilityResultImpl.java
@@ -0,0 +1,42 @@
+// 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 0000000000000..9d4d5a26c43c3
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/DeletedManagedHsmImpl.java
@@ -0,0 +1,46 @@
+// 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 0000000000000..d1f9a7c920015
--- /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 0000000000000..2b9a6aaf8f6c5
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeyImpl.java
@@ -0,0 +1,185 @@
+// 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 0000000000000..8fe50c7697268
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeyVaultManagementClientBuilder.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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,
+ 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 0000000000000..49c34e324e66d
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeyVaultManagementClientImpl.java
@@ -0,0 +1,421 @@
+// 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.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.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 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 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 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 = "2022-11-01";
+ this.keys = new KeysClientImpl(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.managedHsmKeys = new ManagedHsmKeysClientImpl(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(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 0000000000000..08c5c6ab465fe
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeysClientImpl.java
@@ -0,0 +1,1196 @@
+// 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
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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 0000000000000..c5c27037a1eb7
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/KeysImpl.java
@@ -0,0 +1,161 @@
+// 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 Utils.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 Utils.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 Utils.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 Utils.mapPage(inner, inner1 -> new KeyImpl(inner1, this.manager()));
+ }
+
+ public Key getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String vaultName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String vaultName = Utils.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 = Utils.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 0000000000000..952552af79c43
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmImpl.java
@@ -0,0 +1,183 @@
+// 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 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 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 = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.name = Utils.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 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 0000000000000..366802a7dd197
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmKeyImpl.java
@@ -0,0 +1,173 @@
+// 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 0000000000000..1db9eb36173c6
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmKeysClientImpl.java
@@ -0,0 +1,1221 @@
+// 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
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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/ManagedHsmKeysImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmKeysImpl.java
new file mode 100644
index 0000000000000..5235cb8a798fa
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmKeysImpl.java
@@ -0,0 +1,163 @@
+// 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.ManagedHsmKeysClient;
+import com.azure.resourcemanager.keyvault.generated.fluent.models.ManagedHsmKeyInner;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmKey;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmKeys;
+
+public final class ManagedHsmKeysImpl implements ManagedHsmKeys {
+ private static final ClientLogger LOGGER = new ClientLogger(ManagedHsmKeysImpl.class);
+
+ private final ManagedHsmKeysClient innerClient;
+
+ private final com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager;
+
+ public ManagedHsmKeysImpl(
+ ManagedHsmKeysClient innerClient, com.azure.resourcemanager.keyvault.generated.KeyVaultManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String name, String keyName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, name, keyName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ManagedHsmKeyImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ManagedHsmKey get(String resourceGroupName, String name, String keyName) {
+ ManagedHsmKeyInner inner = this.serviceClient().get(resourceGroupName, name, keyName);
+ if (inner != null) {
+ return new ManagedHsmKeyImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list(String resourceGroupName, String name) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, name);
+ return Utils.mapPage(inner, inner1 -> new ManagedHsmKeyImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String name, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, name, context);
+ return Utils.mapPage(inner, inner1 -> new ManagedHsmKeyImpl(inner1, this.manager()));
+ }
+
+ public Response getVersionWithResponse(
+ String resourceGroupName, String name, String keyName, String keyVersion, Context context) {
+ Response inner =
+ this.serviceClient().getVersionWithResponse(resourceGroupName, name, keyName, keyVersion, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ManagedHsmKeyImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ManagedHsmKey getVersion(String resourceGroupName, String name, String keyName, String keyVersion) {
+ ManagedHsmKeyInner inner = this.serviceClient().getVersion(resourceGroupName, name, keyName, keyVersion);
+ if (inner != null) {
+ return new ManagedHsmKeyImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listVersions(String resourceGroupName, String name, String keyName) {
+ PagedIterable inner = this.serviceClient().listVersions(resourceGroupName, name, keyName);
+ return Utils.mapPage(inner, inner1 -> new ManagedHsmKeyImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listVersions(
+ String resourceGroupName, String name, String keyName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listVersions(resourceGroupName, name, keyName, context);
+ return Utils.mapPage(inner, inner1 -> new ManagedHsmKeyImpl(inner1, this.manager()));
+ }
+
+ public ManagedHsmKey getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String name = Utils.getValueFromIdByName(id, "managedHSMs");
+ if (name == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'managedHSMs'.", id)));
+ }
+ String keyName = Utils.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, name, keyName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String name = Utils.getValueFromIdByName(id, "managedHSMs");
+ if (name == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'managedHSMs'.", id)));
+ }
+ String keyName = Utils.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, name, keyName, context);
+ }
+
+ private ManagedHsmKeysClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.keyvault.generated.KeyVaultManager manager() {
+ return this.serviceManager;
+ }
+
+ public ManagedHsmKeyImpl define(String name) {
+ return new ManagedHsmKeyImpl(name, this.manager());
+ }
+}
diff --git a/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmsClientImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmsClientImpl.java
new file mode 100644
index 0000000000000..693857a6667d9
--- /dev/null
+++ b/sdk/keyvault/azure-resourcemanager-keyvault-generated/src/main/java/com/azure/resourcemanager/keyvault/generated/implementation/ManagedHsmsClientImpl.java
@@ -0,0 +1,2366 @@
+// 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.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.keyvault.generated.fluent.ManagedHsmsClient;
+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;
+import com.azure.resourcemanager.keyvault.generated.models.DeletedManagedHsmListResult;
+import com.azure.resourcemanager.keyvault.generated.models.ErrorException;
+import com.azure.resourcemanager.keyvault.generated.models.ManagedHsmListResult;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ManagedHsmsClient. */
+public final class ManagedHsmsClientImpl implements ManagedHsmsClient {
+ /** The proxy service used to perform REST calls. */
+ private final ManagedHsmsService service;
+
+ /** The service client containing this operation class. */
+ private final KeyVaultManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ManagedHsmsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ManagedHsmsClientImpl(KeyVaultManagementClientImpl client) {
+ this.service =
+ RestProxy.create(ManagedHsmsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for KeyVaultManagementClientManagedHsms to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "KeyVaultManagementCl")
+ public interface ManagedHsmsService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault"
+ + "/managedHSMs/{name}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ErrorException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("name") String name,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") ManagedHsmInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault"
+ + "/managedHSMs/{name}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ErrorException.class)
+ Mono>> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("name") String name,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") ManagedHsmInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault"
+ + "/managedHSMs/{name}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ErrorException.class)
+ Mono