diff --git a/.vscode/cspell.json b/.vscode/cspell.json
index 470cebeef2cf..7abf54695e50 100644
--- a/.vscode/cspell.json
+++ b/.vscode/cspell.json
@@ -74,6 +74,7 @@
"cpus",
"cref",
"Dapr",
+ "decompile",
"deduplication",
"deletesas",
"deserializable",
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/Azure.ResourceManager.Resources.Bicep.sln b/sdk/resources/Azure.ResourceManager.Resources.Bicep/Azure.ResourceManager.Resources.Bicep.sln
new file mode 100644
index 000000000000..fc77d7edcb48
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/Azure.ResourceManager.Resources.Bicep.sln
@@ -0,0 +1,65 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30309.148
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{C4398841-2364-4283-9193-6436A82922AA}") = "Azure.ResourceManager.Resources.Bicep", "src\Azure.ResourceManager.Resources.Bicep.csproj", "{67A00D95-333C-481C-8F00-C5E096E6AEB2}"
+EndProject
+Project("{C4398841-2364-4283-9193-6436A82922AA}") = "Azure.ResourceManager.Resources.Bicep.Tests", "tests\Azure.ResourceManager.Resources.Bicep.Tests.csproj", "{FFDAD11E-3374-405A-878A-853F23D8C501}"
+EndProject
+Project("{C4398841-2364-4283-9193-6436A82922AA}") = "Azure.ResourceManager.Resources.Bicep.Samples", "samples\Azure.ResourceManager.Resources.Bicep.Samples.csproj", "{597D41E8-3180-41D3-9B87-B16908E85E15}"
+EndProject
+Global
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {3E85CC71-2C11-4582-95B4-1363982FBC1E}
+ EndGlobalSection
+ 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
+ {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Debug|x64.Build.0 = Debug|Any CPU
+ {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Debug|x86.Build.0 = Debug|Any CPU
+ {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Release|x64.ActiveCfg = Release|Any CPU
+ {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Release|x64.Build.0 = Release|Any CPU
+ {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Release|x86.ActiveCfg = Release|Any CPU
+ {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Release|x86.Build.0 = Release|Any CPU
+ {FFDAD11E-3374-405A-878A-853F23D8C501}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FFDAD11E-3374-405A-878A-853F23D8C501}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FFDAD11E-3374-405A-878A-853F23D8C501}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {FFDAD11E-3374-405A-878A-853F23D8C501}.Debug|x64.Build.0 = Debug|Any CPU
+ {FFDAD11E-3374-405A-878A-853F23D8C501}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FFDAD11E-3374-405A-878A-853F23D8C501}.Debug|x86.Build.0 = Debug|Any CPU
+ {FFDAD11E-3374-405A-878A-853F23D8C501}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FFDAD11E-3374-405A-878A-853F23D8C501}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FFDAD11E-3374-405A-878A-853F23D8C501}.Release|x64.ActiveCfg = Release|Any CPU
+ {FFDAD11E-3374-405A-878A-853F23D8C501}.Release|x64.Build.0 = Release|Any CPU
+ {FFDAD11E-3374-405A-878A-853F23D8C501}.Release|x86.ActiveCfg = Release|Any CPU
+ {FFDAD11E-3374-405A-878A-853F23D8C501}.Release|x86.Build.0 = Release|Any CPU
+ {597D41E8-3180-41D3-9B87-B16908E85E15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {597D41E8-3180-41D3-9B87-B16908E85E15}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {597D41E8-3180-41D3-9B87-B16908E85E15}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {597D41E8-3180-41D3-9B87-B16908E85E15}.Debug|x64.Build.0 = Debug|Any CPU
+ {597D41E8-3180-41D3-9B87-B16908E85E15}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {597D41E8-3180-41D3-9B87-B16908E85E15}.Debug|x86.Build.0 = Debug|Any CPU
+ {597D41E8-3180-41D3-9B87-B16908E85E15}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {597D41E8-3180-41D3-9B87-B16908E85E15}.Release|Any CPU.Build.0 = Release|Any CPU
+ {597D41E8-3180-41D3-9B87-B16908E85E15}.Release|x64.ActiveCfg = Release|Any CPU
+ {597D41E8-3180-41D3-9B87-B16908E85E15}.Release|x64.Build.0 = Release|Any CPU
+ {597D41E8-3180-41D3-9B87-B16908E85E15}.Release|x86.ActiveCfg = Release|Any CPU
+ {597D41E8-3180-41D3-9B87-B16908E85E15}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/CHANGELOG.md b/sdk/resources/Azure.ResourceManager.Resources.Bicep/CHANGELOG.md
new file mode 100644
index 000000000000..1a85987a15b9
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/CHANGELOG.md
@@ -0,0 +1,19 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+
+
+### Features Added
+
+This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities:
+
+ - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET.
+ - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing.
+ - HTTP pipeline with custom policies.
+ - Better error-handling.
+ - Support uniform telemetry across all languages.
+
+This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues).
+
+> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet).
\ No newline at end of file
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/Directory.Build.props b/sdk/resources/Azure.ResourceManager.Resources.Bicep/Directory.Build.props
new file mode 100644
index 000000000000..1a9611bd4924
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/README.md b/sdk/resources/Azure.ResourceManager.Resources.Bicep/README.md
new file mode 100644
index 000000000000..018b94a8403a
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/README.md
@@ -0,0 +1,80 @@
+# Microsoft Azure Bicep management client library for .NET
+
+**[Describe the service briefly first.]**
+
+This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities:
+
+ - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET.
+ - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing.
+ - HTTP pipeline with custom policies.
+ - Better error-handling.
+ - Support uniform telemetry across all languages.
+
+## Getting started
+
+### Install the package
+
+Install the Microsoft Azure Bicep management library for .NET with [NuGet](https://www.nuget.org/):
+
+```dotnetcli
+dotnet add package Azure.ResourceManager.Resources.Bicep --prerelease
+```
+
+### Prerequisites
+
+* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/).
+
+### Authenticate the Client
+
+To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md).
+
+## Key concepts
+
+Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html)
+
+## Documentation
+
+Documentation is available to help you learn how to use this package:
+
+- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md).
+- [API References](https://docs.microsoft.com/dotnet/api/?view=azure-dotnet).
+- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md).
+
+## Examples
+
+Code samples for using the management library for .NET can be found in the following locations
+- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples)
+
+## Troubleshooting
+
+- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues).
+- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags.
+
+## Next steps
+
+For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/).
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing
+guide][cg].
+
+This project welcomes contributions and suggestions. Most contributions
+require you to agree to a Contributor License Agreement (CLA) declaring
+that you have the right to, and actually do, grant us the rights to use
+your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine
+whether you need to provide a CLA and decorate the PR appropriately
+(for example, label, comment). Follow the instructions provided by the
+bot. You'll only need to do this action once across all repositories
+using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For
+more information, see the [Code of Conduct FAQ][coc_faq] or contact
+ with any other questions or comments.
+
+
+[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
\ No newline at end of file
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/api/Azure.ResourceManager.Resources.Bicep.net8.0.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/api/Azure.ResourceManager.Resources.Bicep.net8.0.cs
new file mode 100644
index 000000000000..270df432f129
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/api/Azure.ResourceManager.Resources.Bicep.net8.0.cs
@@ -0,0 +1,66 @@
+namespace Azure.ResourceManager.Resources.Bicep
+{
+ public partial class AzureResourceManagerResourcesBicepContext : System.ClientModel.Primitives.ModelReaderWriterContext
+ {
+ internal AzureResourceManagerResourcesBicepContext() { }
+ public static Azure.ResourceManager.Resources.Bicep.AzureResourceManagerResourcesBicepContext Default { get { throw null; } }
+ protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; }
+ }
+ public static partial class ResourcesBicepExtensions
+ {
+ public static Azure.Response BicepDecompileOperationGroup(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static System.Threading.Tasks.Task> BicepDecompileOperationGroupAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+}
+namespace Azure.ResourceManager.Resources.Bicep.Mocking
+{
+ public partial class MockableResourcesBicepSubscriptionResource : Azure.ResourceManager.ArmResource
+ {
+ protected MockableResourcesBicepSubscriptionResource() { }
+ public virtual Azure.Response BicepDecompileOperationGroup(Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> BicepDecompileOperationGroupAsync(Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+}
+namespace Azure.ResourceManager.Resources.Bicep.Models
+{
+ public static partial class ArmResourcesBicepModelFactory
+ {
+ public static Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationSuccessResponse DecompileOperationSuccessResponse(System.Collections.Generic.IEnumerable files = null, string entryPoint = null) { throw null; }
+ public static Azure.ResourceManager.Resources.Bicep.Models.FileDefinition FileDefinition(string path = null, string contents = null) { throw null; }
+ }
+ public partial class DecompileOperationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public DecompileOperationContent(string template) { }
+ public string Template { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class DecompileOperationSuccessResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal DecompileOperationSuccessResponse() { }
+ public string EntryPoint { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList Files { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationSuccessResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationSuccessResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class FileDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal FileDefinition() { }
+ public string Contents { get { throw null; } }
+ public string Path { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Resources.Bicep.Models.FileDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Resources.Bicep.Models.FileDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+}
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/api/Azure.ResourceManager.Resources.Bicep.netstandard2.0.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/api/Azure.ResourceManager.Resources.Bicep.netstandard2.0.cs
new file mode 100644
index 000000000000..270df432f129
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/api/Azure.ResourceManager.Resources.Bicep.netstandard2.0.cs
@@ -0,0 +1,66 @@
+namespace Azure.ResourceManager.Resources.Bicep
+{
+ public partial class AzureResourceManagerResourcesBicepContext : System.ClientModel.Primitives.ModelReaderWriterContext
+ {
+ internal AzureResourceManagerResourcesBicepContext() { }
+ public static Azure.ResourceManager.Resources.Bicep.AzureResourceManagerResourcesBicepContext Default { get { throw null; } }
+ protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; }
+ }
+ public static partial class ResourcesBicepExtensions
+ {
+ public static Azure.Response BicepDecompileOperationGroup(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static System.Threading.Tasks.Task> BicepDecompileOperationGroupAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+}
+namespace Azure.ResourceManager.Resources.Bicep.Mocking
+{
+ public partial class MockableResourcesBicepSubscriptionResource : Azure.ResourceManager.ArmResource
+ {
+ protected MockableResourcesBicepSubscriptionResource() { }
+ public virtual Azure.Response BicepDecompileOperationGroup(Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> BicepDecompileOperationGroupAsync(Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+}
+namespace Azure.ResourceManager.Resources.Bicep.Models
+{
+ public static partial class ArmResourcesBicepModelFactory
+ {
+ public static Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationSuccessResponse DecompileOperationSuccessResponse(System.Collections.Generic.IEnumerable files = null, string entryPoint = null) { throw null; }
+ public static Azure.ResourceManager.Resources.Bicep.Models.FileDefinition FileDefinition(string path = null, string contents = null) { throw null; }
+ }
+ public partial class DecompileOperationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public DecompileOperationContent(string template) { }
+ public string Template { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class DecompileOperationSuccessResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal DecompileOperationSuccessResponse() { }
+ public string EntryPoint { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList Files { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationSuccessResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationSuccessResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class FileDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal FileDefinition() { }
+ public string Contents { get { throw null; } }
+ public string Path { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Resources.Bicep.Models.FileDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Resources.Bicep.Models.FileDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+}
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/assets.json b/sdk/resources/Azure.ResourceManager.Resources.Bicep/assets.json
new file mode 100644
index 000000000000..609258334939
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/assets.json
@@ -0,0 +1,6 @@
+{
+ "AssetsRepo": "Azure/azure-sdk-assets",
+ "AssetsRepoPrefixPath": "net",
+ "TagPrefix": "net/bicep/Azure.ResourceManager.Resources.Bicep",
+ "Tag": "net/bicep/Azure.ResourceManager.Resources.Bicep_f735123855"
+}
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/samples/Azure.ResourceManager.Resources.Bicep.Samples.csproj b/sdk/resources/Azure.ResourceManager.Resources.Bicep/samples/Azure.ResourceManager.Resources.Bicep.Samples.csproj
new file mode 100644
index 000000000000..c53e3fa6782d
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/samples/Azure.ResourceManager.Resources.Bicep.Samples.csproj
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
new file mode 100644
index 000000000000..e08ff58feaf3
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Resources.Bicep.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Resources.Bicep.Samples
+{
+ public partial class Sample_SubscriptionResourceExtensions
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task BicepDecompileOperationGroup_DecompileAnARMJsonTemplateIntoABicepFile()
+ {
+ // Generated from example definition: 2023-11-01/DecompileBicep.json
+ // this example is just showing the usage of "DecompileOperationGroup_Bicep" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ DecompileOperationContent content = new DecompileOperationContent("{\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"metadata\": {\r\n \"_generator\": {\r\n \"name\": \"bicep\",\r\n \"version\": \"0.15.31.15270\",\r\n \"templateHash\": \"9249505596133208719\"\r\n }\r\n },\r\n \"parameters\": {\r\n \"storageAccountName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": []\r\n}");
+ DecompileOperationSuccessResponse result = await subscriptionResource.BicepDecompileOperationGroupAsync(content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Azure.ResourceManager.Resources.Bicep.csproj b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Azure.ResourceManager.Resources.Bicep.csproj
new file mode 100644
index 000000000000..8f6dd26a6a3e
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Azure.ResourceManager.Resources.Bicep.csproj
@@ -0,0 +1,8 @@
+
+
+ 1.0.0-beta.1
+ Azure.ResourceManager.Resources.Bicep
+ Azure Resource Manager client SDK for Azure resource provider Bicep.
+ azure;management;arm;resource manager;bicep
+
+
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/ArmResourcesBicepModelFactory.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/ArmResourcesBicepModelFactory.cs
new file mode 100644
index 000000000000..8515357ce921
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/ArmResourcesBicepModelFactory.cs
@@ -0,0 +1,37 @@
+// 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.ResourceManager.Resources.Bicep.Models
+{
+ /// Model factory for models.
+ public static partial class ArmResourcesBicepModelFactory
+ {
+ /// Initializes a new instance of .
+ /// An array of key-value pairs containing the entryPoint string as the key for the Bicep file decompiled from the ARM json template.
+ /// The file path to the main Bicep file generated from the decompiled ARM json template.
+ /// A new instance for mocking.
+ public static DecompileOperationSuccessResponse DecompileOperationSuccessResponse(IEnumerable files = null, string entryPoint = null)
+ {
+ files ??= new List();
+
+ return new DecompileOperationSuccessResponse(files?.ToList(), entryPoint, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The file path of the Bicep file.
+ /// The contents of the Bicep file.
+ /// A new instance for mocking.
+ public static FileDefinition FileDefinition(string path = null, string contents = null)
+ {
+ return new FileDefinition(path, contents, serializedAdditionalRawData: null);
+ }
+ }
+}
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Extensions/MockableResourcesBicepSubscriptionResource.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Extensions/MockableResourcesBicepSubscriptionResource.cs
new file mode 100644
index 000000000000..cd5e1b8fad32
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Extensions/MockableResourcesBicepSubscriptionResource.cs
@@ -0,0 +1,120 @@
+// 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.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Resources.Bicep.Models;
+
+namespace Azure.ResourceManager.Resources.Bicep.Mocking
+{
+ /// A class to add extension methods to SubscriptionResource.
+ public partial class MockableResourcesBicepSubscriptionResource : ArmResource
+ {
+ private ClientDiagnostics _decompileOperationGroupClientDiagnostics;
+ private DecompileOperationGroupRestOperations _decompileOperationGroupRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected MockableResourcesBicepSubscriptionResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal MockableResourcesBicepSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private ClientDiagnostics DecompileOperationGroupClientDiagnostics => _decompileOperationGroupClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Resources.Bicep", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ private DecompileOperationGroupRestOperations DecompileOperationGroupRestClient => _decompileOperationGroupRestClient ??= new DecompileOperationGroupRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ ///
+ /// Decompiles an ARM json template into a Bicep template
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Resources/decompileBicep
+ ///
+ /// -
+ /// Operation Id
+ /// DecompileOperationGroup_Bicep
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-11-01
+ ///
+ ///
+ ///
+ /// The request body.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> BicepDecompileOperationGroupAsync(DecompileOperationContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = DecompileOperationGroupClientDiagnostics.CreateScope("MockableResourcesBicepSubscriptionResource.BicepDecompileOperationGroup");
+ scope.Start();
+ try
+ {
+ var response = await DecompileOperationGroupRestClient.BicepAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Decompiles an ARM json template into a Bicep template
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Resources/decompileBicep
+ ///
+ /// -
+ /// Operation Id
+ /// DecompileOperationGroup_Bicep
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-11-01
+ ///
+ ///
+ ///
+ /// The request body.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response BicepDecompileOperationGroup(DecompileOperationContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = DecompileOperationGroupClientDiagnostics.CreateScope("MockableResourcesBicepSubscriptionResource.BicepDecompileOperationGroup");
+ scope.Start();
+ try
+ {
+ var response = DecompileOperationGroupRestClient.Bicep(Id.SubscriptionId, content, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Extensions/ResourcesBicepExtensions.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Extensions/ResourcesBicepExtensions.cs
new file mode 100644
index 000000000000..9e5c194b6079
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Extensions/ResourcesBicepExtensions.cs
@@ -0,0 +1,88 @@
+// 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.ResourceManager.Resources.Bicep.Mocking;
+using Azure.ResourceManager.Resources.Bicep.Models;
+
+namespace Azure.ResourceManager.Resources.Bicep
+{
+ /// A class to add extension methods to Azure.ResourceManager.Resources.Bicep.
+ public static partial class ResourcesBicepExtensions
+ {
+ private static MockableResourcesBicepSubscriptionResource GetMockableResourcesBicepSubscriptionResource(ArmResource resource)
+ {
+ return resource.GetCachedClient(client => new MockableResourcesBicepSubscriptionResource(client, resource.Id));
+ }
+
+ ///
+ /// Decompiles an ARM json template into a Bicep template
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Resources/decompileBicep
+ ///
+ /// -
+ /// Operation Id
+ /// DecompileOperationGroup_Bicep
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-11-01
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The request body.
+ /// The cancellation token to use.
+ /// or is null.
+ public static async Task> BicepDecompileOperationGroupAsync(this SubscriptionResource subscriptionResource, DecompileOperationContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return await GetMockableResourcesBicepSubscriptionResource(subscriptionResource).BicepDecompileOperationGroupAsync(content, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Decompiles an ARM json template into a Bicep template
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Resources/decompileBicep
+ ///
+ /// -
+ /// Operation Id
+ /// DecompileOperationGroup_Bicep
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-11-01
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The request body.
+ /// The cancellation token to use.
+ /// or is null.
+ public static Response BicepDecompileOperationGroup(this SubscriptionResource subscriptionResource, DecompileOperationContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableResourcesBicepSubscriptionResource(subscriptionResource).BicepDecompileOperationGroup(content, cancellationToken);
+ }
+ }
+}
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/Argument.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/Argument.cs
new file mode 100644
index 000000000000..3c71aa52958b
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/Argument.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.Resources.Bicep
+{
+ internal static class Argument
+ {
+ public static void AssertNotNull(T value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNull(T? value, string name)
+ where T : struct
+ {
+ if (!value.HasValue)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(IEnumerable value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value is ICollection collectionOfT && collectionOfT.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ if (value is ICollection collection && collection.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ using IEnumerator e = value.GetEnumerator();
+ if (!e.MoveNext())
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value.Length == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty string.", name);
+ }
+ }
+
+ public static void AssertNotNullOrWhiteSpace(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (string.IsNullOrWhiteSpace(value))
+ {
+ throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name);
+ }
+ }
+
+ public static void AssertNotDefault(ref T value, string name)
+ where T : struct, IEquatable
+ {
+ if (value.Equals(default))
+ {
+ throw new ArgumentException("Value cannot be empty.", name);
+ }
+ }
+
+ public static void AssertInRange(T value, T minimum, T maximum, string name)
+ where T : notnull, IComparable
+ {
+ if (minimum.CompareTo(value) > 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed.");
+ }
+ if (maximum.CompareTo(value) < 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed.");
+ }
+ }
+
+ public static void AssertEnumDefined(Type enumType, object value, string name)
+ {
+ if (!Enum.IsDefined(enumType, value))
+ {
+ throw new ArgumentException($"Value not defined for {enumType.FullName}.", name);
+ }
+ }
+
+ public static T CheckNotNull(T value, string name)
+ where T : class
+ {
+ AssertNotNull(value, name);
+ return value;
+ }
+
+ public static string CheckNotNullOrEmpty(string value, string name)
+ {
+ AssertNotNullOrEmpty(value, name);
+ return value;
+ }
+
+ public static void AssertNull(T value, string name, string message = null)
+ {
+ if (value != null)
+ {
+ throw new ArgumentException(message ?? "Value must be null.", name);
+ }
+ }
+ }
+}
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ChangeTrackingDictionary.cs
new file mode 100644
index 000000000000..87acdd6380e1
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ChangeTrackingDictionary.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.Resources.Bicep
+{
+ internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull
+ {
+ private IDictionary _innerDictionary;
+
+ public ChangeTrackingDictionary()
+ {
+ }
+
+ public ChangeTrackingDictionary(IDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary(dictionary);
+ }
+
+ public ChangeTrackingDictionary(IReadOnlyDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary();
+ foreach (var pair in dictionary)
+ {
+ _innerDictionary.Add(pair);
+ }
+ }
+
+ public bool IsUndefined => _innerDictionary == null;
+
+ public int Count => IsUndefined ? 0 : EnsureDictionary().Count;
+
+ public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly;
+
+ public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys;
+
+ public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values;
+
+ public TValue this[TKey key]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new KeyNotFoundException(nameof(key));
+ }
+ return EnsureDictionary()[key];
+ }
+ set
+ {
+ EnsureDictionary()[key] = value;
+ }
+ }
+
+ IEnumerable IReadOnlyDictionary.Keys => Keys;
+
+ IEnumerable IReadOnlyDictionary.Values => Values;
+
+ public IEnumerator> GetEnumerator()
+ {
+ if (IsUndefined)
+ {
+ IEnumerator> enumerateEmpty()
+ {
+ yield break;
+ }
+ return enumerateEmpty();
+ }
+ return EnsureDictionary().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public void Add(KeyValuePair item)
+ {
+ EnsureDictionary().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureDictionary().Clear();
+ }
+
+ public bool Contains(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Contains(item);
+ }
+
+ public void CopyTo(KeyValuePair[] array, int index)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureDictionary().CopyTo(array, index);
+ }
+
+ public bool Remove(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(item);
+ }
+
+ public void Add(TKey key, TValue value)
+ {
+ EnsureDictionary().Add(key, value);
+ }
+
+ public bool ContainsKey(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().ContainsKey(key);
+ }
+
+ public bool Remove(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(key);
+ }
+
+ public bool TryGetValue(TKey key, out TValue value)
+ {
+ if (IsUndefined)
+ {
+ value = default;
+ return false;
+ }
+ return EnsureDictionary().TryGetValue(key, out value);
+ }
+
+ public IDictionary EnsureDictionary()
+ {
+ return _innerDictionary ??= new Dictionary();
+ }
+ }
+}
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ChangeTrackingList.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ChangeTrackingList.cs
new file mode 100644
index 000000000000..cfab02b1951d
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ChangeTrackingList.cs
@@ -0,0 +1,153 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Azure.ResourceManager.Resources.Bicep
+{
+ internal class ChangeTrackingList : IList, IReadOnlyList
+ {
+ private IList _innerList;
+
+ public ChangeTrackingList()
+ {
+ }
+
+ public ChangeTrackingList(IList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList;
+ }
+ }
+
+ public ChangeTrackingList(IReadOnlyList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList.ToList();
+ }
+ }
+
+ public bool IsUndefined => _innerList == null;
+
+ public int Count => IsUndefined ? 0 : EnsureList().Count;
+
+ public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly;
+
+ public T this[int index]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ return EnsureList()[index];
+ }
+ set
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ EnsureList()[index] = value;
+ }
+ }
+
+ public void Reset()
+ {
+ _innerList = null;
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ if (IsUndefined)
+ {
+ IEnumerator enumerateEmpty()
+ {
+ yield break;
+ }
+ return enumerateEmpty();
+ }
+ return EnsureList().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public void Add(T item)
+ {
+ EnsureList().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureList().Clear();
+ }
+
+ public bool Contains(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Contains(item);
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureList().CopyTo(array, arrayIndex);
+ }
+
+ public bool Remove(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Remove(item);
+ }
+
+ public int IndexOf(T item)
+ {
+ if (IsUndefined)
+ {
+ return -1;
+ }
+ return EnsureList().IndexOf(item);
+ }
+
+ public void Insert(int index, T item)
+ {
+ EnsureList().Insert(index, item);
+ }
+
+ public void RemoveAt(int index)
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ EnsureList().RemoveAt(index);
+ }
+
+ public IList EnsureList()
+ {
+ return _innerList ??= new List();
+ }
+ }
+}
diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ModelSerializationExtensions.cs
new file mode 100644
index 000000000000..d4c6b841f345
--- /dev/null
+++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ModelSerializationExtensions.cs
@@ -0,0 +1,425 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text.Json;
+using System.Xml;
+using Azure.Core;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Resources.Bicep
+{
+ internal static class ModelSerializationExtensions
+ {
+ internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 };
+ internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W");
+ internal static readonly BinaryData SentinelValue = BinaryData.FromBytes("\"__EMPTY__\""u8.ToArray());
+ internal static readonly JsonSerializerOptions Options = new JsonSerializerOptions { Converters = { new JsonModelConverter(WireOptions, AzureResourceManagerResourcesBicepContext.Default) } };
+ internal static readonly JsonSerializerOptions OptionsUseManagedServiceIdentityV3 = new JsonSerializerOptions { Converters = { new JsonModelConverter(WireOptions, AzureResourceManagerResourcesBicepContext.Default), new ResourceManager.Models.ManagedServiceIdentityTypeV3Converter() } };
+
+ public static object GetObject(this JsonElement element)
+ {
+ switch (element.ValueKind)
+ {
+ case JsonValueKind.String:
+ return element.GetString();
+ case JsonValueKind.Number:
+ if (element.TryGetInt32(out int intValue))
+ {
+ return intValue;
+ }
+ if (element.TryGetInt64(out long longValue))
+ {
+ return longValue;
+ }
+ return element.GetDouble();
+ case JsonValueKind.True:
+ return true;
+ case JsonValueKind.False:
+ return false;
+ case JsonValueKind.Undefined:
+ case JsonValueKind.Null:
+ return null;
+ case JsonValueKind.Object:
+ var dictionary = new Dictionary();
+ foreach (var jsonProperty in element.EnumerateObject())
+ {
+ dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject());
+ }
+ return dictionary;
+ case JsonValueKind.Array:
+ var list = new List