diff --git a/sdk/keyvault/Azure.Management.KeyVault/Azure.Management.KeyVault.sln b/sdk/keyvault/Azure.Management.KeyVault/Azure.Management.KeyVault.sln
new file mode 100644
index 0000000000000..d25b9652f4b76
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/Azure.Management.KeyVault.sln
@@ -0,0 +1,121 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30011.22
+MinimumVisualStudioVersion = 15.0.26124.0
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Management.KeyVault", "src\Azure.Management.KeyVault.csproj", "{68CD0142-EAA5-4D17-B574-0E059D28908B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Management.KeyVault.Tests", "tests\Azure.Management.KeyVault.Tests.csproj", "{831C392A-50D2-45D4-8AC9-CDB1FF7B443E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{D834F7AA-20E1-4A74-8474-6E367332E3EB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core", "..\..\core\Azure.Core\src\Azure.Core.csproj", "{91F4FCC0-AEB7-4FEC-B3C2-7A3F9764CB51}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Identity", "..\..\identity\Azure.Identity\src\Azure.Identity.csproj", "{CDBD55B6-0742-464F-8188-3BF17006FA34}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Graph.Rbac", "..\..\testcommon\Azure.Graph.Rbac\src\Azure.Graph.Rbac.csproj", "{4CACB10F-8A47-4BF5-9AA7-C8303D8E4BD2}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Management.Resource", "..\..\testcommon\Azure.Management.Resource.2017_05\src\Azure.Management.Resource.csproj", "{E55AC16E-98FB-4C1F-A873-C9ADDA0896CA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {68CD0142-EAA5-4D17-B574-0E059D28908B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {68CD0142-EAA5-4D17-B574-0E059D28908B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {68CD0142-EAA5-4D17-B574-0E059D28908B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {68CD0142-EAA5-4D17-B574-0E059D28908B}.Debug|x64.Build.0 = Debug|Any CPU
+ {68CD0142-EAA5-4D17-B574-0E059D28908B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {68CD0142-EAA5-4D17-B574-0E059D28908B}.Debug|x86.Build.0 = Debug|Any CPU
+ {68CD0142-EAA5-4D17-B574-0E059D28908B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {68CD0142-EAA5-4D17-B574-0E059D28908B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {68CD0142-EAA5-4D17-B574-0E059D28908B}.Release|x64.ActiveCfg = Release|Any CPU
+ {68CD0142-EAA5-4D17-B574-0E059D28908B}.Release|x64.Build.0 = Release|Any CPU
+ {68CD0142-EAA5-4D17-B574-0E059D28908B}.Release|x86.ActiveCfg = Release|Any CPU
+ {68CD0142-EAA5-4D17-B574-0E059D28908B}.Release|x86.Build.0 = Release|Any CPU
+ {831C392A-50D2-45D4-8AC9-CDB1FF7B443E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {831C392A-50D2-45D4-8AC9-CDB1FF7B443E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {831C392A-50D2-45D4-8AC9-CDB1FF7B443E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {831C392A-50D2-45D4-8AC9-CDB1FF7B443E}.Debug|x64.Build.0 = Debug|Any CPU
+ {831C392A-50D2-45D4-8AC9-CDB1FF7B443E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {831C392A-50D2-45D4-8AC9-CDB1FF7B443E}.Debug|x86.Build.0 = Debug|Any CPU
+ {831C392A-50D2-45D4-8AC9-CDB1FF7B443E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {831C392A-50D2-45D4-8AC9-CDB1FF7B443E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {831C392A-50D2-45D4-8AC9-CDB1FF7B443E}.Release|x64.ActiveCfg = Release|Any CPU
+ {831C392A-50D2-45D4-8AC9-CDB1FF7B443E}.Release|x64.Build.0 = Release|Any CPU
+ {831C392A-50D2-45D4-8AC9-CDB1FF7B443E}.Release|x86.ActiveCfg = Release|Any CPU
+ {831C392A-50D2-45D4-8AC9-CDB1FF7B443E}.Release|x86.Build.0 = Release|Any CPU
+ {D834F7AA-20E1-4A74-8474-6E367332E3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D834F7AA-20E1-4A74-8474-6E367332E3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D834F7AA-20E1-4A74-8474-6E367332E3EB}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D834F7AA-20E1-4A74-8474-6E367332E3EB}.Debug|x64.Build.0 = Debug|Any CPU
+ {D834F7AA-20E1-4A74-8474-6E367332E3EB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D834F7AA-20E1-4A74-8474-6E367332E3EB}.Debug|x86.Build.0 = Debug|Any CPU
+ {D834F7AA-20E1-4A74-8474-6E367332E3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D834F7AA-20E1-4A74-8474-6E367332E3EB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D834F7AA-20E1-4A74-8474-6E367332E3EB}.Release|x64.ActiveCfg = Release|Any CPU
+ {D834F7AA-20E1-4A74-8474-6E367332E3EB}.Release|x64.Build.0 = Release|Any CPU
+ {D834F7AA-20E1-4A74-8474-6E367332E3EB}.Release|x86.ActiveCfg = Release|Any CPU
+ {D834F7AA-20E1-4A74-8474-6E367332E3EB}.Release|x86.Build.0 = Release|Any CPU
+ {91F4FCC0-AEB7-4FEC-B3C2-7A3F9764CB51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {91F4FCC0-AEB7-4FEC-B3C2-7A3F9764CB51}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {91F4FCC0-AEB7-4FEC-B3C2-7A3F9764CB51}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {91F4FCC0-AEB7-4FEC-B3C2-7A3F9764CB51}.Debug|x64.Build.0 = Debug|Any CPU
+ {91F4FCC0-AEB7-4FEC-B3C2-7A3F9764CB51}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {91F4FCC0-AEB7-4FEC-B3C2-7A3F9764CB51}.Debug|x86.Build.0 = Debug|Any CPU
+ {91F4FCC0-AEB7-4FEC-B3C2-7A3F9764CB51}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {91F4FCC0-AEB7-4FEC-B3C2-7A3F9764CB51}.Release|Any CPU.Build.0 = Release|Any CPU
+ {91F4FCC0-AEB7-4FEC-B3C2-7A3F9764CB51}.Release|x64.ActiveCfg = Release|Any CPU
+ {91F4FCC0-AEB7-4FEC-B3C2-7A3F9764CB51}.Release|x64.Build.0 = Release|Any CPU
+ {91F4FCC0-AEB7-4FEC-B3C2-7A3F9764CB51}.Release|x86.ActiveCfg = Release|Any CPU
+ {91F4FCC0-AEB7-4FEC-B3C2-7A3F9764CB51}.Release|x86.Build.0 = Release|Any CPU
+ {CDBD55B6-0742-464F-8188-3BF17006FA34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CDBD55B6-0742-464F-8188-3BF17006FA34}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CDBD55B6-0742-464F-8188-3BF17006FA34}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {CDBD55B6-0742-464F-8188-3BF17006FA34}.Debug|x64.Build.0 = Debug|Any CPU
+ {CDBD55B6-0742-464F-8188-3BF17006FA34}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CDBD55B6-0742-464F-8188-3BF17006FA34}.Debug|x86.Build.0 = Debug|Any CPU
+ {CDBD55B6-0742-464F-8188-3BF17006FA34}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CDBD55B6-0742-464F-8188-3BF17006FA34}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CDBD55B6-0742-464F-8188-3BF17006FA34}.Release|x64.ActiveCfg = Release|Any CPU
+ {CDBD55B6-0742-464F-8188-3BF17006FA34}.Release|x64.Build.0 = Release|Any CPU
+ {CDBD55B6-0742-464F-8188-3BF17006FA34}.Release|x86.ActiveCfg = Release|Any CPU
+ {CDBD55B6-0742-464F-8188-3BF17006FA34}.Release|x86.Build.0 = Release|Any CPU
+ {4CACB10F-8A47-4BF5-9AA7-C8303D8E4BD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4CACB10F-8A47-4BF5-9AA7-C8303D8E4BD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4CACB10F-8A47-4BF5-9AA7-C8303D8E4BD2}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4CACB10F-8A47-4BF5-9AA7-C8303D8E4BD2}.Debug|x64.Build.0 = Debug|Any CPU
+ {4CACB10F-8A47-4BF5-9AA7-C8303D8E4BD2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4CACB10F-8A47-4BF5-9AA7-C8303D8E4BD2}.Debug|x86.Build.0 = Debug|Any CPU
+ {4CACB10F-8A47-4BF5-9AA7-C8303D8E4BD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4CACB10F-8A47-4BF5-9AA7-C8303D8E4BD2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4CACB10F-8A47-4BF5-9AA7-C8303D8E4BD2}.Release|x64.ActiveCfg = Release|Any CPU
+ {4CACB10F-8A47-4BF5-9AA7-C8303D8E4BD2}.Release|x64.Build.0 = Release|Any CPU
+ {4CACB10F-8A47-4BF5-9AA7-C8303D8E4BD2}.Release|x86.ActiveCfg = Release|Any CPU
+ {4CACB10F-8A47-4BF5-9AA7-C8303D8E4BD2}.Release|x86.Build.0 = Release|Any CPU
+ {E55AC16E-98FB-4C1F-A873-C9ADDA0896CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E55AC16E-98FB-4C1F-A873-C9ADDA0896CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E55AC16E-98FB-4C1F-A873-C9ADDA0896CA}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E55AC16E-98FB-4C1F-A873-C9ADDA0896CA}.Debug|x64.Build.0 = Debug|Any CPU
+ {E55AC16E-98FB-4C1F-A873-C9ADDA0896CA}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E55AC16E-98FB-4C1F-A873-C9ADDA0896CA}.Debug|x86.Build.0 = Debug|Any CPU
+ {E55AC16E-98FB-4C1F-A873-C9ADDA0896CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E55AC16E-98FB-4C1F-A873-C9ADDA0896CA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E55AC16E-98FB-4C1F-A873-C9ADDA0896CA}.Release|x64.ActiveCfg = Release|Any CPU
+ {E55AC16E-98FB-4C1F-A873-C9ADDA0896CA}.Release|x64.Build.0 = Release|Any CPU
+ {E55AC16E-98FB-4C1F-A873-C9ADDA0896CA}.Release|x86.ActiveCfg = Release|Any CPU
+ {E55AC16E-98FB-4C1F-A873-C9ADDA0896CA}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {EEF0B562-43E9-4E60-B175-1E70BF329831}
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/keyvault/Azure.Management.KeyVault/CHANGELOG.md b/sdk/keyvault/Azure.Management.KeyVault/CHANGELOG.md
new file mode 100644
index 0000000000000..b183b6bdac5c9
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/CHANGELOG.md
@@ -0,0 +1,6 @@
+# Release History
+
+## 1.0.0-preview.1
+
+### New Features
+- Initial preview of Azure Management KeyVault SDK based on Azure.Core
\ No newline at end of file
diff --git a/sdk/keyvault/Azure.Management.KeyVault/Directory.Build.props b/sdk/keyvault/Azure.Management.KeyVault/Directory.Build.props
new file mode 100644
index 0000000000000..1a9611bd49242
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/keyvault/Azure.Management.KeyVault/README.md b/sdk/keyvault/Azure.Management.KeyVault/README.md
new file mode 100644
index 0000000000000..00272db1fafae
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/README.md
@@ -0,0 +1,69 @@
+# README.md template
+
+Use the guidelines in each section of this template to ensure consistency and readability of your README. The README resides in your package's GitHub repository at the root of its directory within the repo. It's also used as the package distribution page (NuGet, PyPi, npm, etc.) and as a Quickstart on docs.microsoft.com. See [README-EXAMPLE.md](README-EXAMPLE.md) for an example following this template.
+
+* All headings, including the H1, should use **sentence-style capitalization**. Refer to the [Microsoft Style Guide][style-guide-msft] and [Microsoft Cloud Style Guide][style-guide-cloud] for more information.
+* Example: `# Azure Batch client library for Python`
+
+# Azure Management KeyVault client library for .NET
+
+**Introduction**: The introduction appears directly under the title (H1) of your README.
+
+* **DO NOT** use an "Introduction" or "Overview" heading (H2) for this section.
+* First sentence: **Describe the service** briefly. You can usually use the first line of the service's docs landing page for this (Example: [Cosmos DB docs landing page](https://docs.microsoft.com/azure/cosmos-db/)).
+* Next, add a **bulleted list** of the **most common tasks** supported by the package or library, prefaced with "Use the client library for [Product Name] to:". Then, provide code snippets for these tasks in the [Examples](#examples) section later in the document. Keep the task list short but include those tasks most developers need to perform with your package.
+* Include this single line of links targeting your product's content at the bottom of the introduction, making any adjustments as necessary (for example, NuGet instead of PyPi):
+
+ [Source code](https://github.com/Azure/azure-sdk-for-python/tree/master/azure-batch) | [Package (PyPi)](https://pypi.org/project/azure-batch/) | [API reference documentation](https://docs.microsoft.com/python/api/overview/azure/batch?view=azure-python) | [Product documentation](https://docs.microsoft.com/azure/batch/)
+
+> TIP: Your README should be as **brief** as possible but **no more brief** than necessary to get a developer new to Azure, the service, or the package up and running quickly. Keep it brief, but include everything a developer needs to make their first API call successfully.
+
+## Getting started
+
+This section should include everything a developer needs to do to install and create their first client connection *very quickly*.
+
+### Install the package
+
+First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `pip install package-name`, but should enable a developer to successfully install the package from NuGet, pip, npm, Maven, or even cloning a GitHub repository.
+
+Include a **Prerequisites** line after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB:
+
+**Prerequisites**: You must have an [Azure subscription](https://azure.microsoft.com/free/), [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API), and [Python 3.6+](https://www.python.org/downloads/) to use this package.
+
+### Authenticate the client
+
+If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating.
+
+For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object.
+
+## Key concepts
+
+The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity.
+
+## Examples
+
+Include code snippets and short descriptions for each task you listed in the [Introduction](#introduction) (the bulleted list). Briefly explain each operation, but include enough clarity to explain complex or otherwise tricky operations.
+
+## Troubleshooting
+
+Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery.
+
+Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API.
+
+If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code.
+
+## Next steps
+
+* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory.
+* If appropriate, point users to other packages that might be useful.
+* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for.
+
+## Contributing
+
+This is a template, but your SDK readme should include details on how to contribute code to the repo/package.
+
+
+[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization
+[style-guide-cloud]: https://worldready.cloudapp.net/Styleguide/Read?id=2696&topicid=25357
+
+![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net%2Fsdk%2Ftemplate%2FAzure.Template%2FREADME.png)
diff --git a/sdk/keyvault/Azure.Management.KeyVault/api/Azure.Management.KeyVault.netstandard2.0.cs b/sdk/keyvault/Azure.Management.KeyVault/api/Azure.Management.KeyVault.netstandard2.0.cs
new file mode 100644
index 0000000000000..68965e9509584
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/api/Azure.Management.KeyVault.netstandard2.0.cs
@@ -0,0 +1,573 @@
+namespace Azure.Management.KeyVault
+{
+ public partial class KeyVaultManagementClient
+ {
+ protected KeyVaultManagementClient() { }
+ public KeyVaultManagementClient(string subscriptionId, Azure.Core.TokenCredential tokenCredential, Azure.Management.KeyVault.KeyVaultManagementClientOptions options = null) { }
+ public KeyVaultManagementClient(string subscriptionId, System.Uri endpoint, Azure.Core.TokenCredential tokenCredential, Azure.Management.KeyVault.KeyVaultManagementClientOptions options = null) { }
+ public virtual Azure.Management.KeyVault.OperationsClient GetOperationsClient() { throw null; }
+ public virtual Azure.Management.KeyVault.PrivateEndpointConnectionsClient GetPrivateEndpointConnectionsClient() { throw null; }
+ public virtual Azure.Management.KeyVault.PrivateLinkResourcesClient GetPrivateLinkResourcesClient() { throw null; }
+ public virtual Azure.Management.KeyVault.VaultsClient GetVaultsClient() { throw null; }
+ }
+ public partial class KeyVaultManagementClientOptions : Azure.Core.ClientOptions
+ {
+ public KeyVaultManagementClientOptions() { }
+ }
+ public partial class OperationsClient
+ {
+ protected OperationsClient() { }
+ public virtual Azure.Pageable List(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+ public partial class PrivateEndpointConnectionsClient
+ {
+ protected PrivateEndpointConnectionsClient() { }
+ public virtual Azure.Response Get(string resourceGroupName, string vaultName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(string resourceGroupName, string vaultName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Put(string resourceGroupName, string vaultName, string privateEndpointConnectionName, Azure.Management.KeyVault.Models.PrivateEndpointConnection properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> PutAsync(string resourceGroupName, string vaultName, string privateEndpointConnectionName, Azure.Management.KeyVault.Models.PrivateEndpointConnection properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Management.KeyVault.PrivateEndpointConnectionsDeleteOperation StartDelete(string resourceGroupName, string vaultName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.ValueTask StartDeleteAsync(string resourceGroupName, string vaultName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+ public partial class PrivateEndpointConnectionsDeleteOperation : Azure.Operation
+ {
+ internal PrivateEndpointConnectionsDeleteOperation() { }
+ public override bool HasCompleted { get { throw null; } }
+ public override bool HasValue { get { throw null; } }
+ public override string Id { get { throw null; } }
+ public override Azure.Management.KeyVault.Models.PrivateEndpointConnection Value { get { throw null; } }
+ public override Azure.Response GetRawResponse() { throw null; }
+ public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+ public partial class PrivateLinkResourcesClient
+ {
+ protected PrivateLinkResourcesClient() { }
+ public virtual Azure.Response ListByVault(string resourceGroupName, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> ListByVaultAsync(string resourceGroupName, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+ public partial class VaultsClient
+ {
+ protected VaultsClient() { }
+ public virtual Azure.Response CheckNameAvailability(Azure.Management.KeyVault.Models.VaultCheckNameAvailabilityParameters vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> CheckNameAvailabilityAsync(Azure.Management.KeyVault.Models.VaultCheckNameAvailabilityParameters vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Delete(string resourceGroupName, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task DeleteAsync(string resourceGroupName, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(string resourceGroupName, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(string resourceGroupName, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response GetDeleted(string vaultName, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetDeletedAsync(string vaultName, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable List(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable ListAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable ListByResourceGroup(string resourceGroupName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable ListByResourceGroupAsync(string resourceGroupName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable ListBySubscription(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable ListBySubscriptionAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable ListDeleted(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable ListDeletedAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Management.KeyVault.VaultsCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string vaultName, Azure.Management.KeyVault.Models.VaultCreateOrUpdateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.ValueTask StartCreateOrUpdateAsync(string resourceGroupName, string vaultName, Azure.Management.KeyVault.Models.VaultCreateOrUpdateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Management.KeyVault.VaultsPurgeDeletedOperation StartPurgeDeleted(string vaultName, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.ValueTask StartPurgeDeletedAsync(string vaultName, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Update(string resourceGroupName, string vaultName, Azure.Management.KeyVault.Models.VaultPatchParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response UpdateAccessPolicy(string resourceGroupName, string vaultName, Azure.Management.KeyVault.Models.AccessPolicyUpdateKind operationKind, Azure.Management.KeyVault.Models.VaultAccessPolicyParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> UpdateAccessPolicyAsync(string resourceGroupName, string vaultName, Azure.Management.KeyVault.Models.AccessPolicyUpdateKind operationKind, Azure.Management.KeyVault.Models.VaultAccessPolicyParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> UpdateAsync(string resourceGroupName, string vaultName, Azure.Management.KeyVault.Models.VaultPatchParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+ public partial class VaultsCreateOrUpdateOperation : Azure.Operation
+ {
+ internal VaultsCreateOrUpdateOperation() { }
+ public override bool HasCompleted { get { throw null; } }
+ public override bool HasValue { get { throw null; } }
+ public override string Id { get { throw null; } }
+ public override Azure.Management.KeyVault.Models.Vault Value { get { throw null; } }
+ public override Azure.Response GetRawResponse() { throw null; }
+ public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+ public partial class VaultsPurgeDeletedOperation : Azure.Operation
+ {
+ internal VaultsPurgeDeletedOperation() { }
+ public override bool HasCompleted { get { throw null; } }
+ public override bool HasValue { get { throw null; } }
+ public override string Id { get { throw null; } }
+ public override Azure.Response Value { get { throw null; } }
+ public override Azure.Response GetRawResponse() { throw null; }
+ public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+}
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class AccessPolicyEntry
+ {
+ public AccessPolicyEntry(System.Guid tenantId, string objectId, Azure.Management.KeyVault.Models.Permissions permissions) { }
+ public System.Guid? ApplicationId { get { throw null; } set { } }
+ public string ObjectId { get { throw null; } set { } }
+ public Azure.Management.KeyVault.Models.Permissions Permissions { get { throw null; } set { } }
+ public System.Guid TenantId { get { throw null; } set { } }
+ }
+ public enum AccessPolicyUpdateKind
+ {
+ Add = 0,
+ Replace = 1,
+ Remove = 2,
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct CertificatePermissions : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public CertificatePermissions(string value) { throw null; }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Backup { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Create { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Delete { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Deleteissuers { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Get { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Getissuers { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Import { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions List { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Listissuers { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Managecontacts { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Manageissuers { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Purge { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Recover { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Restore { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Setissuers { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.CertificatePermissions Update { get { throw null; } }
+ public bool Equals(Azure.Management.KeyVault.Models.CertificatePermissions other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.Management.KeyVault.Models.CertificatePermissions left, Azure.Management.KeyVault.Models.CertificatePermissions right) { throw null; }
+ public static implicit operator Azure.Management.KeyVault.Models.CertificatePermissions (string value) { throw null; }
+ public static bool operator !=(Azure.Management.KeyVault.Models.CertificatePermissions left, Azure.Management.KeyVault.Models.CertificatePermissions right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ public partial class CheckNameAvailabilityResult
+ {
+ internal CheckNameAvailabilityResult() { }
+ public string Message { get { throw null; } }
+ public bool? NameAvailable { get { throw null; } }
+ public Azure.Management.KeyVault.Models.Reason? Reason { get { throw null; } }
+ }
+ public partial class CloudError
+ {
+ internal CloudError() { }
+ public Azure.Management.KeyVault.Models.CloudErrorBody Error { get { throw null; } }
+ }
+ public partial class CloudErrorBody
+ {
+ internal CloudErrorBody() { }
+ public string Code { get { throw null; } }
+ public string Message { get { throw null; } }
+ }
+ public enum CreateMode
+ {
+ Recover = 0,
+ Default = 1,
+ }
+ public partial class DeletedVault
+ {
+ internal DeletedVault() { }
+ public string Id { get { throw null; } }
+ public string Name { get { throw null; } }
+ public Azure.Management.KeyVault.Models.DeletedVaultProperties Properties { get { throw null; } }
+ public string Type { get { throw null; } }
+ }
+ public partial class DeletedVaultListResult
+ {
+ internal DeletedVaultListResult() { }
+ public string NextLink { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList Value { get { throw null; } }
+ }
+ public partial class DeletedVaultProperties
+ {
+ internal DeletedVaultProperties() { }
+ public System.DateTimeOffset? DeletionDate { get { throw null; } }
+ public string Location { get { throw null; } }
+ public System.DateTimeOffset? ScheduledPurgeDate { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } }
+ public string VaultId { get { throw null; } }
+ }
+ public partial class IPRule
+ {
+ public IPRule(string value) { }
+ public string Value { get { throw null; } set { } }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct KeyPermissions : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public KeyPermissions(string value) { throw null; }
+ public static Azure.Management.KeyVault.Models.KeyPermissions Backup { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions Create { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions Decrypt { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions Delete { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions Encrypt { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions Get { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions Import { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions List { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions Purge { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions Recover { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions Restore { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions Sign { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions UnwrapKey { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions Update { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions Verify { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.KeyPermissions WrapKey { get { throw null; } }
+ public bool Equals(Azure.Management.KeyVault.Models.KeyPermissions other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.Management.KeyVault.Models.KeyPermissions left, Azure.Management.KeyVault.Models.KeyPermissions right) { throw null; }
+ public static implicit operator Azure.Management.KeyVault.Models.KeyPermissions (string value) { throw null; }
+ public static bool operator !=(Azure.Management.KeyVault.Models.KeyPermissions left, Azure.Management.KeyVault.Models.KeyPermissions right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ public partial class LogSpecification
+ {
+ internal LogSpecification() { }
+ public string BlobDuration { get { throw null; } }
+ public string DisplayName { get { throw null; } }
+ public string Name { get { throw null; } }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct NetworkRuleAction : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public NetworkRuleAction(string value) { throw null; }
+ public static Azure.Management.KeyVault.Models.NetworkRuleAction Allow { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.NetworkRuleAction Deny { get { throw null; } }
+ public bool Equals(Azure.Management.KeyVault.Models.NetworkRuleAction other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.Management.KeyVault.Models.NetworkRuleAction left, Azure.Management.KeyVault.Models.NetworkRuleAction right) { throw null; }
+ public static implicit operator Azure.Management.KeyVault.Models.NetworkRuleAction (string value) { throw null; }
+ public static bool operator !=(Azure.Management.KeyVault.Models.NetworkRuleAction left, Azure.Management.KeyVault.Models.NetworkRuleAction right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct NetworkRuleBypassOptions : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public NetworkRuleBypassOptions(string value) { throw null; }
+ public static Azure.Management.KeyVault.Models.NetworkRuleBypassOptions AzureServices { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.NetworkRuleBypassOptions None { get { throw null; } }
+ public bool Equals(Azure.Management.KeyVault.Models.NetworkRuleBypassOptions other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.Management.KeyVault.Models.NetworkRuleBypassOptions left, Azure.Management.KeyVault.Models.NetworkRuleBypassOptions right) { throw null; }
+ public static implicit operator Azure.Management.KeyVault.Models.NetworkRuleBypassOptions (string value) { throw null; }
+ public static bool operator !=(Azure.Management.KeyVault.Models.NetworkRuleBypassOptions left, Azure.Management.KeyVault.Models.NetworkRuleBypassOptions right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ public partial class NetworkRuleSet
+ {
+ public NetworkRuleSet() { }
+ public Azure.Management.KeyVault.Models.NetworkRuleBypassOptions? Bypass { get { throw null; } set { } }
+ public Azure.Management.KeyVault.Models.NetworkRuleAction? DefaultAction { get { throw null; } set { } }
+ public System.Collections.Generic.IList IpRules { get { throw null; } set { } }
+ public System.Collections.Generic.IList VirtualNetworkRules { get { throw null; } set { } }
+ }
+ public partial class Operation
+ {
+ internal Operation() { }
+ public Azure.Management.KeyVault.Models.OperationDisplay Display { get { throw null; } }
+ public string Name { get { throw null; } }
+ public string Origin { get { throw null; } }
+ public Azure.Management.KeyVault.Models.ServiceSpecification ServiceSpecification { get { throw null; } }
+ }
+ public partial class OperationDisplay
+ {
+ internal OperationDisplay() { }
+ public string Description { get { throw null; } }
+ public string Operation { get { throw null; } }
+ public string Provider { get { throw null; } }
+ public string Resource { get { throw null; } }
+ }
+ public partial class OperationListResult
+ {
+ internal OperationListResult() { }
+ public string NextLink { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList Value { get { throw null; } }
+ }
+ public partial class Permissions
+ {
+ public Permissions() { }
+ public System.Collections.Generic.IList Certificates { get { throw null; } set { } }
+ public System.Collections.Generic.IList Keys { get { throw null; } set { } }
+ public System.Collections.Generic.IList Secrets { get { throw null; } set { } }
+ public System.Collections.Generic.IList Storage { get { throw null; } set { } }
+ }
+ public partial class PrivateEndpoint
+ {
+ public PrivateEndpoint() { }
+ public string Id { get { throw null; } }
+ }
+ public partial class PrivateEndpointConnection : Azure.Management.KeyVault.Models.Resource
+ {
+ public PrivateEndpointConnection() { }
+ public Azure.Management.KeyVault.Models.PrivateEndpoint PrivateEndpoint { get { throw null; } set { } }
+ public Azure.Management.KeyVault.Models.PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } }
+ public Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } }
+ }
+ public partial class PrivateEndpointConnectionItem
+ {
+ public PrivateEndpointConnectionItem() { }
+ public Azure.Management.KeyVault.Models.PrivateEndpoint PrivateEndpoint { get { throw null; } set { } }
+ public Azure.Management.KeyVault.Models.PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } }
+ public Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct PrivateEndpointConnectionProvisioningState : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public PrivateEndpointConnectionProvisioningState(string value) { throw null; }
+ public static Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState Creating { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState Deleting { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState Disconnected { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState Failed { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState Succeeded { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState Updating { get { throw null; } }
+ public bool Equals(Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState left, Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState right) { throw null; }
+ public static implicit operator Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState (string value) { throw null; }
+ public static bool operator !=(Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState left, Azure.Management.KeyVault.Models.PrivateEndpointConnectionProvisioningState right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct PrivateEndpointServiceConnectionStatus : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public PrivateEndpointServiceConnectionStatus(string value) { throw null; }
+ public static Azure.Management.KeyVault.Models.PrivateEndpointServiceConnectionStatus Approved { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.PrivateEndpointServiceConnectionStatus Disconnected { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.PrivateEndpointServiceConnectionStatus Pending { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.PrivateEndpointServiceConnectionStatus Rejected { get { throw null; } }
+ public bool Equals(Azure.Management.KeyVault.Models.PrivateEndpointServiceConnectionStatus other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.Management.KeyVault.Models.PrivateEndpointServiceConnectionStatus left, Azure.Management.KeyVault.Models.PrivateEndpointServiceConnectionStatus right) { throw null; }
+ public static implicit operator Azure.Management.KeyVault.Models.PrivateEndpointServiceConnectionStatus (string value) { throw null; }
+ public static bool operator !=(Azure.Management.KeyVault.Models.PrivateEndpointServiceConnectionStatus left, Azure.Management.KeyVault.Models.PrivateEndpointServiceConnectionStatus right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ public partial class PrivateLinkResource : Azure.Management.KeyVault.Models.Resource
+ {
+ public PrivateLinkResource() { }
+ public string GroupId { get { throw null; } }
+ public System.Collections.Generic.IList RequiredMembers { get { throw null; } }
+ public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } set { } }
+ }
+ public partial class PrivateLinkResourceListResult
+ {
+ internal PrivateLinkResourceListResult() { }
+ public System.Collections.Generic.IReadOnlyList Value { get { throw null; } }
+ }
+ public partial class PrivateLinkServiceConnectionState
+ {
+ public PrivateLinkServiceConnectionState() { }
+ public string ActionRequired { get { throw null; } set { } }
+ public string Description { get { throw null; } set { } }
+ public Azure.Management.KeyVault.Models.PrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } }
+ }
+ public enum Reason
+ {
+ AccountNameInvalid = 0,
+ AlreadyExists = 1,
+ }
+ public partial class Resource
+ {
+ public Resource() { }
+ public string Id { get { throw null; } }
+ public string Location { get { throw null; } }
+ public string Name { get { throw null; } }
+ public System.Collections.Generic.IDictionary Tags { get { throw null; } }
+ public string Type { get { throw null; } }
+ }
+ public partial class ResourceListResult
+ {
+ internal ResourceListResult() { }
+ public string NextLink { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList Value { get { throw null; } }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct SecretPermissions : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public SecretPermissions(string value) { throw null; }
+ public static Azure.Management.KeyVault.Models.SecretPermissions Backup { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.SecretPermissions Delete { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.SecretPermissions Get { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.SecretPermissions List { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.SecretPermissions Purge { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.SecretPermissions Recover { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.SecretPermissions Restore { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.SecretPermissions Set { get { throw null; } }
+ public bool Equals(Azure.Management.KeyVault.Models.SecretPermissions other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.Management.KeyVault.Models.SecretPermissions left, Azure.Management.KeyVault.Models.SecretPermissions right) { throw null; }
+ public static implicit operator Azure.Management.KeyVault.Models.SecretPermissions (string value) { throw null; }
+ public static bool operator !=(Azure.Management.KeyVault.Models.SecretPermissions left, Azure.Management.KeyVault.Models.SecretPermissions right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ public partial class ServiceSpecification
+ {
+ internal ServiceSpecification() { }
+ public System.Collections.Generic.IReadOnlyList LogSpecifications { get { throw null; } }
+ }
+ public partial class Sku
+ {
+ public Sku(Azure.Management.KeyVault.Models.SkuName name) { }
+ public string Family { get { throw null; } set { } }
+ public Azure.Management.KeyVault.Models.SkuName Name { get { throw null; } set { } }
+ }
+ public enum SkuName
+ {
+ Standard = 0,
+ Premium = 1,
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct StoragePermissions : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public StoragePermissions(string value) { throw null; }
+ public static Azure.Management.KeyVault.Models.StoragePermissions Backup { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.StoragePermissions Delete { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.StoragePermissions Deletesas { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.StoragePermissions Get { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.StoragePermissions Getsas { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.StoragePermissions List { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.StoragePermissions Listsas { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.StoragePermissions Purge { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.StoragePermissions Recover { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.StoragePermissions Regeneratekey { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.StoragePermissions Restore { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.StoragePermissions Set { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.StoragePermissions Setsas { get { throw null; } }
+ public static Azure.Management.KeyVault.Models.StoragePermissions Update { get { throw null; } }
+ public bool Equals(Azure.Management.KeyVault.Models.StoragePermissions other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.Management.KeyVault.Models.StoragePermissions left, Azure.Management.KeyVault.Models.StoragePermissions right) { throw null; }
+ public static implicit operator Azure.Management.KeyVault.Models.StoragePermissions (string value) { throw null; }
+ public static bool operator !=(Azure.Management.KeyVault.Models.StoragePermissions left, Azure.Management.KeyVault.Models.StoragePermissions right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ public partial class Vault
+ {
+ internal Vault() { }
+ public string Id { get { throw null; } }
+ public string Location { get { throw null; } }
+ public string Name { get { throw null; } }
+ public Azure.Management.KeyVault.Models.VaultProperties Properties { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } }
+ public string Type { get { throw null; } }
+ }
+ public partial class VaultAccessPolicyParameters
+ {
+ public VaultAccessPolicyParameters(Azure.Management.KeyVault.Models.VaultAccessPolicyProperties properties) { }
+ public string Id { get { throw null; } }
+ public string Location { get { throw null; } }
+ public string Name { get { throw null; } }
+ public Azure.Management.KeyVault.Models.VaultAccessPolicyProperties Properties { get { throw null; } set { } }
+ public string Type { get { throw null; } }
+ }
+ public partial class VaultAccessPolicyProperties
+ {
+ public VaultAccessPolicyProperties(System.Collections.Generic.IEnumerable accessPolicies) { }
+ public System.Collections.Generic.IList AccessPolicies { get { throw null; } set { } }
+ }
+ public partial class VaultCheckNameAvailabilityParameters
+ {
+ public VaultCheckNameAvailabilityParameters(string name) { }
+ public string Name { get { throw null; } }
+ public string Type { get { throw null; } }
+ }
+ public partial class VaultCreateOrUpdateParameters
+ {
+ public VaultCreateOrUpdateParameters(string location, Azure.Management.KeyVault.Models.VaultProperties properties) { }
+ public string Location { get { throw null; } }
+ public Azure.Management.KeyVault.Models.VaultProperties Properties { get { throw null; } }
+ public System.Collections.Generic.IDictionary Tags { get { throw null; } set { } }
+ }
+ public partial class VaultListResult
+ {
+ internal VaultListResult() { }
+ public string NextLink { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList Value { get { throw null; } }
+ }
+ public partial class VaultPatchParameters
+ {
+ public VaultPatchParameters() { }
+ public Azure.Management.KeyVault.Models.VaultPatchProperties Properties { get { throw null; } set { } }
+ public System.Collections.Generic.IDictionary Tags { get { throw null; } set { } }
+ }
+ public partial class VaultPatchProperties
+ {
+ public VaultPatchProperties() { }
+ public System.Collections.Generic.IList AccessPolicies { get { throw null; } set { } }
+ public Azure.Management.KeyVault.Models.CreateMode? CreateMode { get { throw null; } set { } }
+ public bool? EnabledForDeployment { get { throw null; } set { } }
+ public bool? EnabledForDiskEncryption { get { throw null; } set { } }
+ public bool? EnabledForTemplateDeployment { get { throw null; } set { } }
+ public bool? EnablePurgeProtection { get { throw null; } set { } }
+ public bool? EnableSoftDelete { get { throw null; } set { } }
+ public Azure.Management.KeyVault.Models.NetworkRuleSet NetworkAcls { get { throw null; } set { } }
+ public Azure.Management.KeyVault.Models.Sku Sku { get { throw null; } set { } }
+ public System.Guid? TenantId { get { throw null; } set { } }
+ }
+ public partial class VaultProperties
+ {
+ public VaultProperties(System.Guid tenantId, Azure.Management.KeyVault.Models.Sku sku) { }
+ public System.Collections.Generic.IList AccessPolicies { get { throw null; } set { } }
+ public Azure.Management.KeyVault.Models.CreateMode? CreateMode { get { throw null; } set { } }
+ public bool? EnabledForDeployment { get { throw null; } set { } }
+ public bool? EnabledForDiskEncryption { get { throw null; } set { } }
+ public bool? EnabledForTemplateDeployment { get { throw null; } set { } }
+ public bool? EnablePurgeProtection { get { throw null; } set { } }
+ public bool? EnableSoftDelete { get { throw null; } set { } }
+ public Azure.Management.KeyVault.Models.NetworkRuleSet NetworkAcls { get { throw null; } set { } }
+ public System.Collections.Generic.IList PrivateEndpointConnections { get { throw null; } }
+ public Azure.Management.KeyVault.Models.Sku Sku { get { throw null; } set { } }
+ public System.Guid TenantId { get { throw null; } set { } }
+ public string VaultUri { get { throw null; } set { } }
+ }
+ public partial class VirtualNetworkRule
+ {
+ public VirtualNetworkRule(string id) { }
+ public string Id { get { throw null; } set { } }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Azure.Management.KeyVault.csproj b/sdk/keyvault/Azure.Management.KeyVault/src/Azure.Management.KeyVault.csproj
new file mode 100644
index 0000000000000..feb8c978de5fb
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Azure.Management.KeyVault.csproj
@@ -0,0 +1,10 @@
+
+
+ 1.0.0-preview.1
+ Azure.Management.KeyVault
+ Azure management client SDK for Azure resource provider Microsoft.KeyVault
+ azure;management;keyvault
+
+ $(NoWarn);AZC0008
+
+
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/KeyVaultManagementClient.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/KeyVaultManagementClient.cs
new file mode 100644
index 0000000000000..6d122a1a81446
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/KeyVaultManagementClient.cs
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.Management.KeyVault;
+
+namespace Azure.Management.KeyVault
+{
+ /// KeyVault service management client.
+ public class KeyVaultManagementClient
+ {
+ private readonly ClientDiagnostics _clientDiagnostics;
+ private readonly HttpPipeline _pipeline;
+ private readonly string _subscriptionId;
+ private readonly Uri _endpoint;
+
+ /// Initializes a new instance of KeyVaultManagementClient for mocking.
+ protected KeyVaultManagementClient()
+ {
+ }
+
+ /// Initializes a new instance of KeyVaultManagementClient.
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+ /// The OAuth token for making client requests.
+ /// The options for configuring the client.
+ public KeyVaultManagementClient(string subscriptionId, TokenCredential tokenCredential, KeyVaultManagementClientOptions options = null) : this(subscriptionId, null, tokenCredential, options)
+ {
+ }
+ /// Initializes a new instance of KeyVaultManagementClient.
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+ /// server parameter.
+ /// The OAuth token for making client requests.
+ /// The options for configuring the client.
+ /// This occurs when one of the required arguments is null.
+ public KeyVaultManagementClient(string subscriptionId, Uri endpoint, TokenCredential tokenCredential, KeyVaultManagementClientOptions options = null)
+ {
+ if (subscriptionId == null)
+ {
+ throw new ArgumentNullException(nameof(subscriptionId));
+ }
+ endpoint ??= new Uri("https://management.azure.com");
+
+ options ??= new KeyVaultManagementClientOptions();
+ _clientDiagnostics = new ClientDiagnostics(options);
+ _pipeline = ManagementPipelineBuilder.Build(tokenCredential, endpoint, options);
+ _subscriptionId = subscriptionId;
+ _endpoint = endpoint;
+ }
+
+ /// Creates a new instance of VaultsClient.
+ public virtual VaultsClient GetVaultsClient()
+ {
+ return new VaultsClient(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint);
+ }
+
+ /// Creates a new instance of PrivateEndpointConnectionsClient.
+ public virtual PrivateEndpointConnectionsClient GetPrivateEndpointConnectionsClient()
+ {
+ return new PrivateEndpointConnectionsClient(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint);
+ }
+
+ /// Creates a new instance of PrivateLinkResourcesClient.
+ public virtual PrivateLinkResourcesClient GetPrivateLinkResourcesClient()
+ {
+ return new PrivateLinkResourcesClient(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint);
+ }
+
+ /// Creates a new instance of OperationsClient.
+ public virtual OperationsClient GetOperationsClient()
+ {
+ return new OperationsClient(_clientDiagnostics, _pipeline, _endpoint);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/KeyVaultManagementClientOptions.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/KeyVaultManagementClientOptions.cs
new file mode 100644
index 0000000000000..381e387330af4
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/KeyVaultManagementClientOptions.cs
@@ -0,0 +1,16 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using Azure.Core;
+
+namespace Azure.Management.KeyVault
+{
+ /// Client options for KeyVault.
+ public class KeyVaultManagementClientOptions : ClientOptions
+ {
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/AccessPolicyEntry.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/AccessPolicyEntry.Serialization.cs
new file mode 100644
index 0000000000000..393f6f8e79014
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/AccessPolicyEntry.Serialization.cs
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class AccessPolicyEntry : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("tenantId");
+ writer.WriteStringValue(TenantId);
+ writer.WritePropertyName("objectId");
+ writer.WriteStringValue(ObjectId);
+ if (ApplicationId != null)
+ {
+ writer.WritePropertyName("applicationId");
+ writer.WriteStringValue(ApplicationId.Value);
+ }
+ writer.WritePropertyName("permissions");
+ writer.WriteObjectValue(Permissions);
+ writer.WriteEndObject();
+ }
+
+ internal static AccessPolicyEntry DeserializeAccessPolicyEntry(JsonElement element)
+ {
+ Guid tenantId = default;
+ string objectId = default;
+ Guid? applicationId = default;
+ Permissions permissions = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("tenantId"))
+ {
+ tenantId = property.Value.GetGuid();
+ continue;
+ }
+ if (property.NameEquals("objectId"))
+ {
+ objectId = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("applicationId"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ applicationId = property.Value.GetGuid();
+ continue;
+ }
+ if (property.NameEquals("permissions"))
+ {
+ permissions = Permissions.DeserializePermissions(property.Value);
+ continue;
+ }
+ }
+ return new AccessPolicyEntry(tenantId, objectId, applicationId, permissions);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/AccessPolicyEntry.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/AccessPolicyEntry.cs
new file mode 100644
index 0000000000000..56a16deb33bce
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/AccessPolicyEntry.cs
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// An identity that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID.
+ public partial class AccessPolicyEntry
+ {
+ /// Initializes a new instance of AccessPolicyEntry.
+ /// The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
+ /// The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies.
+ /// Permissions the identity has for keys, secrets and certificates.
+ public AccessPolicyEntry(Guid tenantId, string objectId, Permissions permissions)
+ {
+ if (objectId == null)
+ {
+ throw new ArgumentNullException(nameof(objectId));
+ }
+ if (permissions == null)
+ {
+ throw new ArgumentNullException(nameof(permissions));
+ }
+
+ TenantId = tenantId;
+ ObjectId = objectId;
+ Permissions = permissions;
+ }
+
+ /// Initializes a new instance of AccessPolicyEntry.
+ /// The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
+ /// The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies.
+ /// Application ID of the client making request on behalf of a principal.
+ /// Permissions the identity has for keys, secrets and certificates.
+ internal AccessPolicyEntry(Guid tenantId, string objectId, Guid? applicationId, Permissions permissions)
+ {
+ TenantId = tenantId;
+ ObjectId = objectId;
+ ApplicationId = applicationId;
+ Permissions = permissions;
+ }
+
+ /// The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
+ public Guid TenantId { get; set; }
+ /// The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies.
+ public string ObjectId { get; set; }
+ /// Application ID of the client making request on behalf of a principal.
+ public Guid? ApplicationId { get; set; }
+ /// Permissions the identity has for keys, secrets and certificates.
+ public Permissions Permissions { get; set; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/AccessPolicyUpdateKind.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/AccessPolicyUpdateKind.Serialization.cs
new file mode 100644
index 0000000000000..88ab4a2a56f79
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/AccessPolicyUpdateKind.Serialization.cs
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.Management.KeyVault.Models
+{
+ internal static class AccessPolicyUpdateKindExtensions
+ {
+ public static string ToSerialString(this AccessPolicyUpdateKind value) => value switch
+ {
+ AccessPolicyUpdateKind.Add => "add",
+ AccessPolicyUpdateKind.Replace => "replace",
+ AccessPolicyUpdateKind.Remove => "remove",
+ _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AccessPolicyUpdateKind value.")
+ };
+
+ public static AccessPolicyUpdateKind ToAccessPolicyUpdateKind(this string value)
+ {
+ if (string.Equals(value, "add", StringComparison.InvariantCultureIgnoreCase)) return AccessPolicyUpdateKind.Add;
+ if (string.Equals(value, "replace", StringComparison.InvariantCultureIgnoreCase)) return AccessPolicyUpdateKind.Replace;
+ if (string.Equals(value, "remove", StringComparison.InvariantCultureIgnoreCase)) return AccessPolicyUpdateKind.Remove;
+ throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AccessPolicyUpdateKind value.");
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/AccessPolicyUpdateKind.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/AccessPolicyUpdateKind.cs
new file mode 100644
index 0000000000000..67aad701d46c0
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/AccessPolicyUpdateKind.cs
@@ -0,0 +1,20 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// The AccessPolicyUpdateKind.
+ public enum AccessPolicyUpdateKind
+ {
+ /// add.
+ Add,
+ /// replace.
+ Replace,
+ /// remove.
+ Remove
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CertificatePermissions.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CertificatePermissions.cs
new file mode 100644
index 0000000000000..6d7daf246b8d7
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CertificatePermissions.cs
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// The CertificatePermissions.
+ public readonly partial struct CertificatePermissions : IEquatable
+ {
+ private readonly string _value;
+
+ /// Determines if two values are the same.
+ public CertificatePermissions(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string GetValue = "get";
+ private const string ListValue = "list";
+ private const string DeleteValue = "delete";
+ private const string CreateValue = "create";
+ private const string ImportValue = "import";
+ private const string UpdateValue = "update";
+ private const string ManagecontactsValue = "managecontacts";
+ private const string GetissuersValue = "getissuers";
+ private const string ListissuersValue = "listissuers";
+ private const string SetissuersValue = "setissuers";
+ private const string DeleteissuersValue = "deleteissuers";
+ private const string ManageissuersValue = "manageissuers";
+ private const string RecoverValue = "recover";
+ private const string PurgeValue = "purge";
+ private const string BackupValue = "backup";
+ private const string RestoreValue = "restore";
+
+ /// get.
+ public static CertificatePermissions Get { get; } = new CertificatePermissions(GetValue);
+ /// list.
+ public static CertificatePermissions List { get; } = new CertificatePermissions(ListValue);
+ /// delete.
+ public static CertificatePermissions Delete { get; } = new CertificatePermissions(DeleteValue);
+ /// create.
+ public static CertificatePermissions Create { get; } = new CertificatePermissions(CreateValue);
+ /// import.
+ public static CertificatePermissions Import { get; } = new CertificatePermissions(ImportValue);
+ /// update.
+ public static CertificatePermissions Update { get; } = new CertificatePermissions(UpdateValue);
+ /// managecontacts.
+ public static CertificatePermissions Managecontacts { get; } = new CertificatePermissions(ManagecontactsValue);
+ /// getissuers.
+ public static CertificatePermissions Getissuers { get; } = new CertificatePermissions(GetissuersValue);
+ /// listissuers.
+ public static CertificatePermissions Listissuers { get; } = new CertificatePermissions(ListissuersValue);
+ /// setissuers.
+ public static CertificatePermissions Setissuers { get; } = new CertificatePermissions(SetissuersValue);
+ /// deleteissuers.
+ public static CertificatePermissions Deleteissuers { get; } = new CertificatePermissions(DeleteissuersValue);
+ /// manageissuers.
+ public static CertificatePermissions Manageissuers { get; } = new CertificatePermissions(ManageissuersValue);
+ /// recover.
+ public static CertificatePermissions Recover { get; } = new CertificatePermissions(RecoverValue);
+ /// purge.
+ public static CertificatePermissions Purge { get; } = new CertificatePermissions(PurgeValue);
+ /// backup.
+ public static CertificatePermissions Backup { get; } = new CertificatePermissions(BackupValue);
+ /// restore.
+ public static CertificatePermissions Restore { get; } = new CertificatePermissions(RestoreValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(CertificatePermissions left, CertificatePermissions right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(CertificatePermissions left, CertificatePermissions right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator CertificatePermissions(string value) => new CertificatePermissions(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is CertificatePermissions other && Equals(other);
+ ///
+ public bool Equals(CertificatePermissions other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value?.GetHashCode() ?? 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs
new file mode 100644
index 0000000000000..612be20082e41
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class CheckNameAvailabilityResult
+ {
+ internal static CheckNameAvailabilityResult DeserializeCheckNameAvailabilityResult(JsonElement element)
+ {
+ bool? nameAvailable = default;
+ Reason? reason = default;
+ string message = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("nameAvailable"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ nameAvailable = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("reason"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ reason = property.Value.GetString().ToReason();
+ continue;
+ }
+ if (property.NameEquals("message"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ message = property.Value.GetString();
+ continue;
+ }
+ }
+ return new CheckNameAvailabilityResult(nameAvailable, reason, message);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CheckNameAvailabilityResult.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CheckNameAvailabilityResult.cs
new file mode 100644
index 0000000000000..40c9ec31302ac
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CheckNameAvailabilityResult.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// The CheckNameAvailability operation response.
+ public partial class CheckNameAvailabilityResult
+ {
+ /// Initializes a new instance of CheckNameAvailabilityResult.
+ internal CheckNameAvailabilityResult()
+ {
+ }
+
+ /// Initializes a new instance of CheckNameAvailabilityResult.
+ /// 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.
+ /// The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false.
+ /// An error message explaining the Reason value in more detail.
+ internal CheckNameAvailabilityResult(bool? nameAvailable, Reason? reason, string message)
+ {
+ NameAvailable = nameAvailable;
+ Reason = reason;
+ Message = message;
+ }
+
+ /// 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.
+ public bool? NameAvailable { get; }
+ /// The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false.
+ public Reason? Reason { get; }
+ /// An error message explaining the Reason value in more detail.
+ public string Message { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CloudError.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CloudError.Serialization.cs
new file mode 100644
index 0000000000000..be4c75135adc3
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CloudError.Serialization.cs
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class CloudError
+ {
+ internal static CloudError DeserializeCloudError(JsonElement element)
+ {
+ CloudErrorBody error = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("error"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ error = CloudErrorBody.DeserializeCloudErrorBody(property.Value);
+ continue;
+ }
+ }
+ return new CloudError(error);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CloudError.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CloudError.cs
new file mode 100644
index 0000000000000..0f86929b599af
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CloudError.cs
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// An error response from Key Vault resource provider.
+ public partial class CloudError
+ {
+ /// Initializes a new instance of CloudError.
+ internal CloudError()
+ {
+ }
+
+ /// Initializes a new instance of CloudError.
+ /// An error response from Key Vault resource provider.
+ internal CloudError(CloudErrorBody error)
+ {
+ Error = error;
+ }
+
+ /// An error response from Key Vault resource provider.
+ public CloudErrorBody Error { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CloudErrorBody.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CloudErrorBody.Serialization.cs
new file mode 100644
index 0000000000000..8ea186fecf0d7
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CloudErrorBody.Serialization.cs
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class CloudErrorBody
+ {
+ internal static CloudErrorBody DeserializeCloudErrorBody(JsonElement element)
+ {
+ string code = default;
+ string message = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("code"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ code = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("message"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ message = property.Value.GetString();
+ continue;
+ }
+ }
+ return new CloudErrorBody(code, message);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CloudErrorBody.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CloudErrorBody.cs
new file mode 100644
index 0000000000000..3ce912ed1b4eb
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CloudErrorBody.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// An error response from Key Vault resource provider.
+ public partial class CloudErrorBody
+ {
+ /// Initializes a new instance of CloudErrorBody.
+ internal CloudErrorBody()
+ {
+ }
+
+ /// Initializes a new instance of CloudErrorBody.
+ /// Error code. This is a mnemonic that can be consumed programmatically.
+ /// User friendly error message. The message is typically localized and may vary with service version.
+ internal CloudErrorBody(string code, string message)
+ {
+ Code = code;
+ Message = message;
+ }
+
+ /// Error code. This is a mnemonic that can be consumed programmatically.
+ public string Code { get; }
+ /// User friendly error message. The message is typically localized and may vary with service version.
+ public string Message { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CreateMode.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CreateMode.Serialization.cs
new file mode 100644
index 0000000000000..25575be721962
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CreateMode.Serialization.cs
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.Management.KeyVault.Models
+{
+ internal static class CreateModeExtensions
+ {
+ public static string ToSerialString(this CreateMode value) => value switch
+ {
+ CreateMode.Recover => "recover",
+ CreateMode.Default => "default",
+ _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateMode value.")
+ };
+
+ public static CreateMode ToCreateMode(this string value)
+ {
+ if (string.Equals(value, "recover", StringComparison.InvariantCultureIgnoreCase)) return CreateMode.Recover;
+ if (string.Equals(value, "default", StringComparison.InvariantCultureIgnoreCase)) return CreateMode.Default;
+ throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateMode value.");
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CreateMode.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CreateMode.cs
new file mode 100644
index 0000000000000..daebf0e22af83
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/CreateMode.cs
@@ -0,0 +1,18 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// The vault's create mode to indicate whether the vault need to be recovered or not.
+ public enum CreateMode
+ {
+ /// recover.
+ Recover,
+ /// default.
+ Default
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVault.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVault.Serialization.cs
new file mode 100644
index 0000000000000..c8429bf528420
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVault.Serialization.cs
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class DeletedVault
+ {
+ internal static DeletedVault DeserializeDeletedVault(JsonElement element)
+ {
+ string id = default;
+ string name = default;
+ string type = default;
+ DeletedVaultProperties properties = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ id = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("name"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ type = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("properties"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ properties = DeletedVaultProperties.DeserializeDeletedVaultProperties(property.Value);
+ continue;
+ }
+ }
+ return new DeletedVault(id, name, type, properties);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVault.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVault.cs
new file mode 100644
index 0000000000000..8f078e5a63563
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVault.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Deleted vault information with extended details.
+ public partial class DeletedVault
+ {
+ /// Initializes a new instance of DeletedVault.
+ internal DeletedVault()
+ {
+ }
+
+ /// Initializes a new instance of DeletedVault.
+ /// The resource ID for the deleted key vault.
+ /// The name of the key vault.
+ /// The resource type of the key vault.
+ /// Properties of the vault.
+ internal DeletedVault(string id, string name, string type, DeletedVaultProperties properties)
+ {
+ Id = id;
+ Name = name;
+ Type = type;
+ Properties = properties;
+ }
+
+ /// The resource ID for the deleted key vault.
+ public string Id { get; }
+ /// The name of the key vault.
+ public string Name { get; }
+ /// The resource type of the key vault.
+ public string Type { get; }
+ /// Properties of the vault.
+ public DeletedVaultProperties Properties { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVaultListResult.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVaultListResult.Serialization.cs
new file mode 100644
index 0000000000000..b57d8d81d7a9e
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVaultListResult.Serialization.cs
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class DeletedVaultListResult
+ {
+ internal static DeletedVaultListResult DeserializeDeletedVaultListResult(JsonElement element)
+ {
+ IReadOnlyList value = default;
+ string nextLink = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ array.Add(DeletedVault.DeserializeDeletedVault(item));
+ }
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ }
+ return new DeletedVaultListResult(value, nextLink);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVaultListResult.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVaultListResult.cs
new file mode 100644
index 0000000000000..63d13f3a3f924
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVaultListResult.cs
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// List of vaults.
+ public partial class DeletedVaultListResult
+ {
+ /// Initializes a new instance of DeletedVaultListResult.
+ internal DeletedVaultListResult()
+ {
+ }
+
+ /// Initializes a new instance of DeletedVaultListResult.
+ /// The list of deleted vaults.
+ /// The URL to get the next set of deleted vaults.
+ internal DeletedVaultListResult(IReadOnlyList value, string nextLink)
+ {
+ Value = value;
+ NextLink = nextLink;
+ }
+
+ /// The list of deleted vaults.
+ public IReadOnlyList Value { get; }
+ /// The URL to get the next set of deleted vaults.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVaultProperties.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVaultProperties.Serialization.cs
new file mode 100644
index 0000000000000..641aa9bb3a79d
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVaultProperties.Serialization.cs
@@ -0,0 +1,87 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class DeletedVaultProperties
+ {
+ internal static DeletedVaultProperties DeserializeDeletedVaultProperties(JsonElement element)
+ {
+ string vaultId = default;
+ string location = default;
+ DateTimeOffset? deletionDate = default;
+ DateTimeOffset? scheduledPurgeDate = default;
+ IReadOnlyDictionary tags = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("vaultId"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ vaultId = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("location"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ location = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("deletionDate"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ deletionDate = property.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property.NameEquals("scheduledPurgeDate"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ scheduledPurgeDate = property.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property.NameEquals("tags"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ dictionary.Add(property0.Name, null);
+ }
+ else
+ {
+ dictionary.Add(property0.Name, property0.Value.GetString());
+ }
+ }
+ tags = dictionary;
+ continue;
+ }
+ }
+ return new DeletedVaultProperties(vaultId, location, deletionDate, scheduledPurgeDate, tags);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVaultProperties.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVaultProperties.cs
new file mode 100644
index 0000000000000..1e434eb5cbaca
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/DeletedVaultProperties.cs
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Properties of the deleted vault.
+ public partial class DeletedVaultProperties
+ {
+ /// Initializes a new instance of DeletedVaultProperties.
+ internal DeletedVaultProperties()
+ {
+ }
+
+ /// Initializes a new instance of DeletedVaultProperties.
+ /// The resource id of the original vault.
+ /// The location of the original vault.
+ /// The deleted date.
+ /// The scheduled purged date.
+ /// Tags of the original vault.
+ internal DeletedVaultProperties(string vaultId, string location, DateTimeOffset? deletionDate, DateTimeOffset? scheduledPurgeDate, IReadOnlyDictionary tags)
+ {
+ VaultId = vaultId;
+ Location = location;
+ DeletionDate = deletionDate;
+ ScheduledPurgeDate = scheduledPurgeDate;
+ Tags = tags;
+ }
+
+ /// The resource id of the original vault.
+ public string VaultId { get; }
+ /// The location of the original vault.
+ public string Location { get; }
+ /// The deleted date.
+ public DateTimeOffset? DeletionDate { get; }
+ /// The scheduled purged date.
+ public DateTimeOffset? ScheduledPurgeDate { get; }
+ /// Tags of the original vault.
+ public IReadOnlyDictionary Tags { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/IPRule.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/IPRule.Serialization.cs
new file mode 100644
index 0000000000000..119a2d13c200d
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/IPRule.Serialization.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class IPRule : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("value");
+ writer.WriteStringValue(Value);
+ writer.WriteEndObject();
+ }
+
+ internal static IPRule DeserializeIPRule(JsonElement element)
+ {
+ string value = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"))
+ {
+ value = property.Value.GetString();
+ continue;
+ }
+ }
+ return new IPRule(value);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/IPRule.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/IPRule.cs
new file mode 100644
index 0000000000000..98cacfae0a2bd
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/IPRule.cs
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// A rule governing the accessibility of a vault from a specific ip address or ip range.
+ public partial class IPRule
+ {
+ /// Initializes a new instance of IPRule.
+ /// An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78).
+ public IPRule(string value)
+ {
+ if (value == null)
+ {
+ throw new ArgumentNullException(nameof(value));
+ }
+
+ Value = value;
+ }
+
+ /// An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78).
+ public string Value { get; set; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/KeyPermissions.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/KeyPermissions.cs
new file mode 100644
index 0000000000000..5de80bb7e59e0
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/KeyPermissions.cs
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// The KeyPermissions.
+ public readonly partial struct KeyPermissions : IEquatable
+ {
+ private readonly string _value;
+
+ /// Determines if two values are the same.
+ public KeyPermissions(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string EncryptValue = "encrypt";
+ private const string DecryptValue = "decrypt";
+ private const string WrapKeyValue = "wrapKey";
+ private const string UnwrapKeyValue = "unwrapKey";
+ private const string SignValue = "sign";
+ private const string VerifyValue = "verify";
+ private const string GetValue = "get";
+ private const string ListValue = "list";
+ private const string CreateValue = "create";
+ private const string UpdateValue = "update";
+ private const string ImportValue = "import";
+ private const string DeleteValue = "delete";
+ private const string BackupValue = "backup";
+ private const string RestoreValue = "restore";
+ private const string RecoverValue = "recover";
+ private const string PurgeValue = "purge";
+
+ /// encrypt.
+ public static KeyPermissions Encrypt { get; } = new KeyPermissions(EncryptValue);
+ /// decrypt.
+ public static KeyPermissions Decrypt { get; } = new KeyPermissions(DecryptValue);
+ /// wrapKey.
+ public static KeyPermissions WrapKey { get; } = new KeyPermissions(WrapKeyValue);
+ /// unwrapKey.
+ public static KeyPermissions UnwrapKey { get; } = new KeyPermissions(UnwrapKeyValue);
+ /// sign.
+ public static KeyPermissions Sign { get; } = new KeyPermissions(SignValue);
+ /// verify.
+ public static KeyPermissions Verify { get; } = new KeyPermissions(VerifyValue);
+ /// get.
+ public static KeyPermissions Get { get; } = new KeyPermissions(GetValue);
+ /// list.
+ public static KeyPermissions List { get; } = new KeyPermissions(ListValue);
+ /// create.
+ public static KeyPermissions Create { get; } = new KeyPermissions(CreateValue);
+ /// update.
+ public static KeyPermissions Update { get; } = new KeyPermissions(UpdateValue);
+ /// import.
+ public static KeyPermissions Import { get; } = new KeyPermissions(ImportValue);
+ /// delete.
+ public static KeyPermissions Delete { get; } = new KeyPermissions(DeleteValue);
+ /// backup.
+ public static KeyPermissions Backup { get; } = new KeyPermissions(BackupValue);
+ /// restore.
+ public static KeyPermissions Restore { get; } = new KeyPermissions(RestoreValue);
+ /// recover.
+ public static KeyPermissions Recover { get; } = new KeyPermissions(RecoverValue);
+ /// purge.
+ public static KeyPermissions Purge { get; } = new KeyPermissions(PurgeValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(KeyPermissions left, KeyPermissions right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(KeyPermissions left, KeyPermissions right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator KeyPermissions(string value) => new KeyPermissions(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is KeyPermissions other && Equals(other);
+ ///
+ public bool Equals(KeyPermissions other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value?.GetHashCode() ?? 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/LogSpecification.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/LogSpecification.Serialization.cs
new file mode 100644
index 0000000000000..295261bf41c44
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/LogSpecification.Serialization.cs
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class LogSpecification
+ {
+ internal static LogSpecification DeserializeLogSpecification(JsonElement element)
+ {
+ string name = default;
+ string displayName = default;
+ string blobDuration = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("name"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("displayName"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ displayName = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("blobDuration"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ blobDuration = property.Value.GetString();
+ continue;
+ }
+ }
+ return new LogSpecification(name, displayName, blobDuration);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/LogSpecification.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/LogSpecification.cs
new file mode 100644
index 0000000000000..0950f9fbf557d
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/LogSpecification.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Log specification of operation.
+ public partial class LogSpecification
+ {
+ /// Initializes a new instance of LogSpecification.
+ internal LogSpecification()
+ {
+ }
+
+ /// Initializes a new instance of LogSpecification.
+ /// Name of log specification.
+ /// Display name of log specification.
+ /// Blob duration of specification.
+ internal LogSpecification(string name, string displayName, string blobDuration)
+ {
+ Name = name;
+ DisplayName = displayName;
+ BlobDuration = blobDuration;
+ }
+
+ /// Name of log specification.
+ public string Name { get; }
+ /// Display name of log specification.
+ public string DisplayName { get; }
+ /// Blob duration of specification.
+ public string BlobDuration { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/NetworkRuleAction.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/NetworkRuleAction.cs
new file mode 100644
index 0000000000000..c5a1ffc930f8f
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/NetworkRuleAction.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.
+ public readonly partial struct NetworkRuleAction : IEquatable
+ {
+ private readonly string _value;
+
+ /// Determines if two values are the same.
+ public NetworkRuleAction(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string AllowValue = "Allow";
+ private const string DenyValue = "Deny";
+
+ /// Allow.
+ public static NetworkRuleAction Allow { get; } = new NetworkRuleAction(AllowValue);
+ /// Deny.
+ public static NetworkRuleAction Deny { get; } = new NetworkRuleAction(DenyValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(NetworkRuleAction left, NetworkRuleAction right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(NetworkRuleAction left, NetworkRuleAction right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator NetworkRuleAction(string value) => new NetworkRuleAction(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is NetworkRuleAction other && Equals(other);
+ ///
+ public bool Equals(NetworkRuleAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value?.GetHashCode() ?? 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/NetworkRuleBypassOptions.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/NetworkRuleBypassOptions.cs
new file mode 100644
index 0000000000000..53f6ff7bc3194
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/NetworkRuleBypassOptions.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'.
+ public readonly partial struct NetworkRuleBypassOptions : IEquatable
+ {
+ private readonly string _value;
+
+ /// Determines if two values are the same.
+ public NetworkRuleBypassOptions(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string AzureServicesValue = "AzureServices";
+ private const string NoneValue = "None";
+
+ /// AzureServices.
+ public static NetworkRuleBypassOptions AzureServices { get; } = new NetworkRuleBypassOptions(AzureServicesValue);
+ /// None.
+ public static NetworkRuleBypassOptions None { get; } = new NetworkRuleBypassOptions(NoneValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(NetworkRuleBypassOptions left, NetworkRuleBypassOptions right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(NetworkRuleBypassOptions left, NetworkRuleBypassOptions right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator NetworkRuleBypassOptions(string value) => new NetworkRuleBypassOptions(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is NetworkRuleBypassOptions other && Equals(other);
+ ///
+ public bool Equals(NetworkRuleBypassOptions other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value?.GetHashCode() ?? 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/NetworkRuleSet.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/NetworkRuleSet.Serialization.cs
new file mode 100644
index 0000000000000..b917dc90dffc1
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/NetworkRuleSet.Serialization.cs
@@ -0,0 +1,124 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class NetworkRuleSet : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Bypass != null)
+ {
+ writer.WritePropertyName("bypass");
+ writer.WriteStringValue(Bypass.Value.ToString());
+ }
+ if (DefaultAction != null)
+ {
+ writer.WritePropertyName("defaultAction");
+ writer.WriteStringValue(DefaultAction.Value.ToString());
+ }
+ if (IpRules != null)
+ {
+ writer.WritePropertyName("ipRules");
+ writer.WriteStartArray();
+ foreach (var item in IpRules)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (VirtualNetworkRules != null)
+ {
+ writer.WritePropertyName("virtualNetworkRules");
+ writer.WriteStartArray();
+ foreach (var item in VirtualNetworkRules)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static NetworkRuleSet DeserializeNetworkRuleSet(JsonElement element)
+ {
+ NetworkRuleBypassOptions? bypass = default;
+ NetworkRuleAction? defaultAction = default;
+ IList ipRules = default;
+ IList virtualNetworkRules = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("bypass"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ bypass = new NetworkRuleBypassOptions(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("defaultAction"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ defaultAction = new NetworkRuleAction(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("ipRules"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ array.Add(IPRule.DeserializeIPRule(item));
+ }
+ }
+ ipRules = array;
+ continue;
+ }
+ if (property.NameEquals("virtualNetworkRules"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ array.Add(VirtualNetworkRule.DeserializeVirtualNetworkRule(item));
+ }
+ }
+ virtualNetworkRules = array;
+ continue;
+ }
+ }
+ return new NetworkRuleSet(bypass, defaultAction, ipRules, virtualNetworkRules);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/NetworkRuleSet.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/NetworkRuleSet.cs
new file mode 100644
index 0000000000000..5e6125af30fe8
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/NetworkRuleSet.cs
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// A set of rules governing the network accessibility of a vault.
+ public partial class NetworkRuleSet
+ {
+ /// Initializes a new instance of NetworkRuleSet.
+ public NetworkRuleSet()
+ {
+ }
+
+ /// Initializes a new instance of NetworkRuleSet.
+ /// Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'.
+ /// The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.
+ /// The list of IP address rules.
+ /// The list of virtual network rules.
+ internal NetworkRuleSet(NetworkRuleBypassOptions? bypass, NetworkRuleAction? defaultAction, IList ipRules, IList virtualNetworkRules)
+ {
+ Bypass = bypass;
+ DefaultAction = defaultAction;
+ IpRules = ipRules;
+ VirtualNetworkRules = virtualNetworkRules;
+ }
+
+ /// Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'.
+ public NetworkRuleBypassOptions? Bypass { get; set; }
+ /// The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.
+ public NetworkRuleAction? DefaultAction { get; set; }
+ /// The list of IP address rules.
+ public IList IpRules { get; set; }
+ /// The list of virtual network rules.
+ public IList VirtualNetworkRules { get; set; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Operation.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Operation.Serialization.cs
new file mode 100644
index 0000000000000..9bbfd38084aa7
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Operation.Serialization.cs
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class Operation
+ {
+ internal static Operation DeserializeOperation(JsonElement element)
+ {
+ string name = default;
+ OperationDisplay display = default;
+ string origin = default;
+ ServiceSpecification serviceSpecification = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("name"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("display"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ display = OperationDisplay.DeserializeOperationDisplay(property.Value);
+ continue;
+ }
+ if (property.NameEquals("origin"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ origin = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("properties"))
+ {
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("serviceSpecification"))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ serviceSpecification = ServiceSpecification.DeserializeServiceSpecification(property0.Value);
+ continue;
+ }
+ }
+ continue;
+ }
+ }
+ return new Operation(name, display, origin, serviceSpecification);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Operation.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Operation.cs
new file mode 100644
index 0000000000000..d71227857b175
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Operation.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Key Vault REST API operation definition.
+ public partial class Operation
+ {
+ /// Initializes a new instance of Operation.
+ internal Operation()
+ {
+ }
+
+ /// Initializes a new instance of Operation.
+ /// Operation name: {provider}/{resource}/{operation}.
+ /// Display metadata associated with the operation.
+ /// The origin of operations.
+ /// One property of operation, include metric specifications.
+ internal Operation(string name, OperationDisplay display, string origin, ServiceSpecification serviceSpecification)
+ {
+ Name = name;
+ Display = display;
+ Origin = origin;
+ ServiceSpecification = serviceSpecification;
+ }
+
+ /// Operation name: {provider}/{resource}/{operation}.
+ public string Name { get; }
+ /// Display metadata associated with the operation.
+ public OperationDisplay Display { get; }
+ /// The origin of operations.
+ public string Origin { get; }
+ /// One property of operation, include metric specifications.
+ public ServiceSpecification ServiceSpecification { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/OperationDisplay.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/OperationDisplay.Serialization.cs
new file mode 100644
index 0000000000000..770d8418d1016
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/OperationDisplay.Serialization.cs
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class OperationDisplay
+ {
+ internal static OperationDisplay DeserializeOperationDisplay(JsonElement element)
+ {
+ string provider = default;
+ string resource = default;
+ string operation = default;
+ string description = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("provider"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ provider = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("resource"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ resource = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("operation"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ operation = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("description"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ description = property.Value.GetString();
+ continue;
+ }
+ }
+ return new OperationDisplay(provider, resource, operation, description);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/OperationDisplay.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/OperationDisplay.cs
new file mode 100644
index 0000000000000..ac825f965a6f5
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/OperationDisplay.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Display metadata associated with the operation.
+ public partial class OperationDisplay
+ {
+ /// Initializes a new instance of OperationDisplay.
+ internal OperationDisplay()
+ {
+ }
+
+ /// Initializes a new instance of OperationDisplay.
+ /// Service provider: Microsoft Key Vault.
+ /// Resource on which the operation is performed etc.
+ /// Type of operation: get, read, delete, etc.
+ /// Description of operation.
+ internal OperationDisplay(string provider, string resource, string operation, string description)
+ {
+ Provider = provider;
+ Resource = resource;
+ Operation = operation;
+ Description = description;
+ }
+
+ /// Service provider: Microsoft Key Vault.
+ public string Provider { get; }
+ /// Resource on which the operation is performed etc.
+ public string Resource { get; }
+ /// Type of operation: get, read, delete, etc.
+ public string Operation { get; }
+ /// Description of operation.
+ public string Description { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/OperationListResult.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/OperationListResult.Serialization.cs
new file mode 100644
index 0000000000000..20d482b0c4768
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/OperationListResult.Serialization.cs
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class OperationListResult
+ {
+ internal static OperationListResult DeserializeOperationListResult(JsonElement element)
+ {
+ IReadOnlyList value = default;
+ string nextLink = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ array.Add(Operation.DeserializeOperation(item));
+ }
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ }
+ return new OperationListResult(value, nextLink);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/OperationListResult.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/OperationListResult.cs
new file mode 100644
index 0000000000000..b16b8619e24fd
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/OperationListResult.cs
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Result of the request to list Storage operations. It contains a list of operations and a URL link to get the next set of results.
+ public partial class OperationListResult
+ {
+ /// Initializes a new instance of OperationListResult.
+ internal OperationListResult()
+ {
+ }
+
+ /// Initializes a new instance of OperationListResult.
+ /// List of Storage operations supported by the Storage resource provider.
+ /// The URL to get the next set of operations.
+ internal OperationListResult(IReadOnlyList value, string nextLink)
+ {
+ Value = value;
+ NextLink = nextLink;
+ }
+
+ /// List of Storage operations supported by the Storage resource provider.
+ public IReadOnlyList Value { get; }
+ /// The URL to get the next set of operations.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Permissions.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Permissions.Serialization.cs
new file mode 100644
index 0000000000000..3f9f3fc60fe95
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Permissions.Serialization.cs
@@ -0,0 +1,130 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class Permissions : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Keys != null)
+ {
+ writer.WritePropertyName("keys");
+ writer.WriteStartArray();
+ foreach (var item in Keys)
+ {
+ writer.WriteStringValue(item.ToString());
+ }
+ writer.WriteEndArray();
+ }
+ if (Secrets != null)
+ {
+ writer.WritePropertyName("secrets");
+ writer.WriteStartArray();
+ foreach (var item in Secrets)
+ {
+ writer.WriteStringValue(item.ToString());
+ }
+ writer.WriteEndArray();
+ }
+ if (Certificates != null)
+ {
+ writer.WritePropertyName("certificates");
+ writer.WriteStartArray();
+ foreach (var item in Certificates)
+ {
+ writer.WriteStringValue(item.ToString());
+ }
+ writer.WriteEndArray();
+ }
+ if (Storage != null)
+ {
+ writer.WritePropertyName("storage");
+ writer.WriteStartArray();
+ foreach (var item in Storage)
+ {
+ writer.WriteStringValue(item.ToString());
+ }
+ writer.WriteEndArray();
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static Permissions DeserializePermissions(JsonElement element)
+ {
+ IList keys = default;
+ IList secrets = default;
+ IList certificates = default;
+ IList storage = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("keys"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(new KeyPermissions(item.GetString()));
+ }
+ keys = array;
+ continue;
+ }
+ if (property.NameEquals("secrets"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(new SecretPermissions(item.GetString()));
+ }
+ secrets = array;
+ continue;
+ }
+ if (property.NameEquals("certificates"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(new CertificatePermissions(item.GetString()));
+ }
+ certificates = array;
+ continue;
+ }
+ if (property.NameEquals("storage"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(new StoragePermissions(item.GetString()));
+ }
+ storage = array;
+ continue;
+ }
+ }
+ return new Permissions(keys, secrets, certificates, storage);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Permissions.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Permissions.cs
new file mode 100644
index 0000000000000..9738e5bb69a20
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Permissions.cs
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Permissions the identity has for keys, secrets, certificates and storage.
+ public partial class Permissions
+ {
+ /// Initializes a new instance of Permissions.
+ public Permissions()
+ {
+ }
+
+ /// Initializes a new instance of Permissions.
+ /// Permissions to keys.
+ /// Permissions to secrets.
+ /// Permissions to certificates.
+ /// Permissions to storage accounts.
+ internal Permissions(IList keys, IList secrets, IList certificates, IList storage)
+ {
+ Keys = keys;
+ Secrets = secrets;
+ Certificates = certificates;
+ Storage = storage;
+ }
+
+ /// Permissions to keys.
+ public IList Keys { get; set; }
+ /// Permissions to secrets.
+ public IList Secrets { get; set; }
+ /// Permissions to certificates.
+ public IList Certificates { get; set; }
+ /// Permissions to storage accounts.
+ public IList Storage { get; set; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpoint.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpoint.Serialization.cs
new file mode 100644
index 0000000000000..2dd80be675d77
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpoint.Serialization.cs
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class PrivateEndpoint : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Id != null)
+ {
+ writer.WritePropertyName("id");
+ writer.WriteStringValue(Id);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static PrivateEndpoint DeserializePrivateEndpoint(JsonElement element)
+ {
+ string id = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ id = property.Value.GetString();
+ continue;
+ }
+ }
+ return new PrivateEndpoint(id);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpoint.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpoint.cs
new file mode 100644
index 0000000000000..c32fd6bec7c4e
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpoint.cs
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Private endpoint object properties.
+ public partial class PrivateEndpoint
+ {
+ /// Initializes a new instance of PrivateEndpoint.
+ public PrivateEndpoint()
+ {
+ }
+
+ /// Initializes a new instance of PrivateEndpoint.
+ /// Full identifier of the private endpoint resource.
+ internal PrivateEndpoint(string id)
+ {
+ Id = id;
+ }
+
+ /// Full identifier of the private endpoint resource.
+ public string Id { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnection.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnection.Serialization.cs
new file mode 100644
index 0000000000000..16a049c4225ed
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnection.Serialization.cs
@@ -0,0 +1,178 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class PrivateEndpointConnection : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Id != null)
+ {
+ writer.WritePropertyName("id");
+ writer.WriteStringValue(Id);
+ }
+ if (Name != null)
+ {
+ writer.WritePropertyName("name");
+ writer.WriteStringValue(Name);
+ }
+ if (Type != null)
+ {
+ writer.WritePropertyName("type");
+ writer.WriteStringValue(Type);
+ }
+ if (Location != null)
+ {
+ writer.WritePropertyName("location");
+ writer.WriteStringValue(Location);
+ }
+ if (Tags != null)
+ {
+ writer.WritePropertyName("tags");
+ writer.WriteStartObject();
+ foreach (var item in Tags)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteStringValue(item.Value);
+ }
+ writer.WriteEndObject();
+ }
+ writer.WritePropertyName("properties");
+ writer.WriteStartObject();
+ if (PrivateEndpoint != null)
+ {
+ writer.WritePropertyName("privateEndpoint");
+ writer.WriteObjectValue(PrivateEndpoint);
+ }
+ if (PrivateLinkServiceConnectionState != null)
+ {
+ writer.WritePropertyName("privateLinkServiceConnectionState");
+ writer.WriteObjectValue(PrivateLinkServiceConnectionState);
+ }
+ if (ProvisioningState != null)
+ {
+ writer.WritePropertyName("provisioningState");
+ writer.WriteStringValue(ProvisioningState.Value.ToString());
+ }
+ writer.WriteEndObject();
+ writer.WriteEndObject();
+ }
+
+ internal static PrivateEndpointConnection DeserializePrivateEndpointConnection(JsonElement element)
+ {
+ string id = default;
+ string name = default;
+ string type = default;
+ string location = default;
+ IDictionary tags = default;
+ PrivateEndpoint privateEndpoint = default;
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default;
+ PrivateEndpointConnectionProvisioningState? provisioningState = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ id = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("name"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ type = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("location"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ location = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("tags"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ dictionary.Add(property0.Name, null);
+ }
+ else
+ {
+ dictionary.Add(property0.Name, property0.Value.GetString());
+ }
+ }
+ tags = dictionary;
+ continue;
+ }
+ if (property.NameEquals("properties"))
+ {
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("privateEndpoint"))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ privateEndpoint = PrivateEndpoint.DeserializePrivateEndpoint(property0.Value);
+ continue;
+ }
+ if (property0.NameEquals("privateLinkServiceConnectionState"))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLinkServiceConnectionState(property0.Value);
+ continue;
+ }
+ if (property0.NameEquals("provisioningState"))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ provisioningState = new PrivateEndpointConnectionProvisioningState(property0.Value.GetString());
+ continue;
+ }
+ }
+ continue;
+ }
+ }
+ return new PrivateEndpointConnection(id, name, type, location, tags, privateEndpoint, privateLinkServiceConnectionState, provisioningState);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnection.cs
new file mode 100644
index 0000000000000..6ff61f70d3655
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnection.cs
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Private endpoint connection resource.
+ public partial class PrivateEndpointConnection : Resource
+ {
+ /// Initializes a new instance of PrivateEndpointConnection.
+ public PrivateEndpointConnection()
+ {
+ }
+
+ /// Initializes a new instance of PrivateEndpointConnection.
+ /// Fully qualified identifier of the key vault resource.
+ /// Name of the key vault resource.
+ /// Resource type of the key vault resource.
+ /// Azure location of the key vault resource.
+ /// Tags assigned to the key vault resource.
+ /// Properties of the private endpoint object.
+ /// Approval state of the private link connection.
+ /// Provisioning state of the private endpoint connection.
+ internal PrivateEndpointConnection(string id, string name, string type, string location, IDictionary tags, PrivateEndpoint privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState, PrivateEndpointConnectionProvisioningState? provisioningState) : base(id, name, type, location, tags)
+ {
+ PrivateEndpoint = privateEndpoint;
+ PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ ProvisioningState = provisioningState;
+ }
+
+ /// Properties of the private endpoint object.
+ public PrivateEndpoint PrivateEndpoint { get; set; }
+ /// Approval state of the private link connection.
+ public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; }
+ /// Provisioning state of the private endpoint connection.
+ public PrivateEndpointConnectionProvisioningState? ProvisioningState { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnectionItem.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnectionItem.Serialization.cs
new file mode 100644
index 0000000000000..4bb82f86fe745
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnectionItem.Serialization.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class PrivateEndpointConnectionItem : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("properties");
+ writer.WriteStartObject();
+ if (PrivateEndpoint != null)
+ {
+ writer.WritePropertyName("privateEndpoint");
+ writer.WriteObjectValue(PrivateEndpoint);
+ }
+ if (PrivateLinkServiceConnectionState != null)
+ {
+ writer.WritePropertyName("privateLinkServiceConnectionState");
+ writer.WriteObjectValue(PrivateLinkServiceConnectionState);
+ }
+ if (ProvisioningState != null)
+ {
+ writer.WritePropertyName("provisioningState");
+ writer.WriteStringValue(ProvisioningState.Value.ToString());
+ }
+ writer.WriteEndObject();
+ writer.WriteEndObject();
+ }
+
+ internal static PrivateEndpointConnectionItem DeserializePrivateEndpointConnectionItem(JsonElement element)
+ {
+ PrivateEndpoint privateEndpoint = default;
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default;
+ PrivateEndpointConnectionProvisioningState? provisioningState = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("properties"))
+ {
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("privateEndpoint"))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ privateEndpoint = PrivateEndpoint.DeserializePrivateEndpoint(property0.Value);
+ continue;
+ }
+ if (property0.NameEquals("privateLinkServiceConnectionState"))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLinkServiceConnectionState(property0.Value);
+ continue;
+ }
+ if (property0.NameEquals("provisioningState"))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ provisioningState = new PrivateEndpointConnectionProvisioningState(property0.Value.GetString());
+ continue;
+ }
+ }
+ continue;
+ }
+ }
+ return new PrivateEndpointConnectionItem(privateEndpoint, privateLinkServiceConnectionState, provisioningState);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnectionItem.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnectionItem.cs
new file mode 100644
index 0000000000000..6744bea77e1fd
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnectionItem.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Private endpoint connection item.
+ public partial class PrivateEndpointConnectionItem
+ {
+ /// Initializes a new instance of PrivateEndpointConnectionItem.
+ public PrivateEndpointConnectionItem()
+ {
+ }
+
+ /// Initializes a new instance of PrivateEndpointConnectionItem.
+ /// Properties of the private endpoint object.
+ /// Approval state of the private link connection.
+ /// Provisioning state of the private endpoint connection.
+ internal PrivateEndpointConnectionItem(PrivateEndpoint privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState, PrivateEndpointConnectionProvisioningState? provisioningState)
+ {
+ PrivateEndpoint = privateEndpoint;
+ PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ ProvisioningState = provisioningState;
+ }
+
+ /// Properties of the private endpoint object.
+ public PrivateEndpoint PrivateEndpoint { get; set; }
+ /// Approval state of the private link connection.
+ public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; }
+ /// Provisioning state of the private endpoint connection.
+ public PrivateEndpointConnectionProvisioningState? ProvisioningState { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs
new file mode 100644
index 0000000000000..f7ee67fa8d7ee
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// The current provisioning state.
+ public readonly partial struct PrivateEndpointConnectionProvisioningState : IEquatable
+ {
+ private readonly string _value;
+
+ /// Determines if two values are the same.
+ public PrivateEndpointConnectionProvisioningState(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string SucceededValue = "Succeeded";
+ private const string CreatingValue = "Creating";
+ private const string UpdatingValue = "Updating";
+ private const string DeletingValue = "Deleting";
+ private const string FailedValue = "Failed";
+ private const string DisconnectedValue = "Disconnected";
+
+ /// Succeeded.
+ public static PrivateEndpointConnectionProvisioningState Succeeded { get; } = new PrivateEndpointConnectionProvisioningState(SucceededValue);
+ /// Creating.
+ public static PrivateEndpointConnectionProvisioningState Creating { get; } = new PrivateEndpointConnectionProvisioningState(CreatingValue);
+ /// Updating.
+ public static PrivateEndpointConnectionProvisioningState Updating { get; } = new PrivateEndpointConnectionProvisioningState(UpdatingValue);
+ /// Deleting.
+ public static PrivateEndpointConnectionProvisioningState Deleting { get; } = new PrivateEndpointConnectionProvisioningState(DeletingValue);
+ /// Failed.
+ public static PrivateEndpointConnectionProvisioningState Failed { get; } = new PrivateEndpointConnectionProvisioningState(FailedValue);
+ /// Disconnected.
+ public static PrivateEndpointConnectionProvisioningState Disconnected { get; } = new PrivateEndpointConnectionProvisioningState(DisconnectedValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(PrivateEndpointConnectionProvisioningState left, PrivateEndpointConnectionProvisioningState right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(PrivateEndpointConnectionProvisioningState left, PrivateEndpointConnectionProvisioningState right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator PrivateEndpointConnectionProvisioningState(string value) => new PrivateEndpointConnectionProvisioningState(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is PrivateEndpointConnectionProvisioningState other && Equals(other);
+ ///
+ public bool Equals(PrivateEndpointConnectionProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value?.GetHashCode() ?? 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs
new file mode 100644
index 0000000000000..ee2598944ab65
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// The private endpoint connection status.
+ public readonly partial struct PrivateEndpointServiceConnectionStatus : IEquatable
+ {
+ private readonly string _value;
+
+ /// Determines if two values are the same.
+ public PrivateEndpointServiceConnectionStatus(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string PendingValue = "Pending";
+ private const string ApprovedValue = "Approved";
+ private const string RejectedValue = "Rejected";
+ private const string DisconnectedValue = "Disconnected";
+
+ /// Pending.
+ public static PrivateEndpointServiceConnectionStatus Pending { get; } = new PrivateEndpointServiceConnectionStatus(PendingValue);
+ /// Approved.
+ public static PrivateEndpointServiceConnectionStatus Approved { get; } = new PrivateEndpointServiceConnectionStatus(ApprovedValue);
+ /// Rejected.
+ public static PrivateEndpointServiceConnectionStatus Rejected { get; } = new PrivateEndpointServiceConnectionStatus(RejectedValue);
+ /// Disconnected.
+ public static PrivateEndpointServiceConnectionStatus Disconnected { get; } = new PrivateEndpointServiceConnectionStatus(DisconnectedValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(PrivateEndpointServiceConnectionStatus left, PrivateEndpointServiceConnectionStatus right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(PrivateEndpointServiceConnectionStatus left, PrivateEndpointServiceConnectionStatus right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator PrivateEndpointServiceConnectionStatus(string value) => new PrivateEndpointServiceConnectionStatus(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is PrivateEndpointServiceConnectionStatus other && Equals(other);
+ ///
+ public bool Equals(PrivateEndpointServiceConnectionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value?.GetHashCode() ?? 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkResource.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkResource.Serialization.cs
new file mode 100644
index 0000000000000..1217d644f0284
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkResource.Serialization.cs
@@ -0,0 +1,212 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class PrivateLinkResource : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Id != null)
+ {
+ writer.WritePropertyName("id");
+ writer.WriteStringValue(Id);
+ }
+ if (Name != null)
+ {
+ writer.WritePropertyName("name");
+ writer.WriteStringValue(Name);
+ }
+ if (Type != null)
+ {
+ writer.WritePropertyName("type");
+ writer.WriteStringValue(Type);
+ }
+ if (Location != null)
+ {
+ writer.WritePropertyName("location");
+ writer.WriteStringValue(Location);
+ }
+ if (Tags != null)
+ {
+ writer.WritePropertyName("tags");
+ writer.WriteStartObject();
+ foreach (var item in Tags)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteStringValue(item.Value);
+ }
+ writer.WriteEndObject();
+ }
+ writer.WritePropertyName("properties");
+ writer.WriteStartObject();
+ if (GroupId != null)
+ {
+ writer.WritePropertyName("groupId");
+ writer.WriteStringValue(GroupId);
+ }
+ if (RequiredMembers != null)
+ {
+ writer.WritePropertyName("requiredMembers");
+ writer.WriteStartArray();
+ foreach (var item in RequiredMembers)
+ {
+ writer.WriteStringValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (RequiredZoneNames != null)
+ {
+ writer.WritePropertyName("requiredZoneNames");
+ writer.WriteStartArray();
+ foreach (var item in RequiredZoneNames)
+ {
+ writer.WriteStringValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ writer.WriteEndObject();
+ writer.WriteEndObject();
+ }
+
+ internal static PrivateLinkResource DeserializePrivateLinkResource(JsonElement element)
+ {
+ string id = default;
+ string name = default;
+ string type = default;
+ string location = default;
+ IDictionary tags = default;
+ string groupId = default;
+ IList requiredMembers = default;
+ IList requiredZoneNames = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ id = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("name"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ type = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("location"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ location = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("tags"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ dictionary.Add(property0.Name, null);
+ }
+ else
+ {
+ dictionary.Add(property0.Name, property0.Value.GetString());
+ }
+ }
+ tags = dictionary;
+ continue;
+ }
+ if (property.NameEquals("properties"))
+ {
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("groupId"))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ groupId = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("requiredMembers"))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property0.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ array.Add(item.GetString());
+ }
+ }
+ requiredMembers = array;
+ continue;
+ }
+ if (property0.NameEquals("requiredZoneNames"))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property0.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ array.Add(item.GetString());
+ }
+ }
+ requiredZoneNames = array;
+ continue;
+ }
+ }
+ continue;
+ }
+ }
+ return new PrivateLinkResource(id, name, type, location, tags, groupId, requiredMembers, requiredZoneNames);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkResource.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkResource.cs
new file mode 100644
index 0000000000000..293a1797d706a
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkResource.cs
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// A private link resource.
+ public partial class PrivateLinkResource : Resource
+ {
+ /// Initializes a new instance of PrivateLinkResource.
+ public PrivateLinkResource()
+ {
+ }
+
+ /// Initializes a new instance of PrivateLinkResource.
+ /// Fully qualified identifier of the key vault resource.
+ /// Name of the key vault resource.
+ /// Resource type of the key vault resource.
+ /// Azure location of the key vault resource.
+ /// Tags assigned to the key vault resource.
+ /// Group identifier of private link resource.
+ /// Required member names of private link resource.
+ /// Required DNS zone names of the the private link resource.
+ internal PrivateLinkResource(string id, string name, string type, string location, IDictionary tags, string groupId, IList requiredMembers, IList requiredZoneNames) : base(id, name, type, location, tags)
+ {
+ GroupId = groupId;
+ RequiredMembers = requiredMembers;
+ RequiredZoneNames = requiredZoneNames;
+ }
+
+ /// Group identifier of private link resource.
+ public string GroupId { get; }
+ /// Required member names of private link resource.
+ public IList RequiredMembers { get; }
+ /// Required DNS zone names of the the private link resource.
+ public IList RequiredZoneNames { get; set; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkResourceListResult.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkResourceListResult.Serialization.cs
new file mode 100644
index 0000000000000..ff759f38e4e0a
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkResourceListResult.Serialization.cs
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class PrivateLinkResourceListResult
+ {
+ internal static PrivateLinkResourceListResult DeserializePrivateLinkResourceListResult(JsonElement element)
+ {
+ IReadOnlyList value = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ array.Add(PrivateLinkResource.DeserializePrivateLinkResource(item));
+ }
+ }
+ value = array;
+ continue;
+ }
+ }
+ return new PrivateLinkResourceListResult(value);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkResourceListResult.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkResourceListResult.cs
new file mode 100644
index 0000000000000..585eaa76e17fb
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkResourceListResult.cs
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// A list of private link resources.
+ public partial class PrivateLinkResourceListResult
+ {
+ /// Initializes a new instance of PrivateLinkResourceListResult.
+ internal PrivateLinkResourceListResult()
+ {
+ }
+
+ /// Initializes a new instance of PrivateLinkResourceListResult.
+ /// Array of private link resources.
+ internal PrivateLinkResourceListResult(IReadOnlyList value)
+ {
+ Value = value;
+ }
+
+ /// Array of private link resources.
+ public IReadOnlyList Value { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkServiceConnectionState.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkServiceConnectionState.Serialization.cs
new file mode 100644
index 0000000000000..bfaa023536160
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkServiceConnectionState.Serialization.cs
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class PrivateLinkServiceConnectionState : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Status != null)
+ {
+ writer.WritePropertyName("status");
+ writer.WriteStringValue(Status.Value.ToString());
+ }
+ if (Description != null)
+ {
+ writer.WritePropertyName("description");
+ writer.WriteStringValue(Description);
+ }
+ if (ActionRequired != null)
+ {
+ writer.WritePropertyName("actionRequired");
+ writer.WriteStringValue(ActionRequired);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static PrivateLinkServiceConnectionState DeserializePrivateLinkServiceConnectionState(JsonElement element)
+ {
+ PrivateEndpointServiceConnectionStatus? status = default;
+ string description = default;
+ string actionRequired = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("status"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ status = new PrivateEndpointServiceConnectionStatus(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("description"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ description = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("actionRequired"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ actionRequired = property.Value.GetString();
+ continue;
+ }
+ }
+ return new PrivateLinkServiceConnectionState(status, description, actionRequired);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkServiceConnectionState.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkServiceConnectionState.cs
new file mode 100644
index 0000000000000..65d279c489324
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/PrivateLinkServiceConnectionState.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// An object that represents the approval state of the private link connection.
+ public partial class PrivateLinkServiceConnectionState
+ {
+ /// Initializes a new instance of PrivateLinkServiceConnectionState.
+ public PrivateLinkServiceConnectionState()
+ {
+ }
+
+ /// Initializes a new instance of PrivateLinkServiceConnectionState.
+ /// Indicates whether the connection has been approved, rejected or removed by the key vault owner.
+ /// The reason for approval or rejection.
+ /// A message indicating if changes on the service provider require any updates on the consumer.
+ internal PrivateLinkServiceConnectionState(PrivateEndpointServiceConnectionStatus? status, string description, string actionRequired)
+ {
+ Status = status;
+ Description = description;
+ ActionRequired = actionRequired;
+ }
+
+ /// Indicates whether the connection has been approved, rejected or removed by the key vault owner.
+ public PrivateEndpointServiceConnectionStatus? Status { get; set; }
+ /// The reason for approval or rejection.
+ public string Description { get; set; }
+ /// A message indicating if changes on the service provider require any updates on the consumer.
+ public string ActionRequired { get; set; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Reason.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Reason.Serialization.cs
new file mode 100644
index 0000000000000..755bb7266405d
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Reason.Serialization.cs
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.Management.KeyVault.Models
+{
+ internal static class ReasonExtensions
+ {
+ public static string ToSerialString(this Reason value) => value switch
+ {
+ Reason.AccountNameInvalid => "AccountNameInvalid",
+ Reason.AlreadyExists => "AlreadyExists",
+ _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown Reason value.")
+ };
+
+ public static Reason ToReason(this string value)
+ {
+ if (string.Equals(value, "AccountNameInvalid", StringComparison.InvariantCultureIgnoreCase)) return Reason.AccountNameInvalid;
+ if (string.Equals(value, "AlreadyExists", StringComparison.InvariantCultureIgnoreCase)) return Reason.AlreadyExists;
+ throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown Reason value.");
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Reason.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Reason.cs
new file mode 100644
index 0000000000000..dfebb76d5c3ed
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Reason.cs
@@ -0,0 +1,18 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false.
+ public enum Reason
+ {
+ /// AccountNameInvalid.
+ AccountNameInvalid,
+ /// AlreadyExists.
+ AlreadyExists
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Resource.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Resource.Serialization.cs
new file mode 100644
index 0000000000000..fcd92ff4c53ce
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Resource.Serialization.cs
@@ -0,0 +1,123 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class Resource : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Id != null)
+ {
+ writer.WritePropertyName("id");
+ writer.WriteStringValue(Id);
+ }
+ if (Name != null)
+ {
+ writer.WritePropertyName("name");
+ writer.WriteStringValue(Name);
+ }
+ if (Type != null)
+ {
+ writer.WritePropertyName("type");
+ writer.WriteStringValue(Type);
+ }
+ if (Location != null)
+ {
+ writer.WritePropertyName("location");
+ writer.WriteStringValue(Location);
+ }
+ if (Tags != null)
+ {
+ writer.WritePropertyName("tags");
+ writer.WriteStartObject();
+ foreach (var item in Tags)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteStringValue(item.Value);
+ }
+ writer.WriteEndObject();
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static Resource DeserializeResource(JsonElement element)
+ {
+ string id = default;
+ string name = default;
+ string type = default;
+ string location = default;
+ IDictionary tags = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ id = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("name"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ type = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("location"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ location = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("tags"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ dictionary.Add(property0.Name, null);
+ }
+ else
+ {
+ dictionary.Add(property0.Name, property0.Value.GetString());
+ }
+ }
+ tags = dictionary;
+ continue;
+ }
+ }
+ return new Resource(id, name, type, location, tags);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Resource.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Resource.cs
new file mode 100644
index 0000000000000..ea8a721124ece
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Resource.cs
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Key Vault resource.
+ public partial class Resource
+ {
+ /// Initializes a new instance of Resource.
+ public Resource()
+ {
+ }
+
+ /// Initializes a new instance of Resource.
+ /// Fully qualified identifier of the key vault resource.
+ /// Name of the key vault resource.
+ /// Resource type of the key vault resource.
+ /// Azure location of the key vault resource.
+ /// Tags assigned to the key vault resource.
+ internal Resource(string id, string name, string type, string location, IDictionary tags)
+ {
+ Id = id;
+ Name = name;
+ Type = type;
+ Location = location;
+ Tags = tags;
+ }
+
+ /// Fully qualified identifier of the key vault resource.
+ public string Id { get; }
+ /// Name of the key vault resource.
+ public string Name { get; }
+ /// Resource type of the key vault resource.
+ public string Type { get; }
+ /// Azure location of the key vault resource.
+ public string Location { get; }
+ /// Tags assigned to the key vault resource.
+ public IDictionary Tags { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/ResourceListResult.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/ResourceListResult.Serialization.cs
new file mode 100644
index 0000000000000..139f9511af5fe
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/ResourceListResult.Serialization.cs
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class ResourceListResult
+ {
+ internal static ResourceListResult DeserializeResourceListResult(JsonElement element)
+ {
+ IReadOnlyList value = default;
+ string nextLink = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ array.Add(Resource.DeserializeResource(item));
+ }
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ }
+ return new ResourceListResult(value, nextLink);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/ResourceListResult.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/ResourceListResult.cs
new file mode 100644
index 0000000000000..5e952853809cb
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/ResourceListResult.cs
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// List of vault resources.
+ public partial class ResourceListResult
+ {
+ /// Initializes a new instance of ResourceListResult.
+ internal ResourceListResult()
+ {
+ }
+
+ /// Initializes a new instance of ResourceListResult.
+ /// The list of vault resources.
+ /// The URL to get the next set of vault resources.
+ internal ResourceListResult(IReadOnlyList value, string nextLink)
+ {
+ Value = value;
+ NextLink = nextLink;
+ }
+
+ /// The list of vault resources.
+ public IReadOnlyList Value { get; }
+ /// The URL to get the next set of vault resources.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/SecretPermissions.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/SecretPermissions.cs
new file mode 100644
index 0000000000000..23937164fd40c
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/SecretPermissions.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// The SecretPermissions.
+ public readonly partial struct SecretPermissions : IEquatable
+ {
+ private readonly string _value;
+
+ /// Determines if two values are the same.
+ public SecretPermissions(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string GetValue = "get";
+ private const string ListValue = "list";
+ private const string SetValue = "set";
+ private const string DeleteValue = "delete";
+ private const string BackupValue = "backup";
+ private const string RestoreValue = "restore";
+ private const string RecoverValue = "recover";
+ private const string PurgeValue = "purge";
+
+ /// get.
+ public static SecretPermissions Get { get; } = new SecretPermissions(GetValue);
+ /// list.
+ public static SecretPermissions List { get; } = new SecretPermissions(ListValue);
+ /// set.
+ public static SecretPermissions Set { get; } = new SecretPermissions(SetValue);
+ /// delete.
+ public static SecretPermissions Delete { get; } = new SecretPermissions(DeleteValue);
+ /// backup.
+ public static SecretPermissions Backup { get; } = new SecretPermissions(BackupValue);
+ /// restore.
+ public static SecretPermissions Restore { get; } = new SecretPermissions(RestoreValue);
+ /// recover.
+ public static SecretPermissions Recover { get; } = new SecretPermissions(RecoverValue);
+ /// purge.
+ public static SecretPermissions Purge { get; } = new SecretPermissions(PurgeValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(SecretPermissions left, SecretPermissions right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(SecretPermissions left, SecretPermissions right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator SecretPermissions(string value) => new SecretPermissions(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is SecretPermissions other && Equals(other);
+ ///
+ public bool Equals(SecretPermissions other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value?.GetHashCode() ?? 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/ServiceSpecification.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/ServiceSpecification.Serialization.cs
new file mode 100644
index 0000000000000..eb57c1f34f977
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/ServiceSpecification.Serialization.cs
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class ServiceSpecification
+ {
+ internal static ServiceSpecification DeserializeServiceSpecification(JsonElement element)
+ {
+ IReadOnlyList logSpecifications = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("logSpecifications"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ array.Add(LogSpecification.DeserializeLogSpecification(item));
+ }
+ }
+ logSpecifications = array;
+ continue;
+ }
+ }
+ return new ServiceSpecification(logSpecifications);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/ServiceSpecification.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/ServiceSpecification.cs
new file mode 100644
index 0000000000000..d45f7145c2eb7
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/ServiceSpecification.cs
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// One property of operation, include log specifications.
+ public partial class ServiceSpecification
+ {
+ /// Initializes a new instance of ServiceSpecification.
+ internal ServiceSpecification()
+ {
+ }
+
+ /// Initializes a new instance of ServiceSpecification.
+ /// Log specifications of operation.
+ internal ServiceSpecification(IReadOnlyList logSpecifications)
+ {
+ LogSpecifications = logSpecifications;
+ }
+
+ /// Log specifications of operation.
+ public IReadOnlyList LogSpecifications { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Sku.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Sku.Serialization.cs
new file mode 100644
index 0000000000000..cb9306cd379ab
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Sku.Serialization.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class Sku : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("family");
+ writer.WriteStringValue(Family);
+ writer.WritePropertyName("name");
+ writer.WriteStringValue(Name.ToSerialString());
+ writer.WriteEndObject();
+ }
+
+ internal static Sku DeserializeSku(JsonElement element)
+ {
+ string family = default;
+ SkuName name = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("family"))
+ {
+ family = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("name"))
+ {
+ name = property.Value.GetString().ToSkuName();
+ continue;
+ }
+ }
+ return new Sku(family, name);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Sku.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Sku.cs
new file mode 100644
index 0000000000000..3a85882dafd0d
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Sku.cs
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// SKU details.
+ public partial class Sku
+ {
+ /// Initializes a new instance of Sku.
+ /// SKU name to specify whether the key vault is a standard vault or a premium vault.
+ public Sku(SkuName name)
+ {
+ Family = "A";
+ Name = name;
+ }
+
+ /// Initializes a new instance of Sku.
+ /// SKU family name.
+ /// SKU name to specify whether the key vault is a standard vault or a premium vault.
+ internal Sku(string family, SkuName name)
+ {
+ Family = family;
+ Name = name;
+ }
+
+ /// SKU family name.
+ public string Family { get; set; }
+ /// SKU name to specify whether the key vault is a standard vault or a premium vault.
+ public SkuName Name { get; set; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/SkuName.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/SkuName.Serialization.cs
new file mode 100644
index 0000000000000..0278ce2e16445
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/SkuName.Serialization.cs
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.Management.KeyVault.Models
+{
+ internal static class SkuNameExtensions
+ {
+ public static string ToSerialString(this SkuName value) => value switch
+ {
+ SkuName.Standard => "standard",
+ SkuName.Premium => "premium",
+ _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SkuName value.")
+ };
+
+ public static SkuName ToSkuName(this string value)
+ {
+ if (string.Equals(value, "standard", StringComparison.InvariantCultureIgnoreCase)) return SkuName.Standard;
+ if (string.Equals(value, "premium", StringComparison.InvariantCultureIgnoreCase)) return SkuName.Premium;
+ throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SkuName value.");
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/SkuName.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/SkuName.cs
new file mode 100644
index 0000000000000..8aec04883fe07
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/SkuName.cs
@@ -0,0 +1,18 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// SKU name to specify whether the key vault is a standard vault or a premium vault.
+ public enum SkuName
+ {
+ /// standard.
+ Standard,
+ /// premium.
+ Premium
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/StoragePermissions.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/StoragePermissions.cs
new file mode 100644
index 0000000000000..bd37937e933e0
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/StoragePermissions.cs
@@ -0,0 +1,86 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// The StoragePermissions.
+ public readonly partial struct StoragePermissions : IEquatable
+ {
+ private readonly string _value;
+
+ /// Determines if two values are the same.
+ public StoragePermissions(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string GetValue = "get";
+ private const string ListValue = "list";
+ private const string DeleteValue = "delete";
+ private const string SetValue = "set";
+ private const string UpdateValue = "update";
+ private const string RegeneratekeyValue = "regeneratekey";
+ private const string RecoverValue = "recover";
+ private const string PurgeValue = "purge";
+ private const string BackupValue = "backup";
+ private const string RestoreValue = "restore";
+ private const string SetsasValue = "setsas";
+ private const string ListsasValue = "listsas";
+ private const string GetsasValue = "getsas";
+ private const string DeletesasValue = "deletesas";
+
+ /// get.
+ public static StoragePermissions Get { get; } = new StoragePermissions(GetValue);
+ /// list.
+ public static StoragePermissions List { get; } = new StoragePermissions(ListValue);
+ /// delete.
+ public static StoragePermissions Delete { get; } = new StoragePermissions(DeleteValue);
+ /// set.
+ public static StoragePermissions Set { get; } = new StoragePermissions(SetValue);
+ /// update.
+ public static StoragePermissions Update { get; } = new StoragePermissions(UpdateValue);
+ /// regeneratekey.
+ public static StoragePermissions Regeneratekey { get; } = new StoragePermissions(RegeneratekeyValue);
+ /// recover.
+ public static StoragePermissions Recover { get; } = new StoragePermissions(RecoverValue);
+ /// purge.
+ public static StoragePermissions Purge { get; } = new StoragePermissions(PurgeValue);
+ /// backup.
+ public static StoragePermissions Backup { get; } = new StoragePermissions(BackupValue);
+ /// restore.
+ public static StoragePermissions Restore { get; } = new StoragePermissions(RestoreValue);
+ /// setsas.
+ public static StoragePermissions Setsas { get; } = new StoragePermissions(SetsasValue);
+ /// listsas.
+ public static StoragePermissions Listsas { get; } = new StoragePermissions(ListsasValue);
+ /// getsas.
+ public static StoragePermissions Getsas { get; } = new StoragePermissions(GetsasValue);
+ /// deletesas.
+ public static StoragePermissions Deletesas { get; } = new StoragePermissions(DeletesasValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(StoragePermissions left, StoragePermissions right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(StoragePermissions left, StoragePermissions right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator StoragePermissions(string value) => new StoragePermissions(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is StoragePermissions other && Equals(other);
+ ///
+ public bool Equals(StoragePermissions other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value?.GetHashCode() ?? 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Vault.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Vault.Serialization.cs
new file mode 100644
index 0000000000000..9c887bb93e40e
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Vault.Serialization.cs
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class Vault
+ {
+ internal static Vault DeserializeVault(JsonElement element)
+ {
+ string id = default;
+ string name = default;
+ string type = default;
+ string location = default;
+ IReadOnlyDictionary tags = default;
+ VaultProperties properties = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ id = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("name"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ type = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("location"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ location = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("tags"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ dictionary.Add(property0.Name, null);
+ }
+ else
+ {
+ dictionary.Add(property0.Name, property0.Value.GetString());
+ }
+ }
+ tags = dictionary;
+ continue;
+ }
+ if (property.NameEquals("properties"))
+ {
+ properties = VaultProperties.DeserializeVaultProperties(property.Value);
+ continue;
+ }
+ }
+ return new Vault(id, name, type, location, tags, properties);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Vault.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Vault.cs
new file mode 100644
index 0000000000000..7d5fe871c74c2
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/Vault.cs
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Resource information with extended details.
+ public partial class Vault
+ {
+ /// Initializes a new instance of Vault.
+ /// Properties of the vault.
+ internal Vault(VaultProperties properties)
+ {
+ if (properties == null)
+ {
+ throw new ArgumentNullException(nameof(properties));
+ }
+
+ Properties = properties;
+ }
+
+ /// Initializes a new instance of Vault.
+ /// Fully qualified identifier of the key vault resource.
+ /// Name of the key vault resource.
+ /// Resource type of the key vault resource.
+ /// Azure location of the key vault resource.
+ /// Tags assigned to the key vault resource.
+ /// Properties of the vault.
+ internal Vault(string id, string name, string type, string location, IReadOnlyDictionary tags, VaultProperties properties)
+ {
+ Id = id;
+ Name = name;
+ Type = type;
+ Location = location;
+ Tags = tags;
+ Properties = properties;
+ }
+
+ /// Fully qualified identifier of the key vault resource.
+ public string Id { get; }
+ /// Name of the key vault resource.
+ public string Name { get; }
+ /// Resource type of the key vault resource.
+ public string Type { get; }
+ /// Azure location of the key vault resource.
+ public string Location { get; }
+ /// Tags assigned to the key vault resource.
+ public IReadOnlyDictionary Tags { get; }
+ /// Properties of the vault.
+ public VaultProperties Properties { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultAccessPolicyParameters.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultAccessPolicyParameters.Serialization.cs
new file mode 100644
index 0000000000000..6c3a609f12d38
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultAccessPolicyParameters.Serialization.cs
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class VaultAccessPolicyParameters : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Id != null)
+ {
+ writer.WritePropertyName("id");
+ writer.WriteStringValue(Id);
+ }
+ if (Name != null)
+ {
+ writer.WritePropertyName("name");
+ writer.WriteStringValue(Name);
+ }
+ if (Type != null)
+ {
+ writer.WritePropertyName("type");
+ writer.WriteStringValue(Type);
+ }
+ if (Location != null)
+ {
+ writer.WritePropertyName("location");
+ writer.WriteStringValue(Location);
+ }
+ writer.WritePropertyName("properties");
+ writer.WriteObjectValue(Properties);
+ writer.WriteEndObject();
+ }
+
+ internal static VaultAccessPolicyParameters DeserializeVaultAccessPolicyParameters(JsonElement element)
+ {
+ string id = default;
+ string name = default;
+ string type = default;
+ string location = default;
+ VaultAccessPolicyProperties properties = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ id = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("name"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ type = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("location"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ location = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("properties"))
+ {
+ properties = VaultAccessPolicyProperties.DeserializeVaultAccessPolicyProperties(property.Value);
+ continue;
+ }
+ }
+ return new VaultAccessPolicyParameters(id, name, type, location, properties);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultAccessPolicyParameters.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultAccessPolicyParameters.cs
new file mode 100644
index 0000000000000..f59c756c66c1c
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultAccessPolicyParameters.cs
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Parameters for updating the access policy in a vault.
+ public partial class VaultAccessPolicyParameters
+ {
+ /// Initializes a new instance of VaultAccessPolicyParameters.
+ /// Properties of the access policy.
+ public VaultAccessPolicyParameters(VaultAccessPolicyProperties properties)
+ {
+ if (properties == null)
+ {
+ throw new ArgumentNullException(nameof(properties));
+ }
+
+ Properties = properties;
+ }
+
+ /// Initializes a new instance of VaultAccessPolicyParameters.
+ /// The resource id of the access policy.
+ /// The resource name of the access policy.
+ /// The resource name of the access policy.
+ /// The resource type of the access policy.
+ /// Properties of the access policy.
+ internal VaultAccessPolicyParameters(string id, string name, string type, string location, VaultAccessPolicyProperties properties)
+ {
+ Id = id;
+ Name = name;
+ Type = type;
+ Location = location;
+ Properties = properties;
+ }
+
+ /// The resource id of the access policy.
+ public string Id { get; }
+ /// The resource name of the access policy.
+ public string Name { get; }
+ /// The resource name of the access policy.
+ public string Type { get; }
+ /// The resource type of the access policy.
+ public string Location { get; }
+ /// Properties of the access policy.
+ public VaultAccessPolicyProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultAccessPolicyProperties.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultAccessPolicyProperties.Serialization.cs
new file mode 100644
index 0000000000000..45a639bc7e265
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultAccessPolicyProperties.Serialization.cs
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class VaultAccessPolicyProperties : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("accessPolicies");
+ writer.WriteStartArray();
+ foreach (var item in AccessPolicies)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ writer.WriteEndObject();
+ }
+
+ internal static VaultAccessPolicyProperties DeserializeVaultAccessPolicyProperties(JsonElement element)
+ {
+ IList accessPolicies = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("accessPolicies"))
+ {
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ array.Add(AccessPolicyEntry.DeserializeAccessPolicyEntry(item));
+ }
+ }
+ accessPolicies = array;
+ continue;
+ }
+ }
+ return new VaultAccessPolicyProperties(accessPolicies);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultAccessPolicyProperties.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultAccessPolicyProperties.cs
new file mode 100644
index 0000000000000..0facd187179b4
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultAccessPolicyProperties.cs
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Properties of the vault access policy.
+ public partial class VaultAccessPolicyProperties
+ {
+ /// Initializes a new instance of VaultAccessPolicyProperties.
+ /// An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID.
+ public VaultAccessPolicyProperties(IEnumerable accessPolicies)
+ {
+ if (accessPolicies == null)
+ {
+ throw new ArgumentNullException(nameof(accessPolicies));
+ }
+
+ AccessPolicies = accessPolicies.ToArray();
+ }
+
+ /// Initializes a new instance of VaultAccessPolicyProperties.
+ /// An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID.
+ internal VaultAccessPolicyProperties(IList accessPolicies)
+ {
+ AccessPolicies = accessPolicies;
+ }
+
+ /// An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID.
+ public IList AccessPolicies { get; set; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultCheckNameAvailabilityParameters.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultCheckNameAvailabilityParameters.Serialization.cs
new file mode 100644
index 0000000000000..128efff6b9e90
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultCheckNameAvailabilityParameters.Serialization.cs
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class VaultCheckNameAvailabilityParameters : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("name");
+ writer.WriteStringValue(Name);
+ writer.WritePropertyName("type");
+ writer.WriteStringValue(Type);
+ writer.WriteEndObject();
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultCheckNameAvailabilityParameters.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultCheckNameAvailabilityParameters.cs
new file mode 100644
index 0000000000000..db7db0f871268
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultCheckNameAvailabilityParameters.cs
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// The parameters used to check the availability of the vault name.
+ public partial class VaultCheckNameAvailabilityParameters
+ {
+ /// Initializes a new instance of VaultCheckNameAvailabilityParameters.
+ /// The vault name.
+ public VaultCheckNameAvailabilityParameters(string name)
+ {
+ if (name == null)
+ {
+ throw new ArgumentNullException(nameof(name));
+ }
+
+ Name = name;
+ Type = "Microsoft.KeyVault/vaults";
+ }
+
+ /// Initializes a new instance of VaultCheckNameAvailabilityParameters.
+ /// The vault name.
+ /// The type of resource, Microsoft.KeyVault/vaults.
+ internal VaultCheckNameAvailabilityParameters(string name, string type)
+ {
+ Name = name;
+ Type = type;
+ }
+
+ /// The vault name.
+ public string Name { get; }
+ /// The type of resource, Microsoft.KeyVault/vaults.
+ public string Type { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultCreateOrUpdateParameters.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultCreateOrUpdateParameters.Serialization.cs
new file mode 100644
index 0000000000000..2d284535ca611
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultCreateOrUpdateParameters.Serialization.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class VaultCreateOrUpdateParameters : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("location");
+ writer.WriteStringValue(Location);
+ if (Tags != null)
+ {
+ writer.WritePropertyName("tags");
+ writer.WriteStartObject();
+ foreach (var item in Tags)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteStringValue(item.Value);
+ }
+ writer.WriteEndObject();
+ }
+ writer.WritePropertyName("properties");
+ writer.WriteObjectValue(Properties);
+ writer.WriteEndObject();
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultCreateOrUpdateParameters.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultCreateOrUpdateParameters.cs
new file mode 100644
index 0000000000000..5a6f6195b25f8
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultCreateOrUpdateParameters.cs
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Parameters for creating or updating a vault.
+ public partial class VaultCreateOrUpdateParameters
+ {
+ /// Initializes a new instance of VaultCreateOrUpdateParameters.
+ /// The supported Azure location where the key vault should be created.
+ /// Properties of the vault.
+ public VaultCreateOrUpdateParameters(string location, VaultProperties properties)
+ {
+ if (location == null)
+ {
+ throw new ArgumentNullException(nameof(location));
+ }
+ if (properties == null)
+ {
+ throw new ArgumentNullException(nameof(properties));
+ }
+
+ Location = location;
+ Properties = properties;
+ }
+
+ /// Initializes a new instance of VaultCreateOrUpdateParameters.
+ /// The supported Azure location where the key vault should be created.
+ /// The tags that will be assigned to the key vault.
+ /// Properties of the vault.
+ internal VaultCreateOrUpdateParameters(string location, IDictionary tags, VaultProperties properties)
+ {
+ Location = location;
+ Tags = tags;
+ Properties = properties;
+ }
+
+ /// The supported Azure location where the key vault should be created.
+ public string Location { get; }
+ /// The tags that will be assigned to the key vault.
+ public IDictionary Tags { get; set; }
+ /// Properties of the vault.
+ public VaultProperties Properties { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultListResult.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultListResult.Serialization.cs
new file mode 100644
index 0000000000000..142a8177b38e9
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultListResult.Serialization.cs
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class VaultListResult
+ {
+ internal static VaultListResult DeserializeVaultListResult(JsonElement element)
+ {
+ IReadOnlyList value = default;
+ string nextLink = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ array.Add(Vault.DeserializeVault(item));
+ }
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ }
+ return new VaultListResult(value, nextLink);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultListResult.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultListResult.cs
new file mode 100644
index 0000000000000..bd1c52d82912e
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultListResult.cs
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// List of vaults.
+ public partial class VaultListResult
+ {
+ /// Initializes a new instance of VaultListResult.
+ internal VaultListResult()
+ {
+ }
+
+ /// Initializes a new instance of VaultListResult.
+ /// The list of vaults.
+ /// The URL to get the next set of vaults.
+ internal VaultListResult(IReadOnlyList value, string nextLink)
+ {
+ Value = value;
+ NextLink = nextLink;
+ }
+
+ /// The list of vaults.
+ public IReadOnlyList Value { get; }
+ /// The URL to get the next set of vaults.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultPatchParameters.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultPatchParameters.Serialization.cs
new file mode 100644
index 0000000000000..a806c3b2be6f2
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultPatchParameters.Serialization.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class VaultPatchParameters : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Tags != null)
+ {
+ writer.WritePropertyName("tags");
+ writer.WriteStartObject();
+ foreach (var item in Tags)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteStringValue(item.Value);
+ }
+ writer.WriteEndObject();
+ }
+ if (Properties != null)
+ {
+ writer.WritePropertyName("properties");
+ writer.WriteObjectValue(Properties);
+ }
+ writer.WriteEndObject();
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultPatchParameters.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultPatchParameters.cs
new file mode 100644
index 0000000000000..74d707f69be3e
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultPatchParameters.cs
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Parameters for creating or updating a vault.
+ public partial class VaultPatchParameters
+ {
+ /// Initializes a new instance of VaultPatchParameters.
+ public VaultPatchParameters()
+ {
+ }
+
+ /// Initializes a new instance of VaultPatchParameters.
+ /// The tags that will be assigned to the key vault.
+ /// Properties of the vault.
+ internal VaultPatchParameters(IDictionary tags, VaultPatchProperties properties)
+ {
+ Tags = tags;
+ Properties = properties;
+ }
+
+ /// The tags that will be assigned to the key vault.
+ public IDictionary Tags { get; set; }
+ /// Properties of the vault.
+ public VaultPatchProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultPatchProperties.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultPatchProperties.Serialization.cs
new file mode 100644
index 0000000000000..3bb00db1a46e7
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultPatchProperties.Serialization.cs
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class VaultPatchProperties : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (TenantId != null)
+ {
+ writer.WritePropertyName("tenantId");
+ writer.WriteStringValue(TenantId.Value);
+ }
+ if (Sku != null)
+ {
+ writer.WritePropertyName("sku");
+ writer.WriteObjectValue(Sku);
+ }
+ if (AccessPolicies != null)
+ {
+ writer.WritePropertyName("accessPolicies");
+ writer.WriteStartArray();
+ foreach (var item in AccessPolicies)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (EnabledForDeployment != null)
+ {
+ writer.WritePropertyName("enabledForDeployment");
+ writer.WriteBooleanValue(EnabledForDeployment.Value);
+ }
+ if (EnabledForDiskEncryption != null)
+ {
+ writer.WritePropertyName("enabledForDiskEncryption");
+ writer.WriteBooleanValue(EnabledForDiskEncryption.Value);
+ }
+ if (EnabledForTemplateDeployment != null)
+ {
+ writer.WritePropertyName("enabledForTemplateDeployment");
+ writer.WriteBooleanValue(EnabledForTemplateDeployment.Value);
+ }
+ if (EnableSoftDelete != null)
+ {
+ writer.WritePropertyName("enableSoftDelete");
+ writer.WriteBooleanValue(EnableSoftDelete.Value);
+ }
+ if (CreateMode != null)
+ {
+ writer.WritePropertyName("createMode");
+ writer.WriteStringValue(CreateMode.Value.ToSerialString());
+ }
+ if (EnablePurgeProtection != null)
+ {
+ writer.WritePropertyName("enablePurgeProtection");
+ writer.WriteBooleanValue(EnablePurgeProtection.Value);
+ }
+ if (NetworkAcls != null)
+ {
+ writer.WritePropertyName("networkAcls");
+ writer.WriteObjectValue(NetworkAcls);
+ }
+ writer.WriteEndObject();
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultPatchProperties.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultPatchProperties.cs
new file mode 100644
index 0000000000000..ab7b78a2e1dbe
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultPatchProperties.cs
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Properties of the vault.
+ public partial class VaultPatchProperties
+ {
+ /// Initializes a new instance of VaultPatchProperties.
+ public VaultPatchProperties()
+ {
+ }
+
+ /// Initializes a new instance of VaultPatchProperties.
+ /// The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
+ /// SKU details.
+ /// An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID.
+ /// Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault.
+ /// Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys.
+ /// Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault.
+ /// Property to specify whether the 'soft delete' functionality is enabled for this key vault. If omitted, assume true as default value. Once set to true, cannot be reverted to false.
+ /// The vault's create mode to indicate whether the vault need to be recovered or not.
+ /// Property specifying whether protection against purge is enabled for this vault. Setting this property to true activates protection against purge for this vault and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this functionality is irreversible - that is, the property does not accept false as its value.
+ /// A collection of rules governing the accessibility of the vault from specific network locations.
+ internal VaultPatchProperties(Guid? tenantId, Sku sku, IList accessPolicies, bool? enabledForDeployment, bool? enabledForDiskEncryption, bool? enabledForTemplateDeployment, bool? enableSoftDelete, CreateMode? createMode, bool? enablePurgeProtection, NetworkRuleSet networkAcls)
+ {
+ TenantId = tenantId;
+ Sku = sku;
+ AccessPolicies = accessPolicies;
+ EnabledForDeployment = enabledForDeployment;
+ EnabledForDiskEncryption = enabledForDiskEncryption;
+ EnabledForTemplateDeployment = enabledForTemplateDeployment;
+ EnableSoftDelete = enableSoftDelete;
+ CreateMode = createMode;
+ EnablePurgeProtection = enablePurgeProtection;
+ NetworkAcls = networkAcls;
+ }
+
+ /// The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
+ public Guid? TenantId { get; set; }
+ /// SKU details.
+ public Sku Sku { get; set; }
+ /// An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID.
+ public IList AccessPolicies { get; set; }
+ /// Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault.
+ public bool? EnabledForDeployment { get; set; }
+ /// Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys.
+ public bool? EnabledForDiskEncryption { get; set; }
+ /// Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault.
+ public bool? EnabledForTemplateDeployment { get; set; }
+ /// Property to specify whether the 'soft delete' functionality is enabled for this key vault. If omitted, assume true as default value. Once set to true, cannot be reverted to false.
+ public bool? EnableSoftDelete { get; set; }
+ /// The vault's create mode to indicate whether the vault need to be recovered or not.
+ public CreateMode? CreateMode { get; set; }
+ /// Property specifying whether protection against purge is enabled for this vault. Setting this property to true activates protection against purge for this vault and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this functionality is irreversible - that is, the property does not accept false as its value.
+ public bool? EnablePurgeProtection { get; set; }
+ /// A collection of rules governing the accessibility of the vault from specific network locations.
+ public NetworkRuleSet NetworkAcls { get; set; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultProperties.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultProperties.Serialization.cs
new file mode 100644
index 0000000000000..e2489df919812
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultProperties.Serialization.cs
@@ -0,0 +1,231 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class VaultProperties : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("tenantId");
+ writer.WriteStringValue(TenantId);
+ writer.WritePropertyName("sku");
+ writer.WriteObjectValue(Sku);
+ if (AccessPolicies != null)
+ {
+ writer.WritePropertyName("accessPolicies");
+ writer.WriteStartArray();
+ foreach (var item in AccessPolicies)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (VaultUri != null)
+ {
+ writer.WritePropertyName("vaultUri");
+ writer.WriteStringValue(VaultUri);
+ }
+ if (EnabledForDeployment != null)
+ {
+ writer.WritePropertyName("enabledForDeployment");
+ writer.WriteBooleanValue(EnabledForDeployment.Value);
+ }
+ if (EnabledForDiskEncryption != null)
+ {
+ writer.WritePropertyName("enabledForDiskEncryption");
+ writer.WriteBooleanValue(EnabledForDiskEncryption.Value);
+ }
+ if (EnabledForTemplateDeployment != null)
+ {
+ writer.WritePropertyName("enabledForTemplateDeployment");
+ writer.WriteBooleanValue(EnabledForTemplateDeployment.Value);
+ }
+ if (EnableSoftDelete != null)
+ {
+ writer.WritePropertyName("enableSoftDelete");
+ writer.WriteBooleanValue(EnableSoftDelete.Value);
+ }
+ if (CreateMode != null)
+ {
+ writer.WritePropertyName("createMode");
+ writer.WriteStringValue(CreateMode.Value.ToSerialString());
+ }
+ if (EnablePurgeProtection != null)
+ {
+ writer.WritePropertyName("enablePurgeProtection");
+ writer.WriteBooleanValue(EnablePurgeProtection.Value);
+ }
+ if (NetworkAcls != null)
+ {
+ writer.WritePropertyName("networkAcls");
+ writer.WriteObjectValue(NetworkAcls);
+ }
+ if (PrivateEndpointConnections != null)
+ {
+ writer.WritePropertyName("privateEndpointConnections");
+ writer.WriteStartArray();
+ foreach (var item in PrivateEndpointConnections)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static VaultProperties DeserializeVaultProperties(JsonElement element)
+ {
+ Guid tenantId = default;
+ Sku sku = default;
+ IList accessPolicies = default;
+ string vaultUri = default;
+ bool? enabledForDeployment = default;
+ bool? enabledForDiskEncryption = default;
+ bool? enabledForTemplateDeployment = default;
+ bool? enableSoftDelete = default;
+ CreateMode? createMode = default;
+ bool? enablePurgeProtection = default;
+ NetworkRuleSet networkAcls = default;
+ IList privateEndpointConnections = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("tenantId"))
+ {
+ tenantId = property.Value.GetGuid();
+ continue;
+ }
+ if (property.NameEquals("sku"))
+ {
+ sku = Sku.DeserializeSku(property.Value);
+ continue;
+ }
+ if (property.NameEquals("accessPolicies"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ array.Add(AccessPolicyEntry.DeserializeAccessPolicyEntry(item));
+ }
+ }
+ accessPolicies = array;
+ continue;
+ }
+ if (property.NameEquals("vaultUri"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ vaultUri = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("enabledForDeployment"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ enabledForDeployment = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("enabledForDiskEncryption"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ enabledForDiskEncryption = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("enabledForTemplateDeployment"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ enabledForTemplateDeployment = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("enableSoftDelete"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ enableSoftDelete = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("createMode"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ createMode = property.Value.GetString().ToCreateMode();
+ continue;
+ }
+ if (property.NameEquals("enablePurgeProtection"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ enablePurgeProtection = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("networkAcls"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ networkAcls = NetworkRuleSet.DeserializeNetworkRuleSet(property.Value);
+ continue;
+ }
+ if (property.NameEquals("privateEndpointConnections"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ array.Add(PrivateEndpointConnectionItem.DeserializePrivateEndpointConnectionItem(item));
+ }
+ }
+ privateEndpointConnections = array;
+ continue;
+ }
+ }
+ return new VaultProperties(tenantId, sku, accessPolicies, vaultUri, enabledForDeployment, enabledForDiskEncryption, enabledForTemplateDeployment, enableSoftDelete, createMode, enablePurgeProtection, networkAcls, privateEndpointConnections);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultProperties.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultProperties.cs
new file mode 100644
index 0000000000000..6fd8f37ba7176
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VaultProperties.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// Properties of the vault.
+ public partial class VaultProperties
+ {
+ /// Initializes a new instance of VaultProperties.
+ /// The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
+ /// SKU details.
+ public VaultProperties(Guid tenantId, Sku sku)
+ {
+ if (sku == null)
+ {
+ throw new ArgumentNullException(nameof(sku));
+ }
+
+ TenantId = tenantId;
+ Sku = sku;
+ }
+
+ /// Initializes a new instance of VaultProperties.
+ /// The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
+ /// SKU details.
+ /// An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID. When `createMode` is set to `recover`, access policies are not required. Otherwise, access policies are required.
+ /// The URI of the vault for performing operations on keys and secrets.
+ /// Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault.
+ /// Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys.
+ /// Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault.
+ /// Property to specify whether the 'soft delete' functionality is enabled for this key vault. If omitted, assume true as default value. Once set to true, cannot be reverted to false.
+ /// The vault's create mode to indicate whether the vault need to be recovered or not.
+ /// Property specifying whether protection against purge is enabled for this vault. Setting this property to true activates protection against purge for this vault and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this functionality is irreversible - that is, the property does not accept false as its value.
+ /// Rules governing the accessibility of the key vault from specific network locations.
+ /// List of private endpoint connections associated with the key vault.
+ internal VaultProperties(Guid tenantId, Sku sku, IList accessPolicies, string vaultUri, bool? enabledForDeployment, bool? enabledForDiskEncryption, bool? enabledForTemplateDeployment, bool? enableSoftDelete, CreateMode? createMode, bool? enablePurgeProtection, NetworkRuleSet networkAcls, IList privateEndpointConnections)
+ {
+ TenantId = tenantId;
+ Sku = sku;
+ AccessPolicies = accessPolicies;
+ VaultUri = vaultUri;
+ EnabledForDeployment = enabledForDeployment;
+ EnabledForDiskEncryption = enabledForDiskEncryption;
+ EnabledForTemplateDeployment = enabledForTemplateDeployment;
+ EnableSoftDelete = enableSoftDelete;
+ CreateMode = createMode;
+ EnablePurgeProtection = enablePurgeProtection;
+ NetworkAcls = networkAcls;
+ PrivateEndpointConnections = privateEndpointConnections;
+ }
+
+ /// The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
+ public Guid TenantId { get; set; }
+ /// SKU details.
+ public Sku Sku { get; set; }
+ /// An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID. When `createMode` is set to `recover`, access policies are not required. Otherwise, access policies are required.
+ public IList AccessPolicies { get; set; }
+ /// The URI of the vault for performing operations on keys and secrets.
+ public string VaultUri { get; set; }
+ /// Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault.
+ public bool? EnabledForDeployment { get; set; }
+ /// Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys.
+ public bool? EnabledForDiskEncryption { get; set; }
+ /// Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault.
+ public bool? EnabledForTemplateDeployment { get; set; }
+ /// Property to specify whether the 'soft delete' functionality is enabled for this key vault. If omitted, assume true as default value. Once set to true, cannot be reverted to false.
+ public bool? EnableSoftDelete { get; set; }
+ /// The vault's create mode to indicate whether the vault need to be recovered or not.
+ public CreateMode? CreateMode { get; set; }
+ /// Property specifying whether protection against purge is enabled for this vault. Setting this property to true activates protection against purge for this vault and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this functionality is irreversible - that is, the property does not accept false as its value.
+ public bool? EnablePurgeProtection { get; set; }
+ /// Rules governing the accessibility of the key vault from specific network locations.
+ public NetworkRuleSet NetworkAcls { get; set; }
+ /// List of private endpoint connections associated with the key vault.
+ public IList PrivateEndpointConnections { get; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VirtualNetworkRule.Serialization.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VirtualNetworkRule.Serialization.cs
new file mode 100644
index 0000000000000..c8649c5123912
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VirtualNetworkRule.Serialization.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault.Models
+{
+ public partial class VirtualNetworkRule : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("id");
+ writer.WriteStringValue(Id);
+ writer.WriteEndObject();
+ }
+
+ internal static VirtualNetworkRule DeserializeVirtualNetworkRule(JsonElement element)
+ {
+ string id = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"))
+ {
+ id = property.Value.GetString();
+ continue;
+ }
+ }
+ return new VirtualNetworkRule(id);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VirtualNetworkRule.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VirtualNetworkRule.cs
new file mode 100644
index 0000000000000..9abcd593ba116
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/Models/VirtualNetworkRule.cs
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.Management.KeyVault.Models
+{
+ /// A rule governing the accessibility of a vault from a specific virtual network.
+ public partial class VirtualNetworkRule
+ {
+ /// Initializes a new instance of VirtualNetworkRule.
+ /// Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'.
+ public VirtualNetworkRule(string id)
+ {
+ if (id == null)
+ {
+ throw new ArgumentNullException(nameof(id));
+ }
+
+ Id = id;
+ }
+
+ /// Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'.
+ public string Id { get; set; }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/OperationsClient.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/OperationsClient.cs
new file mode 100644
index 0000000000000..958297e434a07
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/OperationsClient.cs
@@ -0,0 +1,114 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.Management.KeyVault.Models;
+
+namespace Azure.Management.KeyVault
+{
+ /// The Operations service client.
+ public partial class OperationsClient
+ {
+ private readonly ClientDiagnostics _clientDiagnostics;
+ private readonly HttpPipeline _pipeline;
+ internal OperationsRestClient RestClient { get; }
+ /// Initializes a new instance of OperationsClient for mocking.
+ protected OperationsClient()
+ {
+ }
+ /// Initializes a new instance of OperationsClient.
+ /// The handler for diagnostic messaging in the client.
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ /// server parameter.
+ /// Api Version.
+ internal OperationsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null, string apiVersion = "2019-09-01")
+ {
+ RestClient = new OperationsRestClient(clientDiagnostics, pipeline, endpoint, apiVersion);
+ _clientDiagnostics = clientDiagnostics;
+ _pipeline = pipeline;
+ }
+
+ /// Lists all of the available Key Vault Rest API operations.
+ /// The cancellation token to use.
+ public virtual AsyncPageable ListAsync(CancellationToken cancellationToken = default)
+ {
+ async Task> FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("OperationsClient.List");
+ scope.Start();
+ try
+ {
+ var response = await RestClient.ListAsync(cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("OperationsClient.List");
+ scope.Start();
+ try
+ {
+ var response = await RestClient.ListNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ /// Lists all of the available Key Vault Rest API operations.
+ /// The cancellation token to use.
+ public virtual Pageable List(CancellationToken cancellationToken = default)
+ {
+ Page FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("OperationsClient.List");
+ scope.Start();
+ try
+ {
+ var response = RestClient.List(cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("OperationsClient.List");
+ scope.Start();
+ try
+ {
+ var response = RestClient.ListNextPage(nextLink, cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/OperationsRestClient.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/OperationsRestClient.cs
new file mode 100644
index 0000000000000..040c71218dc32
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/OperationsRestClient.cs
@@ -0,0 +1,191 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.Management.KeyVault.Models;
+
+namespace Azure.Management.KeyVault
+{
+ internal partial class OperationsRestClient
+ {
+ private Uri endpoint;
+ private string apiVersion;
+ private ClientDiagnostics _clientDiagnostics;
+ private HttpPipeline _pipeline;
+
+ /// Initializes a new instance of OperationsRestClient.
+ /// The handler for diagnostic messaging in the client.
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ /// server parameter.
+ /// Api Version.
+ /// This occurs when one of the required arguments is null.
+ public OperationsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null, string apiVersion = "2019-09-01")
+ {
+ endpoint ??= new Uri("https://management.azure.com");
+ if (apiVersion == null)
+ {
+ throw new ArgumentNullException(nameof(apiVersion));
+ }
+
+ this.endpoint = endpoint;
+ this.apiVersion = apiVersion;
+ _clientDiagnostics = clientDiagnostics;
+ _pipeline = pipeline;
+ }
+
+ internal HttpMessage CreateListRequest()
+ {
+ var message = _pipeline.CreateMessage();
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(endpoint);
+ uri.AppendPath("/providers/Microsoft.KeyVault/operations", false);
+ uri.AppendQuery("api-version", apiVersion, true);
+ request.Uri = uri;
+ return message;
+ }
+
+ /// Lists all of the available Key Vault Rest API operations.
+ /// The cancellation token to use.
+ public async ValueTask> ListAsync(CancellationToken cancellationToken = default)
+ {
+ using var message = CreateListRequest();
+ await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ OperationListResult value = default;
+ using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ if (document.RootElement.ValueKind == JsonValueKind.Null)
+ {
+ value = null;
+ }
+ else
+ {
+ value = OperationListResult.DeserializeOperationListResult(document.RootElement);
+ }
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
+ }
+ }
+
+ /// Lists all of the available Key Vault Rest API operations.
+ /// The cancellation token to use.
+ public Response List(CancellationToken cancellationToken = default)
+ {
+ using var message = CreateListRequest();
+ _pipeline.Send(message, cancellationToken);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ OperationListResult value = default;
+ using var document = JsonDocument.Parse(message.Response.ContentStream);
+ if (document.RootElement.ValueKind == JsonValueKind.Null)
+ {
+ value = null;
+ }
+ else
+ {
+ value = OperationListResult.DeserializeOperationListResult(document.RootElement);
+ }
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw _clientDiagnostics.CreateRequestFailedException(message.Response);
+ }
+ }
+
+ internal HttpMessage CreateListNextPageRequest(string nextLink)
+ {
+ var message = _pipeline.CreateMessage();
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(endpoint);
+ uri.AppendRawNextLink(nextLink, false);
+ request.Uri = uri;
+ return message;
+ }
+
+ /// Lists all of the available Key Vault Rest API operations.
+ /// The URL to the next page of results.
+ /// The cancellation token to use.
+ public async ValueTask> ListNextPageAsync(string nextLink, CancellationToken cancellationToken = default)
+ {
+ if (nextLink == null)
+ {
+ throw new ArgumentNullException(nameof(nextLink));
+ }
+
+ using var message = CreateListNextPageRequest(nextLink);
+ await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ OperationListResult value = default;
+ using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ if (document.RootElement.ValueKind == JsonValueKind.Null)
+ {
+ value = null;
+ }
+ else
+ {
+ value = OperationListResult.DeserializeOperationListResult(document.RootElement);
+ }
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
+ }
+ }
+
+ /// Lists all of the available Key Vault Rest API operations.
+ /// The URL to the next page of results.
+ /// The cancellation token to use.
+ public Response ListNextPage(string nextLink, CancellationToken cancellationToken = default)
+ {
+ if (nextLink == null)
+ {
+ throw new ArgumentNullException(nameof(nextLink));
+ }
+
+ using var message = CreateListNextPageRequest(nextLink);
+ _pipeline.Send(message, cancellationToken);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ OperationListResult value = default;
+ using var document = JsonDocument.Parse(message.Response.ContentStream);
+ if (document.RootElement.ValueKind == JsonValueKind.Null)
+ {
+ value = null;
+ }
+ else
+ {
+ value = OperationListResult.DeserializeOperationListResult(document.RootElement);
+ }
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw _clientDiagnostics.CreateRequestFailedException(message.Response);
+ }
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateEndpointConnectionsClient.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateEndpointConnectionsClient.cs
new file mode 100644
index 0000000000000..c11251fa7e60f
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateEndpointConnectionsClient.cs
@@ -0,0 +1,190 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core.Pipeline;
+using Azure.Management.KeyVault.Models;
+
+namespace Azure.Management.KeyVault
+{
+ /// The PrivateEndpointConnections service client.
+ public partial class PrivateEndpointConnectionsClient
+ {
+ private readonly ClientDiagnostics _clientDiagnostics;
+ private readonly HttpPipeline _pipeline;
+ internal PrivateEndpointConnectionsRestClient RestClient { get; }
+ /// Initializes a new instance of PrivateEndpointConnectionsClient for mocking.
+ protected PrivateEndpointConnectionsClient()
+ {
+ }
+ /// Initializes a new instance of PrivateEndpointConnectionsClient.
+ /// The handler for diagnostic messaging in the client.
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+ /// server parameter.
+ /// Api Version.
+ internal PrivateEndpointConnectionsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2019-09-01")
+ {
+ RestClient = new PrivateEndpointConnectionsRestClient(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion);
+ _clientDiagnostics = clientDiagnostics;
+ _pipeline = pipeline;
+ }
+
+ /// Gets the specified private endpoint connection associated with the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// Name of the private endpoint connection associated with the key vault.
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsClient.Get");
+ scope.Start();
+ try
+ {
+ return await RestClient.GetAsync(resourceGroupName, vaultName, privateEndpointConnectionName, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Gets the specified private endpoint connection associated with the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// Name of the private endpoint connection associated with the key vault.
+ /// The cancellation token to use.
+ public virtual Response Get(string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsClient.Get");
+ scope.Start();
+ try
+ {
+ return RestClient.Get(resourceGroupName, vaultName, privateEndpointConnectionName, cancellationToken);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Updates the specified private endpoint connection associated with the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// Name of the private endpoint connection associated with the key vault.
+ /// The intended state of private endpoint connection.
+ /// The cancellation token to use.
+ public virtual async Task> PutAsync(string resourceGroupName, string vaultName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsClient.Put");
+ scope.Start();
+ try
+ {
+ return await RestClient.PutAsync(resourceGroupName, vaultName, privateEndpointConnectionName, properties, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Updates the specified private endpoint connection associated with the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// Name of the private endpoint connection associated with the key vault.
+ /// The intended state of private endpoint connection.
+ /// The cancellation token to use.
+ public virtual Response Put(string resourceGroupName, string vaultName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsClient.Put");
+ scope.Start();
+ try
+ {
+ return RestClient.Put(resourceGroupName, vaultName, privateEndpointConnectionName, properties, cancellationToken);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Deletes the specified private endpoint connection associated with the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// Name of the private endpoint connection associated with the key vault.
+ /// The cancellation token to use.
+ public virtual async ValueTask StartDeleteAsync(string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (vaultName == null)
+ {
+ throw new ArgumentNullException(nameof(vaultName));
+ }
+ if (privateEndpointConnectionName == null)
+ {
+ throw new ArgumentNullException(nameof(privateEndpointConnectionName));
+ }
+
+ using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsClient.StartDelete");
+ scope.Start();
+ try
+ {
+ var originalResponse = await RestClient.DeleteAsync(resourceGroupName, vaultName, privateEndpointConnectionName, cancellationToken).ConfigureAwait(false);
+ return new PrivateEndpointConnectionsDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resourceGroupName, vaultName, privateEndpointConnectionName).Request, originalResponse);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Deletes the specified private endpoint connection associated with the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// Name of the private endpoint connection associated with the key vault.
+ /// The cancellation token to use.
+ public virtual PrivateEndpointConnectionsDeleteOperation StartDelete(string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (vaultName == null)
+ {
+ throw new ArgumentNullException(nameof(vaultName));
+ }
+ if (privateEndpointConnectionName == null)
+ {
+ throw new ArgumentNullException(nameof(privateEndpointConnectionName));
+ }
+
+ using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsClient.StartDelete");
+ scope.Start();
+ try
+ {
+ var originalResponse = RestClient.Delete(resourceGroupName, vaultName, privateEndpointConnectionName, cancellationToken);
+ return new PrivateEndpointConnectionsDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resourceGroupName, vaultName, privateEndpointConnectionName).Request, originalResponse);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateEndpointConnectionsDeleteOperation.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateEndpointConnectionsDeleteOperation.cs
new file mode 100644
index 0000000000000..997ff78ccc82a
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateEndpointConnectionsDeleteOperation.cs
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.Management.KeyVault.Models;
+
+namespace Azure.Management.KeyVault
+{
+ /// Deletes the specified private endpoint connection associated with the key vault.
+ public partial class PrivateEndpointConnectionsDeleteOperation : Operation, IOperationSource
+ {
+ private readonly ArmOperationHelpers _operation;
+ internal PrivateEndpointConnectionsDeleteOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response)
+ {
+ _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "PrivateEndpointConnectionsDeleteOperation");
+ }
+ ///
+ public override string Id => _operation.Id;
+
+ ///
+ public override PrivateEndpointConnection Value => _operation.Value;
+
+ ///
+ public override bool HasCompleted => _operation.HasCompleted;
+
+ ///
+ public override bool HasValue => _operation.HasValue;
+
+ ///
+ public override Response GetRawResponse() => _operation.GetRawResponse();
+
+ ///
+ public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken);
+
+ ///
+ public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken);
+
+ ///
+ public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken);
+
+ ///
+ public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken);
+
+ PrivateEndpointConnection IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ if (document.RootElement.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ else
+ {
+ return PrivateEndpointConnection.DeserializePrivateEndpointConnection(document.RootElement);
+ }
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ if (document.RootElement.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ else
+ {
+ return PrivateEndpointConnection.DeserializePrivateEndpointConnection(document.RootElement);
+ }
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateEndpointConnectionsPutHeaders.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateEndpointConnectionsPutHeaders.cs
new file mode 100644
index 0000000000000..2a39ecb382f34
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateEndpointConnectionsPutHeaders.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using Azure;
+using Azure.Core;
+
+namespace Azure.Management.KeyVault
+{
+ internal class PrivateEndpointConnectionsPutHeaders
+ {
+ private readonly Response _response;
+ public PrivateEndpointConnectionsPutHeaders(Response response)
+ {
+ _response = response;
+ }
+ public int? RetryAfter => _response.Headers.TryGetValue("Retry-After", out int? value) ? value : null;
+ public string AzureAsyncOperation => _response.Headers.TryGetValue("Azure-AsyncOperation", out string value) ? value : null;
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateEndpointConnectionsRestClient.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateEndpointConnectionsRestClient.cs
new file mode 100644
index 0000000000000..760582af3f369
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateEndpointConnectionsRestClient.cs
@@ -0,0 +1,365 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.Management.KeyVault.Models;
+
+namespace Azure.Management.KeyVault
+{
+ internal partial class PrivateEndpointConnectionsRestClient
+ {
+ private string subscriptionId;
+ private Uri endpoint;
+ private string apiVersion;
+ private ClientDiagnostics _clientDiagnostics;
+ private HttpPipeline _pipeline;
+
+ /// Initializes a new instance of PrivateEndpointConnectionsRestClient.
+ /// The handler for diagnostic messaging in the client.
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+ /// server parameter.
+ /// Api Version.
+ /// This occurs when one of the required arguments is null.
+ public PrivateEndpointConnectionsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2019-09-01")
+ {
+ if (subscriptionId == null)
+ {
+ throw new ArgumentNullException(nameof(subscriptionId));
+ }
+ endpoint ??= new Uri("https://management.azure.com");
+ if (apiVersion == null)
+ {
+ throw new ArgumentNullException(nameof(apiVersion));
+ }
+
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = apiVersion;
+ _clientDiagnostics = clientDiagnostics;
+ _pipeline = pipeline;
+ }
+
+ internal HttpMessage CreateGetRequest(string resourceGroupName, string vaultName, string privateEndpointConnectionName)
+ {
+ var message = _pipeline.CreateMessage();
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(endpoint);
+ uri.AppendPath("/subscriptions/", false);
+ uri.AppendPath(subscriptionId, true);
+ uri.AppendPath("/resourceGroups/", false);
+ uri.AppendPath(resourceGroupName, true);
+ uri.AppendPath("/providers/Microsoft.KeyVault/vaults/", false);
+ uri.AppendPath(vaultName, true);
+ uri.AppendPath("/privateEndpointConnections/", false);
+ uri.AppendPath(privateEndpointConnectionName, true);
+ uri.AppendQuery("api-version", apiVersion, true);
+ request.Uri = uri;
+ return message;
+ }
+
+ /// Gets the specified private endpoint connection associated with the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// Name of the private endpoint connection associated with the key vault.
+ /// The cancellation token to use.
+ public async ValueTask> GetAsync(string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (vaultName == null)
+ {
+ throw new ArgumentNullException(nameof(vaultName));
+ }
+ if (privateEndpointConnectionName == null)
+ {
+ throw new ArgumentNullException(nameof(privateEndpointConnectionName));
+ }
+
+ using var message = CreateGetRequest(resourceGroupName, vaultName, privateEndpointConnectionName);
+ await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ PrivateEndpointConnection value = default;
+ using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ if (document.RootElement.ValueKind == JsonValueKind.Null)
+ {
+ value = null;
+ }
+ else
+ {
+ value = PrivateEndpointConnection.DeserializePrivateEndpointConnection(document.RootElement);
+ }
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
+ }
+ }
+
+ /// Gets the specified private endpoint connection associated with the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// Name of the private endpoint connection associated with the key vault.
+ /// The cancellation token to use.
+ public Response Get(string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (vaultName == null)
+ {
+ throw new ArgumentNullException(nameof(vaultName));
+ }
+ if (privateEndpointConnectionName == null)
+ {
+ throw new ArgumentNullException(nameof(privateEndpointConnectionName));
+ }
+
+ using var message = CreateGetRequest(resourceGroupName, vaultName, privateEndpointConnectionName);
+ _pipeline.Send(message, cancellationToken);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ PrivateEndpointConnection value = default;
+ using var document = JsonDocument.Parse(message.Response.ContentStream);
+ if (document.RootElement.ValueKind == JsonValueKind.Null)
+ {
+ value = null;
+ }
+ else
+ {
+ value = PrivateEndpointConnection.DeserializePrivateEndpointConnection(document.RootElement);
+ }
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw _clientDiagnostics.CreateRequestFailedException(message.Response);
+ }
+ }
+
+ internal HttpMessage CreatePutRequest(string resourceGroupName, string vaultName, string privateEndpointConnectionName, PrivateEndpointConnection properties)
+ {
+ var message = _pipeline.CreateMessage();
+ var request = message.Request;
+ request.Method = RequestMethod.Put;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(endpoint);
+ uri.AppendPath("/subscriptions/", false);
+ uri.AppendPath(subscriptionId, true);
+ uri.AppendPath("/resourceGroups/", false);
+ uri.AppendPath(resourceGroupName, true);
+ uri.AppendPath("/providers/Microsoft.KeyVault/vaults/", false);
+ uri.AppendPath(vaultName, true);
+ uri.AppendPath("/privateEndpointConnections/", false);
+ uri.AppendPath(privateEndpointConnectionName, true);
+ uri.AppendQuery("api-version", apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Content-Type", "application/json");
+ using var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(properties);
+ request.Content = content;
+ return message;
+ }
+
+ /// Updates the specified private endpoint connection associated with the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// Name of the private endpoint connection associated with the key vault.
+ /// The intended state of private endpoint connection.
+ /// The cancellation token to use.
+ public async ValueTask> PutAsync(string resourceGroupName, string vaultName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (vaultName == null)
+ {
+ throw new ArgumentNullException(nameof(vaultName));
+ }
+ if (privateEndpointConnectionName == null)
+ {
+ throw new ArgumentNullException(nameof(privateEndpointConnectionName));
+ }
+ if (properties == null)
+ {
+ throw new ArgumentNullException(nameof(properties));
+ }
+
+ using var message = CreatePutRequest(resourceGroupName, vaultName, privateEndpointConnectionName, properties);
+ await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
+ var headers = new PrivateEndpointConnectionsPutHeaders(message.Response);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ PrivateEndpointConnection value = default;
+ using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ if (document.RootElement.ValueKind == JsonValueKind.Null)
+ {
+ value = null;
+ }
+ else
+ {
+ value = PrivateEndpointConnection.DeserializePrivateEndpointConnection(document.RootElement);
+ }
+ return ResponseWithHeaders.FromValue(value, headers, message.Response);
+ }
+ default:
+ throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
+ }
+ }
+
+ /// Updates the specified private endpoint connection associated with the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// Name of the private endpoint connection associated with the key vault.
+ /// The intended state of private endpoint connection.
+ /// The cancellation token to use.
+ public ResponseWithHeaders Put(string resourceGroupName, string vaultName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (vaultName == null)
+ {
+ throw new ArgumentNullException(nameof(vaultName));
+ }
+ if (privateEndpointConnectionName == null)
+ {
+ throw new ArgumentNullException(nameof(privateEndpointConnectionName));
+ }
+ if (properties == null)
+ {
+ throw new ArgumentNullException(nameof(properties));
+ }
+
+ using var message = CreatePutRequest(resourceGroupName, vaultName, privateEndpointConnectionName, properties);
+ _pipeline.Send(message, cancellationToken);
+ var headers = new PrivateEndpointConnectionsPutHeaders(message.Response);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ PrivateEndpointConnection value = default;
+ using var document = JsonDocument.Parse(message.Response.ContentStream);
+ if (document.RootElement.ValueKind == JsonValueKind.Null)
+ {
+ value = null;
+ }
+ else
+ {
+ value = PrivateEndpointConnection.DeserializePrivateEndpointConnection(document.RootElement);
+ }
+ return ResponseWithHeaders.FromValue(value, headers, message.Response);
+ }
+ default:
+ throw _clientDiagnostics.CreateRequestFailedException(message.Response);
+ }
+ }
+
+ internal HttpMessage CreateDeleteRequest(string resourceGroupName, string vaultName, string privateEndpointConnectionName)
+ {
+ var message = _pipeline.CreateMessage();
+ var request = message.Request;
+ request.Method = RequestMethod.Delete;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(endpoint);
+ uri.AppendPath("/subscriptions/", false);
+ uri.AppendPath(subscriptionId, true);
+ uri.AppendPath("/resourceGroups/", false);
+ uri.AppendPath(resourceGroupName, true);
+ uri.AppendPath("/providers/Microsoft.KeyVault/vaults/", false);
+ uri.AppendPath(vaultName, true);
+ uri.AppendPath("/privateEndpointConnections/", false);
+ uri.AppendPath(privateEndpointConnectionName, true);
+ uri.AppendQuery("api-version", apiVersion, true);
+ request.Uri = uri;
+ return message;
+ }
+
+ /// Deletes the specified private endpoint connection associated with the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// Name of the private endpoint connection associated with the key vault.
+ /// The cancellation token to use.
+ public async ValueTask DeleteAsync(string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (vaultName == null)
+ {
+ throw new ArgumentNullException(nameof(vaultName));
+ }
+ if (privateEndpointConnectionName == null)
+ {
+ throw new ArgumentNullException(nameof(privateEndpointConnectionName));
+ }
+
+ using var message = CreateDeleteRequest(resourceGroupName, vaultName, privateEndpointConnectionName);
+ await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
+ switch (message.Response.Status)
+ {
+ case 202:
+ case 200:
+ return message.Response;
+ default:
+ throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
+ }
+ }
+
+ /// Deletes the specified private endpoint connection associated with the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// Name of the private endpoint connection associated with the key vault.
+ /// The cancellation token to use.
+ public Response Delete(string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (vaultName == null)
+ {
+ throw new ArgumentNullException(nameof(vaultName));
+ }
+ if (privateEndpointConnectionName == null)
+ {
+ throw new ArgumentNullException(nameof(privateEndpointConnectionName));
+ }
+
+ using var message = CreateDeleteRequest(resourceGroupName, vaultName, privateEndpointConnectionName);
+ _pipeline.Send(message, cancellationToken);
+ switch (message.Response.Status)
+ {
+ case 202:
+ case 200:
+ return message.Response;
+ default:
+ throw _clientDiagnostics.CreateRequestFailedException(message.Response);
+ }
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateLinkResourcesClient.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateLinkResourcesClient.cs
new file mode 100644
index 0000000000000..493bff51bff23
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateLinkResourcesClient.cs
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core.Pipeline;
+using Azure.Management.KeyVault.Models;
+
+namespace Azure.Management.KeyVault
+{
+ /// The PrivateLinkResources service client.
+ public partial class PrivateLinkResourcesClient
+ {
+ private readonly ClientDiagnostics _clientDiagnostics;
+ private readonly HttpPipeline _pipeline;
+ internal PrivateLinkResourcesRestClient RestClient { get; }
+ /// Initializes a new instance of PrivateLinkResourcesClient for mocking.
+ protected PrivateLinkResourcesClient()
+ {
+ }
+ /// Initializes a new instance of PrivateLinkResourcesClient.
+ /// The handler for diagnostic messaging in the client.
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+ /// server parameter.
+ /// Api Version.
+ internal PrivateLinkResourcesClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2019-09-01")
+ {
+ RestClient = new PrivateLinkResourcesRestClient(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion);
+ _clientDiagnostics = clientDiagnostics;
+ _pipeline = pipeline;
+ }
+
+ /// Gets the private link resources supported for the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// The cancellation token to use.
+ public virtual async Task> ListByVaultAsync(string resourceGroupName, string vaultName, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("PrivateLinkResourcesClient.ListByVault");
+ scope.Start();
+ try
+ {
+ return await RestClient.ListByVaultAsync(resourceGroupName, vaultName, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Gets the private link resources supported for the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// The cancellation token to use.
+ public virtual Response ListByVault(string resourceGroupName, string vaultName, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("PrivateLinkResourcesClient.ListByVault");
+ scope.Start();
+ try
+ {
+ return RestClient.ListByVault(resourceGroupName, vaultName, cancellationToken);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateLinkResourcesRestClient.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateLinkResourcesRestClient.cs
new file mode 100644
index 0000000000000..46ee0d3f0ce63
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/PrivateLinkResourcesRestClient.cs
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.Management.KeyVault.Models;
+
+namespace Azure.Management.KeyVault
+{
+ internal partial class PrivateLinkResourcesRestClient
+ {
+ private string subscriptionId;
+ private Uri endpoint;
+ private string apiVersion;
+ private ClientDiagnostics _clientDiagnostics;
+ private HttpPipeline _pipeline;
+
+ /// Initializes a new instance of PrivateLinkResourcesRestClient.
+ /// The handler for diagnostic messaging in the client.
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+ /// server parameter.
+ /// Api Version.
+ /// This occurs when one of the required arguments is null.
+ public PrivateLinkResourcesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2019-09-01")
+ {
+ if (subscriptionId == null)
+ {
+ throw new ArgumentNullException(nameof(subscriptionId));
+ }
+ endpoint ??= new Uri("https://management.azure.com");
+ if (apiVersion == null)
+ {
+ throw new ArgumentNullException(nameof(apiVersion));
+ }
+
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = apiVersion;
+ _clientDiagnostics = clientDiagnostics;
+ _pipeline = pipeline;
+ }
+
+ internal HttpMessage CreateListByVaultRequest(string resourceGroupName, string vaultName)
+ {
+ var message = _pipeline.CreateMessage();
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(endpoint);
+ uri.AppendPath("/subscriptions/", false);
+ uri.AppendPath(subscriptionId, true);
+ uri.AppendPath("/resourceGroups/", false);
+ uri.AppendPath(resourceGroupName, true);
+ uri.AppendPath("/providers/Microsoft.KeyVault/vaults/", false);
+ uri.AppendPath(vaultName, true);
+ uri.AppendPath("/privateLinkResources", false);
+ uri.AppendQuery("api-version", apiVersion, true);
+ request.Uri = uri;
+ return message;
+ }
+
+ /// Gets the private link resources supported for the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// The cancellation token to use.
+ public async ValueTask> ListByVaultAsync(string resourceGroupName, string vaultName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (vaultName == null)
+ {
+ throw new ArgumentNullException(nameof(vaultName));
+ }
+
+ using var message = CreateListByVaultRequest(resourceGroupName, vaultName);
+ await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ PrivateLinkResourceListResult value = default;
+ using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ if (document.RootElement.ValueKind == JsonValueKind.Null)
+ {
+ value = null;
+ }
+ else
+ {
+ value = PrivateLinkResourceListResult.DeserializePrivateLinkResourceListResult(document.RootElement);
+ }
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
+ }
+ }
+
+ /// Gets the private link resources supported for the key vault.
+ /// Name of the resource group that contains the key vault.
+ /// The name of the key vault.
+ /// The cancellation token to use.
+ public Response ListByVault(string resourceGroupName, string vaultName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (vaultName == null)
+ {
+ throw new ArgumentNullException(nameof(vaultName));
+ }
+
+ using var message = CreateListByVaultRequest(resourceGroupName, vaultName);
+ _pipeline.Send(message, cancellationToken);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ PrivateLinkResourceListResult value = default;
+ using var document = JsonDocument.Parse(message.Response.ContentStream);
+ if (document.RootElement.ValueKind == JsonValueKind.Null)
+ {
+ value = null;
+ }
+ else
+ {
+ value = PrivateLinkResourceListResult.DeserializePrivateLinkResourceListResult(document.RootElement);
+ }
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw _clientDiagnostics.CreateRequestFailedException(message.Response);
+ }
+ }
+ }
+}
diff --git a/sdk/keyvault/Azure.Management.KeyVault/src/Generated/VaultsClient.cs b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/VaultsClient.cs
new file mode 100644
index 0000000000000..9404ea6c429a1
--- /dev/null
+++ b/sdk/keyvault/Azure.Management.KeyVault/src/Generated/VaultsClient.cs
@@ -0,0 +1,713 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.Management.KeyVault.Models;
+
+namespace Azure.Management.KeyVault
+{
+ /// The Vaults service client.
+ public partial class VaultsClient
+ {
+ private readonly ClientDiagnostics _clientDiagnostics;
+ private readonly HttpPipeline _pipeline;
+ internal VaultsRestClient RestClient { get; }
+ /// Initializes a new instance of VaultsClient for mocking.
+ protected VaultsClient()
+ {
+ }
+ /// Initializes a new instance of VaultsClient.
+ /// The handler for diagnostic messaging in the client.
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+ /// server parameter.
+ /// Api Version.
+ internal VaultsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2019-09-01")
+ {
+ RestClient = new VaultsRestClient(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion);
+ _clientDiagnostics = clientDiagnostics;
+ _pipeline = pipeline;
+ }
+
+ /// Update a key vault in the specified subscription.
+ /// The name of the Resource Group to which the server belongs.
+ /// Name of the vault.
+ /// Parameters to patch the vault.
+ /// The cancellation token to use.
+ public virtual async Task> UpdateAsync(string resourceGroupName, string vaultName, VaultPatchParameters parameters, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.Update");
+ scope.Start();
+ try
+ {
+ return await RestClient.UpdateAsync(resourceGroupName, vaultName, parameters, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Update a key vault in the specified subscription.
+ /// The name of the Resource Group to which the server belongs.
+ /// Name of the vault.
+ /// Parameters to patch the vault.
+ /// The cancellation token to use.
+ public virtual Response Update(string resourceGroupName, string vaultName, VaultPatchParameters parameters, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.Update");
+ scope.Start();
+ try
+ {
+ return RestClient.Update(resourceGroupName, vaultName, parameters, cancellationToken);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Deletes the specified Azure key vault.
+ /// The name of the Resource Group to which the vault belongs.
+ /// The name of the vault to delete.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(string resourceGroupName, string vaultName, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.Delete");
+ scope.Start();
+ try
+ {
+ return await RestClient.DeleteAsync(resourceGroupName, vaultName, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Deletes the specified Azure key vault.
+ /// The name of the Resource Group to which the vault belongs.
+ /// The name of the vault to delete.
+ /// The cancellation token to use.
+ public virtual Response Delete(string resourceGroupName, string vaultName, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.Delete");
+ scope.Start();
+ try
+ {
+ return RestClient.Delete(resourceGroupName, vaultName, cancellationToken);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Gets the specified Azure key vault.
+ /// The name of the Resource Group to which the vault belongs.
+ /// The name of the vault.
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(string resourceGroupName, string vaultName, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.Get");
+ scope.Start();
+ try
+ {
+ return await RestClient.GetAsync(resourceGroupName, vaultName, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Gets the specified Azure key vault.
+ /// The name of the Resource Group to which the vault belongs.
+ /// The name of the vault.
+ /// The cancellation token to use.
+ public virtual Response Get(string resourceGroupName, string vaultName, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.Get");
+ scope.Start();
+ try
+ {
+ return RestClient.Get(resourceGroupName, vaultName, cancellationToken);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Update access policies in a key vault in the specified subscription.
+ /// The name of the Resource Group to which the vault belongs.
+ /// Name of the vault.
+ /// Name of the operation.
+ /// Access policy to merge into the vault.
+ /// The cancellation token to use.
+ public virtual async Task> UpdateAccessPolicyAsync(string resourceGroupName, string vaultName, AccessPolicyUpdateKind operationKind, VaultAccessPolicyParameters parameters, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.UpdateAccessPolicy");
+ scope.Start();
+ try
+ {
+ return await RestClient.UpdateAccessPolicyAsync(resourceGroupName, vaultName, operationKind, parameters, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Update access policies in a key vault in the specified subscription.
+ /// The name of the Resource Group to which the vault belongs.
+ /// Name of the vault.
+ /// Name of the operation.
+ /// Access policy to merge into the vault.
+ /// The cancellation token to use.
+ public virtual Response UpdateAccessPolicy(string resourceGroupName, string vaultName, AccessPolicyUpdateKind operationKind, VaultAccessPolicyParameters parameters, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.UpdateAccessPolicy");
+ scope.Start();
+ try
+ {
+ return RestClient.UpdateAccessPolicy(resourceGroupName, vaultName, operationKind, parameters, cancellationToken);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Gets the deleted Azure key vault.
+ /// The name of the vault.
+ /// The location of the deleted vault.
+ /// The cancellation token to use.
+ public virtual async Task> GetDeletedAsync(string vaultName, string location, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.GetDeleted");
+ scope.Start();
+ try
+ {
+ return await RestClient.GetDeletedAsync(vaultName, location, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Gets the deleted Azure key vault.
+ /// The name of the vault.
+ /// The location of the deleted vault.
+ /// The cancellation token to use.
+ public virtual Response GetDeleted(string vaultName, string location, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.GetDeleted");
+ scope.Start();
+ try
+ {
+ return RestClient.GetDeleted(vaultName, location, cancellationToken);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Checks that the vault name is valid and is not already in use.
+ /// The name of the vault.
+ /// The cancellation token to use.
+ public virtual async Task> CheckNameAvailabilityAsync(VaultCheckNameAvailabilityParameters vaultName, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.CheckNameAvailability");
+ scope.Start();
+ try
+ {
+ return await RestClient.CheckNameAvailabilityAsync(vaultName, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Checks that the vault name is valid and is not already in use.
+ /// The name of the vault.
+ /// The cancellation token to use.
+ public virtual Response CheckNameAvailability(VaultCheckNameAvailabilityParameters vaultName, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.CheckNameAvailability");
+ scope.Start();
+ try
+ {
+ return RestClient.CheckNameAvailability(vaultName, cancellationToken);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// The List operation gets information about the vaults associated with the subscription and within the specified resource group.
+ /// The name of the Resource Group to which the vault belongs.
+ /// Maximum number of results to return.
+ /// The cancellation token to use.
+ public virtual AsyncPageable ListByResourceGroupAsync(string resourceGroupName, int? top = null, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+
+ async Task> FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.ListByResourceGroup");
+ scope.Start();
+ try
+ {
+ var response = await RestClient.ListByResourceGroupAsync(resourceGroupName, top, cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.ListByResourceGroup");
+ scope.Start();
+ try
+ {
+ var response = await RestClient.ListByResourceGroupNextPageAsync(nextLink, resourceGroupName, top, cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ /// The List operation gets information about the vaults associated with the subscription and within the specified resource group.
+ /// The name of the Resource Group to which the vault belongs.
+ /// Maximum number of results to return.
+ /// The cancellation token to use.
+ public virtual Pageable ListByResourceGroup(string resourceGroupName, int? top = null, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+
+ Page FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.ListByResourceGroup");
+ scope.Start();
+ try
+ {
+ var response = RestClient.ListByResourceGroup(resourceGroupName, top, cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.ListByResourceGroup");
+ scope.Start();
+ try
+ {
+ var response = RestClient.ListByResourceGroupNextPage(nextLink, resourceGroupName, top, cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ /// The List operation gets information about the vaults associated with the subscription.
+ /// Maximum number of results to return.
+ /// The cancellation token to use.
+ public virtual AsyncPageable ListBySubscriptionAsync(int? top = null, CancellationToken cancellationToken = default)
+ {
+ async Task> FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.ListBySubscription");
+ scope.Start();
+ try
+ {
+ var response = await RestClient.ListBySubscriptionAsync(top, cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.ListBySubscription");
+ scope.Start();
+ try
+ {
+ var response = await RestClient.ListBySubscriptionNextPageAsync(nextLink, top, cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ /// The List operation gets information about the vaults associated with the subscription.
+ /// Maximum number of results to return.
+ /// The cancellation token to use.
+ public virtual Pageable ListBySubscription(int? top = null, CancellationToken cancellationToken = default)
+ {
+ Page FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.ListBySubscription");
+ scope.Start();
+ try
+ {
+ var response = RestClient.ListBySubscription(top, cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("VaultsClient.ListBySubscription");
+ scope.Start();
+ try
+ {
+ var response = RestClient.ListBySubscriptionNextPage(nextLink, top, cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ ///