diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/Azure.ResourceManager.DependencyMap.sln b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/Azure.ResourceManager.DependencyMap.sln new file mode 100644 index 000000000000..fedbc9737960 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/Azure.ResourceManager.DependencyMap.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.DependencyMap.Samples", "samples\Azure.ResourceManager.DependencyMap.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DependencyMap", "src\Azure.ResourceManager.DependencyMap.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DependencyMap.Tests", "tests\Azure.ResourceManager.DependencyMap.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/CHANGELOG.md b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/Directory.Build.props b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/README.md b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/README.md new file mode 100644 index 000000000000..810ba32e80f7 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure DependencyMap 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 DependencyMap management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.DependencyMap --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://learn.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/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.net8.0.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.net8.0.cs new file mode 100644 index 000000000000..fa5adf2b4083 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.net8.0.cs @@ -0,0 +1,337 @@ +namespace Azure.ResourceManager.DependencyMap +{ + public static partial class DependencyMapExtensions + { + public static Azure.ResourceManager.DependencyMap.DiscoverySourceResource GetDiscoverySourceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DependencyMap.MapsResource GetMapsResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetMapsResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetMapsResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DependencyMap.MapsResourceCollection GetMapsResources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetMapsResources(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetMapsResourcesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DiscoverySourceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DiscoverySourceResource() { } + public virtual Azure.ResourceManager.DependencyMap.DiscoverySourceResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mapName, string sourceName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DependencyMap.DiscoverySourceResourceData 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.DependencyMap.DiscoverySourceResourceData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DiscoverySourceResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DiscoverySourceResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sourceName, Azure.ResourceManager.DependencyMap.DiscoverySourceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sourceName, Azure.ResourceManager.DependencyMap.DiscoverySourceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DiscoverySourceResourceData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiscoverySourceResourceData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.DiscoverySourceResourceData 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.DependencyMap.DiscoverySourceResourceData 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 MapsResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MapsResource() { } + public virtual Azure.ResourceManager.DependencyMap.MapsResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mapName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ExportDependencies(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ExportDependenciesAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetConnectionsForProcessOnFocusedMachine(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetConnectionsForProcessOnFocusedMachineAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetConnectionsWithConnectedMachineForFocusedMachine(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetConnectionsWithConnectedMachineForFocusedMachineAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetDependencyViewForFocusedMachine(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDependencyViewForFocusedMachineAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDiscoverySourceResource(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDiscoverySourceResourceAsync(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DependencyMap.DiscoverySourceResourceCollection GetDiscoverySourceResources() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DependencyMap.MapsResourceData 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.DependencyMap.MapsResourceData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.MapsResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.MapsResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MapsResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MapsResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string mapName, Azure.ResourceManager.DependencyMap.MapsResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string mapName, Azure.ResourceManager.DependencyMap.MapsResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MapsResourceData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MapsResourceData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DependencyMap.Models.ProvisioningState? MapsResourceProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.MapsResourceData 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.DependencyMap.MapsResourceData 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; } + } +} +namespace Azure.ResourceManager.DependencyMap.Mocking +{ + public partial class MockableDependencyMapArmClient : Azure.ResourceManager.ArmResource + { + protected MockableDependencyMapArmClient() { } + public virtual Azure.ResourceManager.DependencyMap.DiscoverySourceResource GetDiscoverySourceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DependencyMap.MapsResource GetMapsResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDependencyMapResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDependencyMapResourceGroupResource() { } + public virtual Azure.Response GetMapsResource(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMapsResourceAsync(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DependencyMap.MapsResourceCollection GetMapsResources() { throw null; } + } + public partial class MockableDependencyMapSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDependencyMapSubscriptionResource() { } + public virtual Azure.Pageable GetMapsResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetMapsResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DependencyMap.Models +{ + public static partial class ArmDependencyMapModelFactory + { + public static Azure.ResourceManager.DependencyMap.DiscoverySourceResourceData DiscoverySourceResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourceProperties DiscoverySourceResourceProperties(Azure.ResourceManager.DependencyMap.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DependencyMap.Models.ProvisioningState?), string sourceType = null, string sourceId = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent ExportDependenciesContent(string focusedMachineId = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent GetConnectionsForProcessOnFocusedMachineContent(string focusedMachineId = null, string processIdOnFocusedMachine = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent GetConnectionsWithConnectedMachineForFocusedMachineContent(string focusedMachineId = null, string connectedMachineId = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent GetDependencyViewForFocusedMachineContent(string focusedMachineId = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.MapsResourceData MapsResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DependencyMap.Models.ProvisioningState? mapsResourceProvisioningState = default(Azure.ResourceManager.DependencyMap.Models.ProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.OffAzureDiscoverySourceResourceProperties OffAzureDiscoverySourceResourceProperties(Azure.ResourceManager.DependencyMap.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DependencyMap.Models.ProvisioningState?), string sourceId = null) { throw null; } + } + public partial class DateTimeFilter : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DateTimeFilter() { } + public System.DateTimeOffset? EndDateTimeUtc { get { throw null; } set { } } + public System.DateTimeOffset? StartDateTimeUtc { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.DateTimeFilter 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.DependencyMap.Models.DateTimeFilter 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 DependencyMapVisualizationFilter : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DependencyMapVisualizationFilter() { } + public Azure.ResourceManager.DependencyMap.Models.DateTimeFilter DateTime { get { throw null; } set { } } + public Azure.ResourceManager.DependencyMap.Models.ProcessNameFilter ProcessNameFilter { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter 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.DependencyMap.Models.DependencyMapVisualizationFilter 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 DiscoverySourceResourcePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiscoverySourceResourcePatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourcePatch 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.DependencyMap.Models.DiscoverySourceResourcePatch 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 abstract partial class DiscoverySourceResourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DiscoverySourceResourceProperties(string sourceId) { } + public Azure.ResourceManager.DependencyMap.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public string SourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourceProperties 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.DependencyMap.Models.DiscoverySourceResourceProperties 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 ExportDependenciesContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportDependenciesContent(string focusedMachineId) { } + public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } + public string FocusedMachineId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent 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.DependencyMap.Models.ExportDependenciesContent 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 GetConnectionsForProcessOnFocusedMachineContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GetConnectionsForProcessOnFocusedMachineContent(string focusedMachineId, string processIdOnFocusedMachine) { } + public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } + public string FocusedMachineId { get { throw null; } } + public string ProcessIdOnFocusedMachine { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent 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.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent 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 GetConnectionsWithConnectedMachineForFocusedMachineContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GetConnectionsWithConnectedMachineForFocusedMachineContent(string focusedMachineId, string connectedMachineId) { } + public string ConnectedMachineId { get { throw null; } } + public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } + public string FocusedMachineId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent 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.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent 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 GetDependencyViewForFocusedMachineContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GetDependencyViewForFocusedMachineContent(string focusedMachineId) { } + public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } + public string FocusedMachineId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent 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.DependencyMap.Models.GetDependencyViewForFocusedMachineContent 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 MapsResourcePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MapsResourcePatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.MapsResourcePatch 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.DependencyMap.Models.MapsResourcePatch 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 OffAzureDiscoverySourceResourceProperties : Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OffAzureDiscoverySourceResourceProperties(string sourceId) : base (default(string)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.OffAzureDiscoverySourceResourceProperties 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.DependencyMap.Models.OffAzureDiscoverySourceResourceProperties 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 ProcessNameFilter : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProcessNameFilter(Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator @operator, System.Collections.Generic.IEnumerable processNames) { } + public Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator Operator { get { throw null; } } + public System.Collections.Generic.IList ProcessNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.ProcessNameFilter 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.DependencyMap.Models.ProcessNameFilter 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProcessNameFilterOperator : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProcessNameFilterOperator(string value) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator Contains { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator NotContains { get { throw null; } } + public bool Equals(Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator 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.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator left, Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator right) { throw null; } + public static implicit operator Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator left, Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DependencyMap.Models.ProvisioningState 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.ResourceManager.DependencyMap.Models.ProvisioningState left, Azure.ResourceManager.DependencyMap.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DependencyMap.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DependencyMap.Models.ProvisioningState left, Azure.ResourceManager.DependencyMap.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.netstandard2.0.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.netstandard2.0.cs new file mode 100644 index 000000000000..fa5adf2b4083 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.netstandard2.0.cs @@ -0,0 +1,337 @@ +namespace Azure.ResourceManager.DependencyMap +{ + public static partial class DependencyMapExtensions + { + public static Azure.ResourceManager.DependencyMap.DiscoverySourceResource GetDiscoverySourceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DependencyMap.MapsResource GetMapsResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetMapsResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetMapsResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DependencyMap.MapsResourceCollection GetMapsResources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetMapsResources(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetMapsResourcesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DiscoverySourceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DiscoverySourceResource() { } + public virtual Azure.ResourceManager.DependencyMap.DiscoverySourceResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mapName, string sourceName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DependencyMap.DiscoverySourceResourceData 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.DependencyMap.DiscoverySourceResourceData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DiscoverySourceResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DiscoverySourceResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sourceName, Azure.ResourceManager.DependencyMap.DiscoverySourceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sourceName, Azure.ResourceManager.DependencyMap.DiscoverySourceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DiscoverySourceResourceData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiscoverySourceResourceData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.DiscoverySourceResourceData 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.DependencyMap.DiscoverySourceResourceData 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 MapsResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MapsResource() { } + public virtual Azure.ResourceManager.DependencyMap.MapsResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mapName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ExportDependencies(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ExportDependenciesAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetConnectionsForProcessOnFocusedMachine(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetConnectionsForProcessOnFocusedMachineAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetConnectionsWithConnectedMachineForFocusedMachine(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetConnectionsWithConnectedMachineForFocusedMachineAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetDependencyViewForFocusedMachine(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDependencyViewForFocusedMachineAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDiscoverySourceResource(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDiscoverySourceResourceAsync(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DependencyMap.DiscoverySourceResourceCollection GetDiscoverySourceResources() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DependencyMap.MapsResourceData 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.DependencyMap.MapsResourceData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.MapsResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.MapsResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MapsResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MapsResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string mapName, Azure.ResourceManager.DependencyMap.MapsResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string mapName, Azure.ResourceManager.DependencyMap.MapsResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MapsResourceData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MapsResourceData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DependencyMap.Models.ProvisioningState? MapsResourceProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.MapsResourceData 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.DependencyMap.MapsResourceData 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; } + } +} +namespace Azure.ResourceManager.DependencyMap.Mocking +{ + public partial class MockableDependencyMapArmClient : Azure.ResourceManager.ArmResource + { + protected MockableDependencyMapArmClient() { } + public virtual Azure.ResourceManager.DependencyMap.DiscoverySourceResource GetDiscoverySourceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DependencyMap.MapsResource GetMapsResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDependencyMapResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDependencyMapResourceGroupResource() { } + public virtual Azure.Response GetMapsResource(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMapsResourceAsync(string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DependencyMap.MapsResourceCollection GetMapsResources() { throw null; } + } + public partial class MockableDependencyMapSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDependencyMapSubscriptionResource() { } + public virtual Azure.Pageable GetMapsResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetMapsResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DependencyMap.Models +{ + public static partial class ArmDependencyMapModelFactory + { + public static Azure.ResourceManager.DependencyMap.DiscoverySourceResourceData DiscoverySourceResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourceProperties DiscoverySourceResourceProperties(Azure.ResourceManager.DependencyMap.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DependencyMap.Models.ProvisioningState?), string sourceType = null, string sourceId = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent ExportDependenciesContent(string focusedMachineId = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent GetConnectionsForProcessOnFocusedMachineContent(string focusedMachineId = null, string processIdOnFocusedMachine = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent GetConnectionsWithConnectedMachineForFocusedMachineContent(string focusedMachineId = null, string connectedMachineId = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent GetDependencyViewForFocusedMachineContent(string focusedMachineId = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.MapsResourceData MapsResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DependencyMap.Models.ProvisioningState? mapsResourceProvisioningState = default(Azure.ResourceManager.DependencyMap.Models.ProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.OffAzureDiscoverySourceResourceProperties OffAzureDiscoverySourceResourceProperties(Azure.ResourceManager.DependencyMap.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DependencyMap.Models.ProvisioningState?), string sourceId = null) { throw null; } + } + public partial class DateTimeFilter : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DateTimeFilter() { } + public System.DateTimeOffset? EndDateTimeUtc { get { throw null; } set { } } + public System.DateTimeOffset? StartDateTimeUtc { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.DateTimeFilter 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.DependencyMap.Models.DateTimeFilter 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 DependencyMapVisualizationFilter : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DependencyMapVisualizationFilter() { } + public Azure.ResourceManager.DependencyMap.Models.DateTimeFilter DateTime { get { throw null; } set { } } + public Azure.ResourceManager.DependencyMap.Models.ProcessNameFilter ProcessNameFilter { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter 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.DependencyMap.Models.DependencyMapVisualizationFilter 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 DiscoverySourceResourcePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiscoverySourceResourcePatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourcePatch 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.DependencyMap.Models.DiscoverySourceResourcePatch 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 abstract partial class DiscoverySourceResourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DiscoverySourceResourceProperties(string sourceId) { } + public Azure.ResourceManager.DependencyMap.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public string SourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourceProperties 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.DependencyMap.Models.DiscoverySourceResourceProperties 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 ExportDependenciesContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportDependenciesContent(string focusedMachineId) { } + public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } + public string FocusedMachineId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent 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.DependencyMap.Models.ExportDependenciesContent 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 GetConnectionsForProcessOnFocusedMachineContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GetConnectionsForProcessOnFocusedMachineContent(string focusedMachineId, string processIdOnFocusedMachine) { } + public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } + public string FocusedMachineId { get { throw null; } } + public string ProcessIdOnFocusedMachine { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent 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.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent 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 GetConnectionsWithConnectedMachineForFocusedMachineContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GetConnectionsWithConnectedMachineForFocusedMachineContent(string focusedMachineId, string connectedMachineId) { } + public string ConnectedMachineId { get { throw null; } } + public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } + public string FocusedMachineId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent 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.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent 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 GetDependencyViewForFocusedMachineContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GetDependencyViewForFocusedMachineContent(string focusedMachineId) { } + public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } + public string FocusedMachineId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent 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.DependencyMap.Models.GetDependencyViewForFocusedMachineContent 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 MapsResourcePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MapsResourcePatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.MapsResourcePatch 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.DependencyMap.Models.MapsResourcePatch 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 OffAzureDiscoverySourceResourceProperties : Azure.ResourceManager.DependencyMap.Models.DiscoverySourceResourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OffAzureDiscoverySourceResourceProperties(string sourceId) : base (default(string)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.OffAzureDiscoverySourceResourceProperties 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.DependencyMap.Models.OffAzureDiscoverySourceResourceProperties 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 ProcessNameFilter : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProcessNameFilter(Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator @operator, System.Collections.Generic.IEnumerable processNames) { } + public Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator Operator { get { throw null; } } + public System.Collections.Generic.IList ProcessNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.ProcessNameFilter 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.DependencyMap.Models.ProcessNameFilter 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProcessNameFilterOperator : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProcessNameFilterOperator(string value) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator Contains { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator NotContains { get { throw null; } } + public bool Equals(Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator 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.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator left, Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator right) { throw null; } + public static implicit operator Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator left, Azure.ResourceManager.DependencyMap.Models.ProcessNameFilterOperator right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DependencyMap.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DependencyMap.Models.ProvisioningState 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.ResourceManager.DependencyMap.Models.ProvisioningState left, Azure.ResourceManager.DependencyMap.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DependencyMap.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DependencyMap.Models.ProvisioningState left, Azure.ResourceManager.DependencyMap.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/assets.json b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/assets.json new file mode 100644 index 000000000000..729d19b6092d --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/dependencymap/Azure.ResourceManager.DependencyMap", + "Tag": "" +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Azure.ResourceManager.DependencyMap.Samples.csproj b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Azure.ResourceManager.DependencyMap.Samples.csproj new file mode 100644 index 000000000000..3222b11d1d1d --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Azure.ResourceManager.DependencyMap.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DiscoverySourceResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DiscoverySourceResource.cs new file mode 100644 index 000000000000..621bbf8898fd --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DiscoverySourceResource.cs @@ -0,0 +1,113 @@ +// 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.DependencyMap.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DependencyMap.Samples +{ + public partial class Sample_DiscoverySourceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_DiscoverySourcesGetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/DiscoverySources_Get.json + // this example is just showing the usage of "DiscoverySourceResource_Get" 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 DiscoverySourceResource created on azure + // for more information of creating DiscoverySourceResource, please refer to the document of DiscoverySourceResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + string sourceName = "sourceTest1"; + ResourceIdentifier discoverySourceResourceId = DiscoverySourceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName, sourceName); + DiscoverySourceResource discoverySourceResource = client.GetDiscoverySourceResource(discoverySourceResourceId); + + // invoke the operation + DiscoverySourceResource result = await discoverySourceResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DiscoverySourceResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DiscoverySourcesDeleteGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/DiscoverySources_Delete.json + // this example is just showing the usage of "DiscoverySourceResource_Delete" 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 DiscoverySourceResource created on azure + // for more information of creating DiscoverySourceResource, please refer to the document of DiscoverySourceResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + string sourceName = "sourceTest1"; + ResourceIdentifier discoverySourceResourceId = DiscoverySourceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName, sourceName); + DiscoverySourceResource discoverySourceResource = client.GetDiscoverySourceResource(discoverySourceResourceId); + + // invoke the operation + await discoverySourceResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_DiscoverySourcesUpdateGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/DiscoverySources_Update.json + // this example is just showing the usage of "DiscoverySourceResource_Update" 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 DiscoverySourceResource created on azure + // for more information of creating DiscoverySourceResource, please refer to the document of DiscoverySourceResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + string sourceName = "sourceTest1"; + ResourceIdentifier discoverySourceResourceId = DiscoverySourceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName, sourceName); + DiscoverySourceResource discoverySourceResource = client.GetDiscoverySourceResource(discoverySourceResourceId); + + // invoke the operation + DiscoverySourceResourcePatch patch = new DiscoverySourceResourcePatch + { + Tags = { }, + }; + ArmOperation lro = await discoverySourceResource.UpdateAsync(WaitUntil.Completed, patch); + DiscoverySourceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DiscoverySourceResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DiscoverySourceResourceCollection.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DiscoverySourceResourceCollection.cs new file mode 100644 index 000000000000..2f8f614fd834 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DiscoverySourceResourceCollection.cs @@ -0,0 +1,199 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.DependencyMap.Samples +{ + public partial class Sample_DiscoverySourceResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DiscoverySourcesCreateOrUpdateGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/DiscoverySources_CreateOrUpdate.json + // this example is just showing the usage of "DiscoverySourceResource_CreateOrUpdate" 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 MapsResource created on azure + // for more information of creating MapsResource, please refer to the document of MapsResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + ResourceIdentifier mapsResourceId = MapsResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); + MapsResource mapsResource = client.GetMapsResource(mapsResourceId); + + // get the collection of this DiscoverySourceResource + DiscoverySourceResourceCollection collection = mapsResource.GetDiscoverySourceResources(); + + // invoke the operation + string sourceName = "sourceTest1"; + DiscoverySourceResourceData data = new DiscoverySourceResourceData(new AzureLocation("y")) + { + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sourceName, data); + DiscoverySourceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DiscoverySourceResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_DiscoverySourcesGetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/DiscoverySources_Get.json + // this example is just showing the usage of "DiscoverySourceResource_Get" 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 MapsResource created on azure + // for more information of creating MapsResource, please refer to the document of MapsResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + ResourceIdentifier mapsResourceId = MapsResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); + MapsResource mapsResource = client.GetMapsResource(mapsResourceId); + + // get the collection of this DiscoverySourceResource + DiscoverySourceResourceCollection collection = mapsResource.GetDiscoverySourceResources(); + + // invoke the operation + string sourceName = "sourceTest1"; + DiscoverySourceResource result = await collection.GetAsync(sourceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DiscoverySourceResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_DiscoverySourcesListByMapsResourceGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/DiscoverySources_ListByMapsResource.json + // this example is just showing the usage of "DiscoverySourceResource_ListByMapsResource" 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 MapsResource created on azure + // for more information of creating MapsResource, please refer to the document of MapsResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + ResourceIdentifier mapsResourceId = MapsResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); + MapsResource mapsResource = client.GetMapsResource(mapsResourceId); + + // get the collection of this DiscoverySourceResource + DiscoverySourceResourceCollection collection = mapsResource.GetDiscoverySourceResources(); + + // invoke the operation and iterate over the result + await foreach (DiscoverySourceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DiscoverySourceResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_DiscoverySourcesGetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/DiscoverySources_Get.json + // this example is just showing the usage of "DiscoverySourceResource_Get" 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 MapsResource created on azure + // for more information of creating MapsResource, please refer to the document of MapsResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + ResourceIdentifier mapsResourceId = MapsResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); + MapsResource mapsResource = client.GetMapsResource(mapsResourceId); + + // get the collection of this DiscoverySourceResource + DiscoverySourceResourceCollection collection = mapsResource.GetDiscoverySourceResources(); + + // invoke the operation + string sourceName = "sourceTest1"; + bool result = await collection.ExistsAsync(sourceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_DiscoverySourcesGetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/DiscoverySources_Get.json + // this example is just showing the usage of "DiscoverySourceResource_Get" 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 MapsResource created on azure + // for more information of creating MapsResource, please refer to the document of MapsResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + ResourceIdentifier mapsResourceId = MapsResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); + MapsResource mapsResource = client.GetMapsResource(mapsResourceId); + + // get the collection of this DiscoverySourceResource + DiscoverySourceResourceCollection collection = mapsResource.GetDiscoverySourceResources(); + + // invoke the operation + string sourceName = "sourceTest1"; + NullableResponse response = await collection.GetIfExistsAsync(sourceName); + DiscoverySourceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DiscoverySourceResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_MapsResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_MapsResource.cs new file mode 100644 index 000000000000..0f2d298c1a2b --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_MapsResource.cs @@ -0,0 +1,262 @@ +// 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.DependencyMap.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DependencyMap.Samples +{ + public partial class Sample_MapsResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_MapsGetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/Maps_Get.json + // this example is just showing the usage of "MapsResource_Get" 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 MapsResource created on azure + // for more information of creating MapsResource, please refer to the document of MapsResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + ResourceIdentifier mapsResourceId = MapsResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); + MapsResource mapsResource = client.GetMapsResource(mapsResourceId); + + // invoke the operation + MapsResource result = await mapsResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MapsResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_MapsDeleteGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/Maps_Delete.json + // this example is just showing the usage of "MapsResource_Delete" 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 MapsResource created on azure + // for more information of creating MapsResource, please refer to the document of MapsResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + ResourceIdentifier mapsResourceId = MapsResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); + MapsResource mapsResource = client.GetMapsResource(mapsResourceId); + + // invoke the operation + await mapsResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_MapsUpdateGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/Maps_Update.json + // this example is just showing the usage of "MapsResource_Update" 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 MapsResource created on azure + // for more information of creating MapsResource, please refer to the document of MapsResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + ResourceIdentifier mapsResourceId = MapsResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); + MapsResource mapsResource = client.GetMapsResource(mapsResourceId); + + // invoke the operation + MapsResourcePatch patch = new MapsResourcePatch + { + Tags = { }, + }; + ArmOperation lro = await mapsResource.UpdateAsync(WaitUntil.Completed, patch); + MapsResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MapsResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDependencyViewForFocusedMachine_MapsGetDependencyViewForFocusedMachineGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/Maps_GetDependencyViewForFocusedMachine.json + // this example is just showing the usage of "Maps_GetDependencyViewForFocusedMachine" 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 MapsResource created on azure + // for more information of creating MapsResource, please refer to the document of MapsResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + ResourceIdentifier mapsResourceId = MapsResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); + MapsResource mapsResource = client.GetMapsResource(mapsResourceId); + + // invoke the operation + GetDependencyViewForFocusedMachineContent content = new GetDependencyViewForFocusedMachineContent("imzykeisagngrnfinbqtu") + { + Filters = new DependencyMapVisualizationFilter + { + DateTime = new DateTimeFilter + { + StartDateTimeUtc = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), + EndDateTimeUtc = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), + }, + ProcessNameFilter = new ProcessNameFilter(ProcessNameFilterOperator.Contains, new string[] { "mnqtvduwzemjcvvmnnoqvcuemwhnz" }), + }, + }; + await mapsResource.GetDependencyViewForFocusedMachineAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetConnectionsWithConnectedMachineForFocusedMachine_MapsGetConnectionsWithConnectedMachineForFocusedMachineGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/Maps_GetConnectionsWithConnectedMachineForFocusedMachine.json + // this example is just showing the usage of "Maps_GetConnectionsWithConnectedMachineForFocusedMachine" 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 MapsResource created on azure + // for more information of creating MapsResource, please refer to the document of MapsResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + ResourceIdentifier mapsResourceId = MapsResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); + MapsResource mapsResource = client.GetMapsResource(mapsResourceId); + + // invoke the operation + GetConnectionsWithConnectedMachineForFocusedMachineContent content = new GetConnectionsWithConnectedMachineForFocusedMachineContent("gagovctcfgocievqwq", "enaieiloylabljxzvmyrshp") + { + Filters = new DependencyMapVisualizationFilter + { + DateTime = new DateTimeFilter + { + StartDateTimeUtc = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), + EndDateTimeUtc = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), + }, + ProcessNameFilter = new ProcessNameFilter(ProcessNameFilterOperator.Contains, new string[] { "mnqtvduwzemjcvvmnnoqvcuemwhnz" }), + }, + }; + await mapsResource.GetConnectionsWithConnectedMachineForFocusedMachineAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetConnectionsForProcessOnFocusedMachine_MapsGetConnectionsForProcessOnFocusedMachineGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/Maps_GetConnectionsForProcessOnFocusedMachine.json + // this example is just showing the usage of "Maps_GetConnectionsForProcessOnFocusedMachine" 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 MapsResource created on azure + // for more information of creating MapsResource, please refer to the document of MapsResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + ResourceIdentifier mapsResourceId = MapsResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); + MapsResource mapsResource = client.GetMapsResource(mapsResourceId); + + // invoke the operation + GetConnectionsForProcessOnFocusedMachineContent content = new GetConnectionsForProcessOnFocusedMachineContent("abjy", "yzldgsfupsfvzlztqoqpiv") + { + Filters = new DependencyMapVisualizationFilter + { + DateTime = new DateTimeFilter + { + StartDateTimeUtc = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), + EndDateTimeUtc = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), + }, + ProcessNameFilter = new ProcessNameFilter(ProcessNameFilterOperator.Contains, new string[] { "mnqtvduwzemjcvvmnnoqvcuemwhnz" }), + }, + }; + await mapsResource.GetConnectionsForProcessOnFocusedMachineAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ExportDependencies_MapsExportDependenciesGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/Maps_ExportDependencies.json + // this example is just showing the usage of "Maps_ExportDependencies" 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 MapsResource created on azure + // for more information of creating MapsResource, please refer to the document of MapsResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + string mapName = "mapsTest1"; + ResourceIdentifier mapsResourceId = MapsResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); + MapsResource mapsResource = client.GetMapsResource(mapsResourceId); + + // invoke the operation + ExportDependenciesContent content = new ExportDependenciesContent("qzjpilzxpurauwfwwanpiiafvz") + { + Filters = new DependencyMapVisualizationFilter + { + DateTime = new DateTimeFilter + { + StartDateTimeUtc = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), + EndDateTimeUtc = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), + }, + ProcessNameFilter = new ProcessNameFilter(ProcessNameFilterOperator.Contains, new string[] { "mnqtvduwzemjcvvmnnoqvcuemwhnz" }), + }, + }; + await mapsResource.ExportDependenciesAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_MapsResourceCollection.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_MapsResourceCollection.cs new file mode 100644 index 000000000000..7f65001445da --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_MapsResourceCollection.cs @@ -0,0 +1,195 @@ +// 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; +using NUnit.Framework; + +namespace Azure.ResourceManager.DependencyMap.Samples +{ + public partial class Sample_MapsResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_MapsCreateOrUpdateGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/Maps_CreateOrUpdate.json + // this example is just showing the usage of "MapsResource_CreateOrUpdate" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MapsResource + MapsResourceCollection collection = resourceGroupResource.GetMapsResources(); + + // invoke the operation + string mapName = "mapsTest1"; + MapsResourceData data = new MapsResourceData(new AzureLocation("wjtzelgfcmswfeflfltwxqveo")) + { + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, mapName, data); + MapsResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MapsResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_MapsGetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/Maps_Get.json + // this example is just showing the usage of "MapsResource_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MapsResource + MapsResourceCollection collection = resourceGroupResource.GetMapsResources(); + + // invoke the operation + string mapName = "mapsTest1"; + MapsResource result = await collection.GetAsync(mapName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MapsResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_MapsListByResourceGroupGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/Maps_ListByResourceGroup.json + // this example is just showing the usage of "MapsResource_ListByResourceGroup" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MapsResource + MapsResourceCollection collection = resourceGroupResource.GetMapsResources(); + + // invoke the operation and iterate over the result + await foreach (MapsResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MapsResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_MapsGetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/Maps_Get.json + // this example is just showing the usage of "MapsResource_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MapsResource + MapsResourceCollection collection = resourceGroupResource.GetMapsResources(); + + // invoke the operation + string mapName = "mapsTest1"; + bool result = await collection.ExistsAsync(mapName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_MapsGetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/Maps_Get.json + // this example is just showing the usage of "MapsResource_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + string resourceGroupName = "rgdependencyMap"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MapsResource + MapsResourceCollection collection = resourceGroupResource.GetMapsResources(); + + // invoke the operation + string mapName = "mapsTest1"; + NullableResponse response = await collection.GetIfExistsAsync(mapName); + MapsResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MapsResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..57785e453b0a --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,50 @@ +// 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; +using NUnit.Framework; + +namespace Azure.ResourceManager.DependencyMap.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetMapsResources_MapsListBySubscriptionGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-01-31-preview/Maps_ListBySubscription.json + // this example is just showing the usage of "MapsResource_ListBySubscription" 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 = "D6E58BDB-45F1-41EC-A884-1FC945058848"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (MapsResource item in subscriptionResource.GetMapsResourcesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MapsResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Azure.ResourceManager.DependencyMap.csproj b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Azure.ResourceManager.DependencyMap.csproj new file mode 100644 index 000000000000..1101056c65ac --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Azure.ResourceManager.DependencyMap.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider DependencyMap. + 1.0.0-beta.1 + azure;management;arm;resource manager;dependencymap + Azure.ResourceManager.DependencyMap + + diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ArmDependencyMapModelFactory.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ArmDependencyMapModelFactory.cs new file mode 100644 index 000000000000..281b39254ed6 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ArmDependencyMapModelFactory.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// Model factory for models. + public static partial class ArmDependencyMapModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static MapsResourceData MapsResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ProvisioningState? mapsResourceProvisioningState = null) + { + tags ??= new Dictionary(); + + return new MapsResourceData( + id, + name, + resourceType, + systemData, + tags, + location, + mapsResourceProvisioningState != null ? new MapsResourceProperties(mapsResourceProvisioningState, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Machine arm id. + /// Filters for GetSingleMachineDependencyView. + /// A new instance for mocking. + public static GetDependencyViewForFocusedMachineContent GetDependencyViewForFocusedMachineContent(string focusedMachineId = null, DependencyMapVisualizationFilter filters = null) + { + return new GetDependencyViewForFocusedMachineContent(focusedMachineId, filters, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Source machine arm id. + /// Destination machine arm id. + /// Filters for GetNetworkConnectionsBetweenMachines. + /// A new instance for mocking. + public static GetConnectionsWithConnectedMachineForFocusedMachineContent GetConnectionsWithConnectedMachineForFocusedMachineContent(string focusedMachineId = null, string connectedMachineId = null, DependencyMapVisualizationFilter filters = null) + { + return new GetConnectionsWithConnectedMachineForFocusedMachineContent(focusedMachineId, connectedMachineId, filters, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Machine arm id. + /// Process id. + /// Filters for GetProcessNetworkConnections. + /// A new instance for mocking. + public static GetConnectionsForProcessOnFocusedMachineContent GetConnectionsForProcessOnFocusedMachineContent(string focusedMachineId = null, string processIdOnFocusedMachine = null, DependencyMapVisualizationFilter filters = null) + { + return new GetConnectionsForProcessOnFocusedMachineContent(focusedMachineId, processIdOnFocusedMachine, filters, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Machine arm id. + /// Filters for ExportDependencies. + /// A new instance for mocking. + public static ExportDependenciesContent ExportDependenciesContent(string focusedMachineId = null, DependencyMapVisualizationFilter filters = null) + { + return new ExportDependenciesContent(focusedMachineId, filters, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// + /// The resource-specific properties for this resource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// A new instance for mocking. + public static DiscoverySourceResourceData DiscoverySourceResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DiscoverySourceResourceProperties properties = null) + { + tags ??= new Dictionary(); + + return new DiscoverySourceResourceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Provisioning state of Discovery Source resource. + /// Source type of Discovery Source resource. + /// Source ArmId of Discovery Source resource. + /// A new instance for mocking. + public static DiscoverySourceResourceProperties DiscoverySourceResourceProperties(ProvisioningState? provisioningState = null, string sourceType = null, string sourceId = null) + { + return new UnknownDiscoverySourceResourceProperties(provisioningState, sourceType == null ? default : new SourceType(sourceType), sourceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Provisioning state of Discovery Source resource. + /// Source ArmId of Discovery Source resource. + /// A new instance for mocking. + public static OffAzureDiscoverySourceResourceProperties OffAzureDiscoverySourceResourceProperties(ProvisioningState? provisioningState = null, string sourceId = null) + { + return new OffAzureDiscoverySourceResourceProperties(provisioningState, SourceType.OffAzure, sourceId, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResource.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResource.Serialization.cs new file mode 100644 index 000000000000..4c60b4c0579e --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DependencyMap +{ + public partial class DiscoverySourceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DiscoverySourceResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DiscoverySourceResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResource.cs new file mode 100644 index 000000000000..bd8a50b64c51 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResource.cs @@ -0,0 +1,707 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DependencyMap.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + /// + /// A Class representing a DiscoverySourceResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDiscoverySourceResource method. + /// Otherwise you can get one from its parent resource using the GetDiscoverySourceResource method. + /// + public partial class DiscoverySourceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The mapName. + /// The sourceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mapName, string sourceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _discoverySourceResourceDiscoverySourcesClientDiagnostics; + private readonly DiscoverySourcesRestOperations _discoverySourceResourceDiscoverySourcesRestClient; + private readonly DiscoverySourceResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DependencyMap/maps/discoverySources"; + + /// Initializes a new instance of the class for mocking. + protected DiscoverySourceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DiscoverySourceResource(ArmClient client, DiscoverySourceResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// 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 DiscoverySourceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _discoverySourceResourceDiscoverySourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DependencyMap", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string discoverySourceResourceDiscoverySourcesApiVersion); + _discoverySourceResourceDiscoverySourcesRestClient = new DiscoverySourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, discoverySourceResourceDiscoverySourcesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DiscoverySourceResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a DiscoverySourceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResource.Get"); + scope.Start(); + try + { + var response = await _discoverySourceResourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DiscoverySourceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DiscoverySourceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResource.Get"); + scope.Start(); + try + { + var response = _discoverySourceResourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DiscoverySourceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a DiscoverySourceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Delete + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResource.Delete"); + scope.Start(); + try + { + var response = await _discoverySourceResourceDiscoverySourcesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DependencyMapArmOperation(_discoverySourceResourceDiscoverySourcesClientDiagnostics, Pipeline, _discoverySourceResourceDiscoverySourcesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a DiscoverySourceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Delete + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResource.Delete"); + scope.Start(); + try + { + var response = _discoverySourceResourceDiscoverySourcesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DependencyMapArmOperation(_discoverySourceResourceDiscoverySourcesClientDiagnostics, Pipeline, _discoverySourceResourceDiscoverySourcesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a DiscoverySourceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Update + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DiscoverySourceResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResource.Update"); + scope.Start(); + try + { + var response = await _discoverySourceResourceDiscoverySourcesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new DependencyMapArmOperation(new DiscoverySourceResourceOperationSource(Client), _discoverySourceResourceDiscoverySourcesClientDiagnostics, Pipeline, _discoverySourceResourceDiscoverySourcesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a DiscoverySourceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Update + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DiscoverySourceResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResource.Update"); + scope.Start(); + try + { + var response = _discoverySourceResourceDiscoverySourcesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new DependencyMapArmOperation(new DiscoverySourceResourceOperationSource(Client), _discoverySourceResourceDiscoverySourcesClientDiagnostics, Pipeline, _discoverySourceResourceDiscoverySourcesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _discoverySourceResourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DiscoverySourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DiscoverySourceResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _discoverySourceResourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DiscoverySourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DiscoverySourceResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _discoverySourceResourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DiscoverySourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DiscoverySourceResourcePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _discoverySourceResourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DiscoverySourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DiscoverySourceResourcePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _discoverySourceResourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DiscoverySourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DiscoverySourceResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _discoverySourceResourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DiscoverySourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DiscoverySourceResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResourceCollection.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResourceCollection.cs new file mode 100644 index 000000000000..f9fe4bad6e83 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResourceCollection.cs @@ -0,0 +1,493 @@ +// 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.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DependencyMap +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDiscoverySourceResources method from an instance of . + /// + public partial class DiscoverySourceResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _discoverySourceResourceDiscoverySourcesClientDiagnostics; + private readonly DiscoverySourcesRestOperations _discoverySourceResourceDiscoverySourcesRestClient; + + /// Initializes a new instance of the class for mocking. + protected DiscoverySourceResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DiscoverySourceResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _discoverySourceResourceDiscoverySourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DependencyMap", DiscoverySourceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DiscoverySourceResource.ResourceType, out string discoverySourceResourceDiscoverySourcesApiVersion); + _discoverySourceResourceDiscoverySourcesRestClient = new DiscoverySourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, discoverySourceResourceDiscoverySourcesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MapsResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MapsResource.ResourceType), nameof(id)); + } + + /// + /// Create a DiscoverySourceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// discovery source resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sourceName, DiscoverySourceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _discoverySourceResourceDiscoverySourcesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, data, cancellationToken).ConfigureAwait(false); + var operation = new DependencyMapArmOperation(new DiscoverySourceResourceOperationSource(Client), _discoverySourceResourceDiscoverySourcesClientDiagnostics, Pipeline, _discoverySourceResourceDiscoverySourcesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a DiscoverySourceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// discovery source resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sourceName, DiscoverySourceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _discoverySourceResourceDiscoverySourcesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, data, cancellationToken); + var operation = new DependencyMapArmOperation(new DiscoverySourceResourceOperationSource(Client), _discoverySourceResourceDiscoverySourcesClientDiagnostics, Pipeline, _discoverySourceResourceDiscoverySourcesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DiscoverySourceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// discovery source resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string sourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResourceCollection.Get"); + scope.Start(); + try + { + var response = await _discoverySourceResourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DiscoverySourceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DiscoverySourceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// discovery source resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string sourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResourceCollection.Get"); + scope.Start(); + try + { + var response = _discoverySourceResourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DiscoverySourceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List DiscoverySourceResource resources by MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources + /// + /// + /// Operation Id + /// DiscoverySourceResource_ListByMapsResource + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _discoverySourceResourceDiscoverySourcesRestClient.CreateListByMapsResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _discoverySourceResourceDiscoverySourcesRestClient.CreateListByMapsResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DiscoverySourceResource(Client, DiscoverySourceResourceData.DeserializeDiscoverySourceResourceData(e)), _discoverySourceResourceDiscoverySourcesClientDiagnostics, Pipeline, "DiscoverySourceResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List DiscoverySourceResource resources by MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources + /// + /// + /// Operation Id + /// DiscoverySourceResource_ListByMapsResource + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _discoverySourceResourceDiscoverySourcesRestClient.CreateListByMapsResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _discoverySourceResourceDiscoverySourcesRestClient.CreateListByMapsResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DiscoverySourceResource(Client, DiscoverySourceResourceData.DeserializeDiscoverySourceResourceData(e)), _discoverySourceResourceDiscoverySourcesClientDiagnostics, Pipeline, "DiscoverySourceResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// discovery source resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string sourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _discoverySourceResourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// discovery source resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string sourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResourceCollection.Exists"); + scope.Start(); + try + { + var response = _discoverySourceResourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// discovery source resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string sourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _discoverySourceResourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DiscoverySourceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// discovery source resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string sourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + + using var scope = _discoverySourceResourceDiscoverySourcesClientDiagnostics.CreateScope("DiscoverySourceResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _discoverySourceResourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DiscoverySourceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResourceData.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResourceData.Serialization.cs new file mode 100644 index 000000000000..63860ef62163 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResourceData.Serialization.cs @@ -0,0 +1,178 @@ +// 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.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DependencyMap.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + public partial class DiscoverySourceResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoverySourceResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DiscoverySourceResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoverySourceResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiscoverySourceResourceData(document.RootElement, options); + } + + internal static DiscoverySourceResourceData DeserializeDiscoverySourceResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DiscoverySourceResourceProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DiscoverySourceResourceProperties.DeserializeDiscoverySourceResourceProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiscoverySourceResourceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiscoverySourceResourceData)} does not support writing '{options.Format}' format."); + } + } + + DiscoverySourceResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiscoverySourceResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiscoverySourceResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResourceData.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResourceData.cs new file mode 100644 index 000000000000..09d306dc5427 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourceResourceData.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DependencyMap.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + /// + /// A class representing the DiscoverySourceResource data model. + /// A Discovery Source resource + /// + public partial class DiscoverySourceResourceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public DiscoverySourceResourceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// + /// The resource-specific properties for this resource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Keeps track of any properties unknown to the library. + internal DiscoverySourceResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DiscoverySourceResourceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DiscoverySourceResourceData() + { + } + + /// + /// The resource-specific properties for this resource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public DiscoverySourceResourceProperties Properties { get; set; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/DependencyMapExtensions.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/DependencyMapExtensions.cs new file mode 100644 index 000000000000..8ca9a2ac6150 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/DependencyMapExtensions.cs @@ -0,0 +1,238 @@ +// 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.ResourceManager.DependencyMap.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DependencyMap +{ + /// A class to add extension methods to Azure.ResourceManager.DependencyMap. + public static partial class DependencyMapExtensions + { + private static MockableDependencyMapArmClient GetMockableDependencyMapArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableDependencyMapArmClient(client0)); + } + + private static MockableDependencyMapResourceGroupResource GetMockableDependencyMapResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableDependencyMapResourceGroupResource(client, resource.Id)); + } + + private static MockableDependencyMapSubscriptionResource GetMockableDependencyMapSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableDependencyMapSubscriptionResource(client, resource.Id)); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static MapsResource GetMapsResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDependencyMapArmClient(client).GetMapsResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DiscoverySourceResource GetDiscoverySourceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDependencyMapArmClient(client).GetDiscoverySourceResource(id); + } + + /// + /// Gets a collection of MapsResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of MapsResources and their operations over a MapsResource. + public static MapsResourceCollection GetMapsResources(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDependencyMapResourceGroupResource(resourceGroupResource).GetMapsResources(); + } + + /// + /// Get a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Maps resource name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetMapsResourceAsync(this ResourceGroupResource resourceGroupResource, string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableDependencyMapResourceGroupResource(resourceGroupResource).GetMapsResourceAsync(mapName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Maps resource name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetMapsResource(this ResourceGroupResource resourceGroupResource, string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDependencyMapResourceGroupResource(resourceGroupResource).GetMapsResource(mapName, cancellationToken); + } + + /// + /// List MapsResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DependencyMap/maps + /// + /// + /// Operation Id + /// MapsResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetMapsResourcesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDependencyMapSubscriptionResource(subscriptionResource).GetMapsResourcesAsync(cancellationToken); + } + + /// + /// List MapsResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DependencyMap/maps + /// + /// + /// Operation Id + /// MapsResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetMapsResources(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDependencyMapSubscriptionResource(subscriptionResource).GetMapsResources(cancellationToken); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapArmClient.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapArmClient.cs new file mode 100644 index 000000000000..c294211bb6a4 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapArmClient.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableDependencyMapArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableDependencyMapArmClient() + { + } + + /// 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 MockableDependencyMapArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableDependencyMapArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual MapsResource GetMapsResource(ResourceIdentifier id) + { + MapsResource.ValidateResourceId(id); + return new MapsResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DiscoverySourceResource GetDiscoverySourceResource(ResourceIdentifier id) + { + DiscoverySourceResource.ValidateResourceId(id); + return new DiscoverySourceResource(Client, id); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapResourceGroupResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapResourceGroupResource.cs new file mode 100644 index 000000000000..b87c26c0090b --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapResourceGroupResource.cs @@ -0,0 +1,105 @@ +// 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; + +namespace Azure.ResourceManager.DependencyMap.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableDependencyMapResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableDependencyMapResourceGroupResource() + { + } + + /// 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 MockableDependencyMapResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of MapsResources in the ResourceGroupResource. + /// An object representing collection of MapsResources and their operations over a MapsResource. + public virtual MapsResourceCollection GetMapsResources() + { + return GetCachedClient(client => new MapsResourceCollection(client, Id)); + } + + /// + /// Get a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Maps resource name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetMapsResourceAsync(string mapName, CancellationToken cancellationToken = default) + { + return await GetMapsResources().GetAsync(mapName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Maps resource name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetMapsResource(string mapName, CancellationToken cancellationToken = default) + { + return GetMapsResources().Get(mapName, cancellationToken); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapSubscriptionResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapSubscriptionResource.cs new file mode 100644 index 000000000000..cc9d1df84a21 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapSubscriptionResource.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DependencyMap.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableDependencyMapSubscriptionResource : ArmResource + { + private ClientDiagnostics _mapsResourceMapsClientDiagnostics; + private MapsRestOperations _mapsResourceMapsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableDependencyMapSubscriptionResource() + { + } + + /// 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 MockableDependencyMapSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics MapsResourceMapsClientDiagnostics => _mapsResourceMapsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DependencyMap", MapsResource.ResourceType.Namespace, Diagnostics); + private MapsRestOperations MapsResourceMapsRestClient => _mapsResourceMapsRestClient ??= new MapsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(MapsResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List MapsResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DependencyMap/maps + /// + /// + /// Operation Id + /// MapsResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetMapsResourcesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => MapsResourceMapsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MapsResourceMapsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MapsResource(Client, MapsResourceData.DeserializeMapsResourceData(e)), MapsResourceMapsClientDiagnostics, Pipeline, "MockableDependencyMapSubscriptionResource.GetMapsResources", "value", "nextLink", cancellationToken); + } + + /// + /// List MapsResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DependencyMap/maps + /// + /// + /// Operation Id + /// MapsResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetMapsResources(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => MapsResourceMapsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MapsResourceMapsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MapsResource(Client, MapsResourceData.DeserializeMapsResourceData(e)), MapsResourceMapsClientDiagnostics, Pipeline, "MockableDependencyMapSubscriptionResource.GetMapsResources", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Argument.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..a9994a6d0534 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/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.DependencyMap +{ + 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/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..9c7da1d4c95d --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/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.DependencyMap +{ + 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/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ChangeTrackingList.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..288d4d1bae98 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/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.DependencyMap +{ + 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/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..684a04e8e4ea --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,399 @@ +// 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.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + 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(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Optional.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..d1f550245273 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.ResourceManager.DependencyMap +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..ba336e222cdc --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperation.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperation.cs new file mode 100644 index 000000000000..2c13585bc2d3 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperation.cs @@ -0,0 +1,94 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DependencyMap +{ +#pragma warning disable SA1649 // File name should match first type name + internal class DependencyMapArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of DependencyMapArmOperation for mocking. + protected DependencyMapArmOperation() + { + } + + internal DependencyMapArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal DependencyMapArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DependencyMapArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperationOfT.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperationOfT.cs new file mode 100644 index 000000000000..edb2ace2293c --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperationOfT.cs @@ -0,0 +1,100 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DependencyMap +{ +#pragma warning disable SA1649 // File name should match first type name + internal class DependencyMapArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of DependencyMapArmOperation for mocking. + protected DependencyMapArmOperation() + { + } + + internal DependencyMapArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal DependencyMapArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "DependencyMapArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override T Value => _operation.Value; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); + + /// + public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DiscoverySourceResourceOperationSource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DiscoverySourceResourceOperationSource.cs new file mode 100644 index 000000000000..801dedad27f1 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DiscoverySourceResourceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap +{ + internal class DiscoverySourceResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DiscoverySourceResourceOperationSource(ArmClient client) + { + _client = client; + } + + DiscoverySourceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new DiscoverySourceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new DiscoverySourceResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/MapsResourceOperationSource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/MapsResourceOperationSource.cs new file mode 100644 index 000000000000..d77ea1badfce --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/MapsResourceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap +{ + internal class MapsResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MapsResourceOperationSource(ArmClient client) + { + _client = client; + } + + MapsResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new MapsResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new MapsResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResource.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResource.Serialization.cs new file mode 100644 index 000000000000..7fb1777b6c17 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DependencyMap +{ + public partial class MapsResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + MapsResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + MapsResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResource.cs new file mode 100644 index 000000000000..a89063002380 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResource.cs @@ -0,0 +1,1144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DependencyMap.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DependencyMap +{ + /// + /// A Class representing a MapsResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMapsResource method. + /// Otherwise you can get one from its parent resource using the GetMapsResource method. + /// + public partial class MapsResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The mapName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mapName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _mapsResourceMapsClientDiagnostics; + private readonly MapsRestOperations _mapsResourceMapsRestClient; + private readonly MapsResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DependencyMap/maps"; + + /// Initializes a new instance of the class for mocking. + protected MapsResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MapsResource(ArmClient client, MapsResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// 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 MapsResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _mapsResourceMapsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DependencyMap", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string mapsResourceMapsApiVersion); + _mapsResourceMapsRestClient = new MapsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mapsResourceMapsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MapsResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of DiscoverySourceResources in the MapsResource. + /// An object representing collection of DiscoverySourceResources and their operations over a DiscoverySourceResource. + public virtual DiscoverySourceResourceCollection GetDiscoverySourceResources() + { + return GetCachedClient(client => new DiscoverySourceResourceCollection(client, Id)); + } + + /// + /// Get a DiscoverySourceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// discovery source resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDiscoverySourceResourceAsync(string sourceName, CancellationToken cancellationToken = default) + { + return await GetDiscoverySourceResources().GetAsync(sourceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a DiscoverySourceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// + /// + /// Operation Id + /// DiscoverySourceResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// discovery source resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDiscoverySourceResource(string sourceName, CancellationToken cancellationToken = default) + { + return GetDiscoverySourceResources().Get(sourceName, cancellationToken); + } + + /// + /// Get a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.Get"); + scope.Start(); + try + { + var response = await _mapsResourceMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MapsResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.Get"); + scope.Start(); + try + { + var response = _mapsResourceMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MapsResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Delete + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.Delete"); + scope.Start(); + try + { + var response = await _mapsResourceMapsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DependencyMapArmOperation(_mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Delete + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.Delete"); + scope.Start(); + try + { + var response = _mapsResourceMapsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new DependencyMapArmOperation(_mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Update + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MapsResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.Update"); + scope.Start(); + try + { + var response = await _mapsResourceMapsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new DependencyMapArmOperation(new MapsResourceOperationSource(Client), _mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Update + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MapsResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.Update"); + scope.Start(); + try + { + var response = _mapsResourceMapsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new DependencyMapArmOperation(new MapsResourceOperationSource(Client), _mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get dependency map of single machine + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getDependencyViewForFocusedMachine + /// + /// + /// Operation Id + /// Maps_GetDependencyViewForFocusedMachine + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task GetDependencyViewForFocusedMachineAsync(WaitUntil waitUntil, GetDependencyViewForFocusedMachineContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.GetDependencyViewForFocusedMachine"); + scope.Start(); + try + { + var response = await _mapsResourceMapsRestClient.GetDependencyViewForFocusedMachineAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new DependencyMapArmOperation(_mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateGetDependencyViewForFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get dependency map of single machine + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getDependencyViewForFocusedMachine + /// + /// + /// Operation Id + /// Maps_GetDependencyViewForFocusedMachine + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation GetDependencyViewForFocusedMachine(WaitUntil waitUntil, GetDependencyViewForFocusedMachineContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.GetDependencyViewForFocusedMachine"); + scope.Start(); + try + { + var response = _mapsResourceMapsRestClient.GetDependencyViewForFocusedMachine(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new DependencyMapArmOperation(_mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateGetDependencyViewForFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get network connections between machines + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getConnectionsWithConnectedMachineForFocusedMachine + /// + /// + /// Operation Id + /// Maps_GetConnectionsWithConnectedMachineForFocusedMachine + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task GetConnectionsWithConnectedMachineForFocusedMachineAsync(WaitUntil waitUntil, GetConnectionsWithConnectedMachineForFocusedMachineContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.GetConnectionsWithConnectedMachineForFocusedMachine"); + scope.Start(); + try + { + var response = await _mapsResourceMapsRestClient.GetConnectionsWithConnectedMachineForFocusedMachineAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new DependencyMapArmOperation(_mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateGetConnectionsWithConnectedMachineForFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get network connections between machines + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getConnectionsWithConnectedMachineForFocusedMachine + /// + /// + /// Operation Id + /// Maps_GetConnectionsWithConnectedMachineForFocusedMachine + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation GetConnectionsWithConnectedMachineForFocusedMachine(WaitUntil waitUntil, GetConnectionsWithConnectedMachineForFocusedMachineContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.GetConnectionsWithConnectedMachineForFocusedMachine"); + scope.Start(); + try + { + var response = _mapsResourceMapsRestClient.GetConnectionsWithConnectedMachineForFocusedMachine(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new DependencyMapArmOperation(_mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateGetConnectionsWithConnectedMachineForFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get network connections of a process + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getConnectionsForProcessOnFocusedMachine + /// + /// + /// Operation Id + /// Maps_GetConnectionsForProcessOnFocusedMachine + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task GetConnectionsForProcessOnFocusedMachineAsync(WaitUntil waitUntil, GetConnectionsForProcessOnFocusedMachineContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.GetConnectionsForProcessOnFocusedMachine"); + scope.Start(); + try + { + var response = await _mapsResourceMapsRestClient.GetConnectionsForProcessOnFocusedMachineAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new DependencyMapArmOperation(_mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateGetConnectionsForProcessOnFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get network connections of a process + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getConnectionsForProcessOnFocusedMachine + /// + /// + /// Operation Id + /// Maps_GetConnectionsForProcessOnFocusedMachine + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation GetConnectionsForProcessOnFocusedMachine(WaitUntil waitUntil, GetConnectionsForProcessOnFocusedMachineContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.GetConnectionsForProcessOnFocusedMachine"); + scope.Start(); + try + { + var response = _mapsResourceMapsRestClient.GetConnectionsForProcessOnFocusedMachine(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new DependencyMapArmOperation(_mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateGetConnectionsForProcessOnFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Export dependencies + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/exportDependencies + /// + /// + /// Operation Id + /// Maps_ExportDependencies + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task ExportDependenciesAsync(WaitUntil waitUntil, ExportDependenciesContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.ExportDependencies"); + scope.Start(); + try + { + var response = await _mapsResourceMapsRestClient.ExportDependenciesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new DependencyMapArmOperation(_mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateExportDependenciesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Export dependencies + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/exportDependencies + /// + /// + /// Operation Id + /// Maps_ExportDependencies + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ExportDependencies(WaitUntil waitUntil, ExportDependenciesContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.ExportDependencies"); + scope.Start(); + try + { + var response = _mapsResourceMapsRestClient.ExportDependencies(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new DependencyMapArmOperation(_mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateExportDependenciesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _mapsResourceMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MapsResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MapsResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _mapsResourceMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new MapsResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MapsResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _mapsResourceMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MapsResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MapsResourcePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _mapsResourceMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new MapsResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MapsResourcePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _mapsResourceMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MapsResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MapsResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _mapsResourceMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new MapsResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MapsResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResourceCollection.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResourceCollection.cs new file mode 100644 index 000000000000..d690aa0d114f --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResourceCollection.cs @@ -0,0 +1,494 @@ +// 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.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DependencyMap +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMapsResources method from an instance of . + /// + public partial class MapsResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _mapsResourceMapsClientDiagnostics; + private readonly MapsRestOperations _mapsResourceMapsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MapsResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MapsResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _mapsResourceMapsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DependencyMap", MapsResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MapsResource.ResourceType, out string mapsResourceMapsApiVersion); + _mapsResourceMapsRestClient = new MapsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mapsResourceMapsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Maps resource name. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string mapName, MapsResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _mapsResourceMapsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, mapName, data, cancellationToken).ConfigureAwait(false); + var operation = new DependencyMapArmOperation(new MapsResourceOperationSource(Client), _mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, mapName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Maps resource name. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string mapName, MapsResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _mapsResourceMapsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, mapName, data, cancellationToken); + var operation = new DependencyMapArmOperation(new MapsResourceOperationSource(Client), _mapsResourceMapsClientDiagnostics, Pipeline, _mapsResourceMapsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, mapName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Maps resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResourceCollection.Get"); + scope.Start(); + try + { + var response = await _mapsResourceMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, mapName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MapsResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a MapsResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Maps resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResourceCollection.Get"); + scope.Start(); + try + { + var response = _mapsResourceMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, mapName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MapsResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List MapsResource resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps + /// + /// + /// Operation Id + /// MapsResource_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _mapsResourceMapsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _mapsResourceMapsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MapsResource(Client, MapsResourceData.DeserializeMapsResourceData(e)), _mapsResourceMapsClientDiagnostics, Pipeline, "MapsResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List MapsResource resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps + /// + /// + /// Operation Id + /// MapsResource_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _mapsResourceMapsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _mapsResourceMapsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MapsResource(Client, MapsResourceData.DeserializeMapsResourceData(e)), _mapsResourceMapsClientDiagnostics, Pipeline, "MapsResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Maps resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _mapsResourceMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, mapName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Maps resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResourceCollection.Exists"); + scope.Start(); + try + { + var response = _mapsResourceMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, mapName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Maps resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _mapsResourceMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, mapName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MapsResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// + /// + /// Operation Id + /// MapsResource_Get + /// + /// + /// Default Api Version + /// 2025-01-31-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Maps resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var scope = _mapsResourceMapsClientDiagnostics.CreateScope("MapsResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _mapsResourceMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, mapName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MapsResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResourceData.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResourceData.Serialization.cs new file mode 100644 index 000000000000..a09a0c90bad7 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResourceData.Serialization.cs @@ -0,0 +1,178 @@ +// 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.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DependencyMap.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + public partial class MapsResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MapsResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + MapsResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MapsResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMapsResourceData(document.RootElement, options); + } + + internal static MapsResourceData DeserializeMapsResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MapsResourceProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = MapsResourceProperties.DeserializeMapsResourceProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MapsResourceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MapsResourceData)} does not support writing '{options.Format}' format."); + } + } + + MapsResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMapsResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MapsResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResourceData.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResourceData.cs new file mode 100644 index 000000000000..beafdfe4b15c --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsResourceData.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DependencyMap.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + /// + /// A class representing the MapsResource data model. + /// A Maps resource + /// + public partial class MapsResourceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public MapsResourceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal MapsResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MapsResourceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MapsResourceData() + { + } + + /// The resource-specific properties for this resource. + internal MapsResourceProperties Properties { get; set; } + /// Provisioning state of Maps resource. + public ProvisioningState? MapsResourceProvisioningState + { + get => Properties is null ? default : Properties.ProvisioningState; + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DateTimeFilter.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DateTimeFilter.Serialization.cs new file mode 100644 index 000000000000..37684fbe7c41 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DateTimeFilter.Serialization.cs @@ -0,0 +1,148 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + public partial class DateTimeFilter : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DateTimeFilter)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(StartDateTimeUtc)) + { + writer.WritePropertyName("startDateTimeUtc"u8); + writer.WriteStringValue(StartDateTimeUtc.Value, "O"); + } + if (Optional.IsDefined(EndDateTimeUtc)) + { + writer.WritePropertyName("endDateTimeUtc"u8); + writer.WriteStringValue(EndDateTimeUtc.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DateTimeFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DateTimeFilter)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDateTimeFilter(document.RootElement, options); + } + + internal static DateTimeFilter DeserializeDateTimeFilter(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? startDateTimeUtc = default; + DateTimeOffset? endDateTimeUtc = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startDateTimeUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startDateTimeUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endDateTimeUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endDateTimeUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DateTimeFilter(startDateTimeUtc, endDateTimeUtc, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DateTimeFilter)} does not support writing '{options.Format}' format."); + } + } + + DateTimeFilter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDateTimeFilter(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DateTimeFilter)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DateTimeFilter.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DateTimeFilter.cs new file mode 100644 index 000000000000..b868c07edd8f --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DateTimeFilter.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// UTC DateTime filter for dependency map visualization apis. + public partial class DateTimeFilter + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DateTimeFilter() + { + } + + /// Initializes a new instance of . + /// Start date time for dependency map visualization query. + /// End date time for dependency map visualization query. + /// Keeps track of any properties unknown to the library. + internal DateTimeFilter(DateTimeOffset? startDateTimeUtc, DateTimeOffset? endDateTimeUtc, IDictionary serializedAdditionalRawData) + { + StartDateTimeUtc = startDateTimeUtc; + EndDateTimeUtc = endDateTimeUtc; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Start date time for dependency map visualization query. + public DateTimeOffset? StartDateTimeUtc { get; set; } + /// End date time for dependency map visualization query. + public DateTimeOffset? EndDateTimeUtc { get; set; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.Serialization.cs new file mode 100644 index 000000000000..33a328d50cf7 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.Serialization.cs @@ -0,0 +1,148 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + public partial class DependencyMapVisualizationFilter : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DependencyMapVisualizationFilter)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DateTime)) + { + writer.WritePropertyName("dateTime"u8); + writer.WriteObjectValue(DateTime, options); + } + if (Optional.IsDefined(ProcessNameFilter)) + { + writer.WritePropertyName("processNameFilter"u8); + writer.WriteObjectValue(ProcessNameFilter, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DependencyMapVisualizationFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DependencyMapVisualizationFilter)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDependencyMapVisualizationFilter(document.RootElement, options); + } + + internal static DependencyMapVisualizationFilter DeserializeDependencyMapVisualizationFilter(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeFilter dateTime = default; + ProcessNameFilter processNameFilter = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dateTime = DateTimeFilter.DeserializeDateTimeFilter(property.Value, options); + continue; + } + if (property.NameEquals("processNameFilter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + processNameFilter = ProcessNameFilter.DeserializeProcessNameFilter(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DependencyMapVisualizationFilter(dateTime, processNameFilter, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DependencyMapVisualizationFilter)} does not support writing '{options.Format}' format."); + } + } + + DependencyMapVisualizationFilter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDependencyMapVisualizationFilter(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DependencyMapVisualizationFilter)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.cs new file mode 100644 index 000000000000..c2d1ddc2a0d6 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// Filters for dependency map visualization apis. + public partial class DependencyMapVisualizationFilter + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DependencyMapVisualizationFilter() + { + } + + /// Initializes a new instance of . + /// DateTime filter. + /// Process name filter. + /// Keeps track of any properties unknown to the library. + internal DependencyMapVisualizationFilter(DateTimeFilter dateTime, ProcessNameFilter processNameFilter, IDictionary serializedAdditionalRawData) + { + DateTime = dateTime; + ProcessNameFilter = processNameFilter; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// DateTime filter. + public DateTimeFilter DateTime { get; set; } + /// Process name filter. + public ProcessNameFilter ProcessNameFilter { get; set; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.Serialization.cs new file mode 100644 index 000000000000..52eafc8be135 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + internal partial class DiscoverySourceResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoverySourceResourceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiscoverySourceResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoverySourceResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiscoverySourceResourceListResult(document.RootElement, options); + } + + internal static DiscoverySourceResourceListResult DeserializeDiscoverySourceResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiscoverySourceResourceData.DeserializeDiscoverySourceResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiscoverySourceResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiscoverySourceResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + DiscoverySourceResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiscoverySourceResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiscoverySourceResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.cs new file mode 100644 index 000000000000..dcfd6ebfb123 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.cs @@ -0,0 +1,80 @@ +// 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.DependencyMap.Models +{ + /// The response of a DiscoverySourceResource list operation. + internal partial class DiscoverySourceResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The DiscoverySourceResource items on this page. + /// is null. + internal DiscoverySourceResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The DiscoverySourceResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal DiscoverySourceResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DiscoverySourceResourceListResult() + { + } + + /// The DiscoverySourceResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourcePatch.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourcePatch.Serialization.cs new file mode 100644 index 000000000000..1a85dcac3603 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourcePatch.Serialization.cs @@ -0,0 +1,144 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + public partial class DiscoverySourceResourcePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoverySourceResourcePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiscoverySourceResourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoverySourceResourcePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiscoverySourceResourcePatch(document.RootElement, options); + } + + internal static DiscoverySourceResourcePatch DeserializeDiscoverySourceResourcePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiscoverySourceResourcePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiscoverySourceResourcePatch)} does not support writing '{options.Format}' format."); + } + } + + DiscoverySourceResourcePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiscoverySourceResourcePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiscoverySourceResourcePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourcePatch.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourcePatch.cs new file mode 100644 index 000000000000..297fb82be416 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourcePatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// The type used for updating tags in DiscoverySourceResource resources. + public partial class DiscoverySourceResourcePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiscoverySourceResourcePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// Keeps track of any properties unknown to the library. + internal DiscoverySourceResourcePatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceProperties.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceProperties.Serialization.cs new file mode 100644 index 000000000000..c5a7994fa01e --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceProperties.Serialization.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + [PersistableModelProxy(typeof(UnknownDiscoverySourceResourceProperties))] + public partial class DiscoverySourceResourceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoverySourceResourceProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WritePropertyName("sourceType"u8); + writer.WriteStringValue(SourceType.ToString()); + writer.WritePropertyName("sourceId"u8); + writer.WriteStringValue(SourceId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiscoverySourceResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoverySourceResourceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiscoverySourceResourceProperties(document.RootElement, options); + } + + internal static DiscoverySourceResourceProperties DeserializeDiscoverySourceResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("sourceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "OffAzure": return OffAzureDiscoverySourceResourceProperties.DeserializeOffAzureDiscoverySourceResourceProperties(element, options); + } + } + return UnknownDiscoverySourceResourceProperties.DeserializeUnknownDiscoverySourceResourceProperties(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiscoverySourceResourceProperties)} does not support writing '{options.Format}' format."); + } + } + + DiscoverySourceResourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiscoverySourceResourceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiscoverySourceResourceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceProperties.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceProperties.cs new file mode 100644 index 000000000000..e7e871ce23af --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceProperties.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; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// + /// The properties of Discovery Source resource + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class DiscoverySourceResourceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Source ArmId of Discovery Source resource. + /// is null. + protected DiscoverySourceResourceProperties(string sourceId) + { + Argument.AssertNotNull(sourceId, nameof(sourceId)); + + SourceId = sourceId; + } + + /// Initializes a new instance of . + /// Provisioning state of Discovery Source resource. + /// Source type of Discovery Source resource. + /// Source ArmId of Discovery Source resource. + /// Keeps track of any properties unknown to the library. + internal DiscoverySourceResourceProperties(ProvisioningState? provisioningState, SourceType sourceType, string sourceId, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + SourceType = sourceType; + SourceId = sourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DiscoverySourceResourceProperties() + { + } + + /// Provisioning state of Discovery Source resource. + public ProvisioningState? ProvisioningState { get; } + /// Source type of Discovery Source resource. + internal SourceType SourceType { get; set; } + /// Source ArmId of Discovery Source resource. + public string SourceId { get; set; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.Serialization.cs new file mode 100644 index 000000000000..28b050194b23 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.Serialization.cs @@ -0,0 +1,141 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + public partial class ExportDependenciesContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportDependenciesContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("focusedMachineId"u8); + writer.WriteStringValue(FocusedMachineId); + if (Optional.IsDefined(Filters)) + { + writer.WritePropertyName("filters"u8); + writer.WriteObjectValue(Filters, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportDependenciesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportDependenciesContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportDependenciesContent(document.RootElement, options); + } + + internal static ExportDependenciesContent DeserializeExportDependenciesContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string focusedMachineId = default; + DependencyMapVisualizationFilter filters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("focusedMachineId"u8)) + { + focusedMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("filters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + filters = DependencyMapVisualizationFilter.DeserializeDependencyMapVisualizationFilter(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportDependenciesContent(focusedMachineId, filters, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportDependenciesContent)} does not support writing '{options.Format}' format."); + } + } + + ExportDependenciesContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExportDependenciesContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportDependenciesContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.cs new file mode 100644 index 000000000000..4459196293f2 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// ExportDependencies request model. + public partial class ExportDependenciesContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Machine arm id. + /// is null. + public ExportDependenciesContent(string focusedMachineId) + { + Argument.AssertNotNull(focusedMachineId, nameof(focusedMachineId)); + + FocusedMachineId = focusedMachineId; + } + + /// Initializes a new instance of . + /// Machine arm id. + /// Filters for ExportDependencies. + /// Keeps track of any properties unknown to the library. + internal ExportDependenciesContent(string focusedMachineId, DependencyMapVisualizationFilter filters, IDictionary serializedAdditionalRawData) + { + FocusedMachineId = focusedMachineId; + Filters = filters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportDependenciesContent() + { + } + + /// Machine arm id. + public string FocusedMachineId { get; } + /// Filters for ExportDependencies. + public DependencyMapVisualizationFilter Filters { get; set; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.Serialization.cs new file mode 100644 index 000000000000..3f9603e9034d --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.Serialization.cs @@ -0,0 +1,149 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + public partial class GetConnectionsForProcessOnFocusedMachineContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GetConnectionsForProcessOnFocusedMachineContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("focusedMachineId"u8); + writer.WriteStringValue(FocusedMachineId); + writer.WritePropertyName("processIdOnFocusedMachine"u8); + writer.WriteStringValue(ProcessIdOnFocusedMachine); + if (Optional.IsDefined(Filters)) + { + writer.WritePropertyName("filters"u8); + writer.WriteObjectValue(Filters, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GetConnectionsForProcessOnFocusedMachineContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GetConnectionsForProcessOnFocusedMachineContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGetConnectionsForProcessOnFocusedMachineContent(document.RootElement, options); + } + + internal static GetConnectionsForProcessOnFocusedMachineContent DeserializeGetConnectionsForProcessOnFocusedMachineContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string focusedMachineId = default; + string processIdOnFocusedMachine = default; + DependencyMapVisualizationFilter filters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("focusedMachineId"u8)) + { + focusedMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("processIdOnFocusedMachine"u8)) + { + processIdOnFocusedMachine = property.Value.GetString(); + continue; + } + if (property.NameEquals("filters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + filters = DependencyMapVisualizationFilter.DeserializeDependencyMapVisualizationFilter(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GetConnectionsForProcessOnFocusedMachineContent(focusedMachineId, processIdOnFocusedMachine, filters, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GetConnectionsForProcessOnFocusedMachineContent)} does not support writing '{options.Format}' format."); + } + } + + GetConnectionsForProcessOnFocusedMachineContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGetConnectionsForProcessOnFocusedMachineContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GetConnectionsForProcessOnFocusedMachineContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.cs new file mode 100644 index 000000000000..482940e9b8b8 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// GetConnectionsForProcessOnFocusedMachine request model. + public partial class GetConnectionsForProcessOnFocusedMachineContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Machine arm id. + /// Process id. + /// or is null. + public GetConnectionsForProcessOnFocusedMachineContent(string focusedMachineId, string processIdOnFocusedMachine) + { + Argument.AssertNotNull(focusedMachineId, nameof(focusedMachineId)); + Argument.AssertNotNull(processIdOnFocusedMachine, nameof(processIdOnFocusedMachine)); + + FocusedMachineId = focusedMachineId; + ProcessIdOnFocusedMachine = processIdOnFocusedMachine; + } + + /// Initializes a new instance of . + /// Machine arm id. + /// Process id. + /// Filters for GetProcessNetworkConnections. + /// Keeps track of any properties unknown to the library. + internal GetConnectionsForProcessOnFocusedMachineContent(string focusedMachineId, string processIdOnFocusedMachine, DependencyMapVisualizationFilter filters, IDictionary serializedAdditionalRawData) + { + FocusedMachineId = focusedMachineId; + ProcessIdOnFocusedMachine = processIdOnFocusedMachine; + Filters = filters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GetConnectionsForProcessOnFocusedMachineContent() + { + } + + /// Machine arm id. + public string FocusedMachineId { get; } + /// Process id. + public string ProcessIdOnFocusedMachine { get; } + /// Filters for GetProcessNetworkConnections. + public DependencyMapVisualizationFilter Filters { get; set; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.Serialization.cs new file mode 100644 index 000000000000..9872491b7b62 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.Serialization.cs @@ -0,0 +1,149 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + public partial class GetConnectionsWithConnectedMachineForFocusedMachineContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GetConnectionsWithConnectedMachineForFocusedMachineContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("focusedMachineId"u8); + writer.WriteStringValue(FocusedMachineId); + writer.WritePropertyName("connectedMachineId"u8); + writer.WriteStringValue(ConnectedMachineId); + if (Optional.IsDefined(Filters)) + { + writer.WritePropertyName("filters"u8); + writer.WriteObjectValue(Filters, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GetConnectionsWithConnectedMachineForFocusedMachineContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GetConnectionsWithConnectedMachineForFocusedMachineContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGetConnectionsWithConnectedMachineForFocusedMachineContent(document.RootElement, options); + } + + internal static GetConnectionsWithConnectedMachineForFocusedMachineContent DeserializeGetConnectionsWithConnectedMachineForFocusedMachineContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string focusedMachineId = default; + string connectedMachineId = default; + DependencyMapVisualizationFilter filters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("focusedMachineId"u8)) + { + focusedMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectedMachineId"u8)) + { + connectedMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("filters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + filters = DependencyMapVisualizationFilter.DeserializeDependencyMapVisualizationFilter(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GetConnectionsWithConnectedMachineForFocusedMachineContent(focusedMachineId, connectedMachineId, filters, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GetConnectionsWithConnectedMachineForFocusedMachineContent)} does not support writing '{options.Format}' format."); + } + } + + GetConnectionsWithConnectedMachineForFocusedMachineContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGetConnectionsWithConnectedMachineForFocusedMachineContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GetConnectionsWithConnectedMachineForFocusedMachineContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.cs new file mode 100644 index 000000000000..1902d91c88a0 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// GetConnectionsWithConnectedMachineForFocusedMachine request model. + public partial class GetConnectionsWithConnectedMachineForFocusedMachineContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Source machine arm id. + /// Destination machine arm id. + /// or is null. + public GetConnectionsWithConnectedMachineForFocusedMachineContent(string focusedMachineId, string connectedMachineId) + { + Argument.AssertNotNull(focusedMachineId, nameof(focusedMachineId)); + Argument.AssertNotNull(connectedMachineId, nameof(connectedMachineId)); + + FocusedMachineId = focusedMachineId; + ConnectedMachineId = connectedMachineId; + } + + /// Initializes a new instance of . + /// Source machine arm id. + /// Destination machine arm id. + /// Filters for GetNetworkConnectionsBetweenMachines. + /// Keeps track of any properties unknown to the library. + internal GetConnectionsWithConnectedMachineForFocusedMachineContent(string focusedMachineId, string connectedMachineId, DependencyMapVisualizationFilter filters, IDictionary serializedAdditionalRawData) + { + FocusedMachineId = focusedMachineId; + ConnectedMachineId = connectedMachineId; + Filters = filters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GetConnectionsWithConnectedMachineForFocusedMachineContent() + { + } + + /// Source machine arm id. + public string FocusedMachineId { get; } + /// Destination machine arm id. + public string ConnectedMachineId { get; } + /// Filters for GetNetworkConnectionsBetweenMachines. + public DependencyMapVisualizationFilter Filters { get; set; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.Serialization.cs new file mode 100644 index 000000000000..8deb73b3afbd --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.Serialization.cs @@ -0,0 +1,141 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + public partial class GetDependencyViewForFocusedMachineContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GetDependencyViewForFocusedMachineContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("focusedMachineId"u8); + writer.WriteStringValue(FocusedMachineId); + if (Optional.IsDefined(Filters)) + { + writer.WritePropertyName("filters"u8); + writer.WriteObjectValue(Filters, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GetDependencyViewForFocusedMachineContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GetDependencyViewForFocusedMachineContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGetDependencyViewForFocusedMachineContent(document.RootElement, options); + } + + internal static GetDependencyViewForFocusedMachineContent DeserializeGetDependencyViewForFocusedMachineContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string focusedMachineId = default; + DependencyMapVisualizationFilter filters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("focusedMachineId"u8)) + { + focusedMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("filters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + filters = DependencyMapVisualizationFilter.DeserializeDependencyMapVisualizationFilter(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GetDependencyViewForFocusedMachineContent(focusedMachineId, filters, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GetDependencyViewForFocusedMachineContent)} does not support writing '{options.Format}' format."); + } + } + + GetDependencyViewForFocusedMachineContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGetDependencyViewForFocusedMachineContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GetDependencyViewForFocusedMachineContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.cs new file mode 100644 index 000000000000..0460469f0b09 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// GetDependencyViewForFocusedMachine request model. + public partial class GetDependencyViewForFocusedMachineContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Machine arm id. + /// is null. + public GetDependencyViewForFocusedMachineContent(string focusedMachineId) + { + Argument.AssertNotNull(focusedMachineId, nameof(focusedMachineId)); + + FocusedMachineId = focusedMachineId; + } + + /// Initializes a new instance of . + /// Machine arm id. + /// Filters for GetSingleMachineDependencyView. + /// Keeps track of any properties unknown to the library. + internal GetDependencyViewForFocusedMachineContent(string focusedMachineId, DependencyMapVisualizationFilter filters, IDictionary serializedAdditionalRawData) + { + FocusedMachineId = focusedMachineId; + Filters = filters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GetDependencyViewForFocusedMachineContent() + { + } + + /// Machine arm id. + public string FocusedMachineId { get; } + /// Filters for GetSingleMachineDependencyView. + public DependencyMapVisualizationFilter Filters { get; set; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.Serialization.cs new file mode 100644 index 000000000000..1e9362c8ab40 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + internal partial class MapsResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MapsResourceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MapsResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MapsResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMapsResourceListResult(document.RootElement, options); + } + + internal static MapsResourceListResult DeserializeMapsResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MapsResourceData.DeserializeMapsResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MapsResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MapsResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + MapsResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMapsResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MapsResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.cs new file mode 100644 index 000000000000..1c7aa41f27b6 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.cs @@ -0,0 +1,80 @@ +// 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.DependencyMap.Models +{ + /// The response of a MapsResource list operation. + internal partial class MapsResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The MapsResource items on this page. + /// is null. + internal MapsResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The MapsResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal MapsResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MapsResourceListResult() + { + } + + /// The MapsResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourcePatch.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourcePatch.Serialization.cs new file mode 100644 index 000000000000..7ad94da6c9cf --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourcePatch.Serialization.cs @@ -0,0 +1,144 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + public partial class MapsResourcePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MapsResourcePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MapsResourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MapsResourcePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMapsResourcePatch(document.RootElement, options); + } + + internal static MapsResourcePatch DeserializeMapsResourcePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MapsResourcePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MapsResourcePatch)} does not support writing '{options.Format}' format."); + } + } + + MapsResourcePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMapsResourcePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MapsResourcePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourcePatch.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourcePatch.cs new file mode 100644 index 000000000000..2355f261e756 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourcePatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// The type used for updating tags in MapsResource resources. + public partial class MapsResourcePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public MapsResourcePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// Keeps track of any properties unknown to the library. + internal MapsResourcePatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceProperties.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceProperties.Serialization.cs new file mode 100644 index 000000000000..d98535d5779a --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceProperties.Serialization.cs @@ -0,0 +1,133 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + internal partial class MapsResourceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MapsResourceProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MapsResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MapsResourceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMapsResourceProperties(document.RootElement, options); + } + + internal static MapsResourceProperties DeserializeMapsResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MapsResourceProperties(provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MapsResourceProperties)} does not support writing '{options.Format}' format."); + } + } + + MapsResourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMapsResourceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MapsResourceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceProperties.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceProperties.cs new file mode 100644 index 000000000000..d11433df6b96 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// The properties of Maps resource. + internal partial class MapsResourceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public MapsResourceProperties() + { + } + + /// Initializes a new instance of . + /// Provisioning state of Maps resource. + /// Keeps track of any properties unknown to the library. + internal MapsResourceProperties(ProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Provisioning state of Maps resource. + public ProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceResourceProperties.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceResourceProperties.Serialization.cs new file mode 100644 index 000000000000..28b390566aec --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceResourceProperties.Serialization.cs @@ -0,0 +1,126 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + public partial class OffAzureDiscoverySourceResourceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OffAzureDiscoverySourceResourceProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + OffAzureDiscoverySourceResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OffAzureDiscoverySourceResourceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOffAzureDiscoverySourceResourceProperties(document.RootElement, options); + } + + internal static OffAzureDiscoverySourceResourceProperties DeserializeOffAzureDiscoverySourceResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + SourceType sourceType = default; + string sourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceType"u8)) + { + sourceType = new SourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceId"u8)) + { + sourceId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OffAzureDiscoverySourceResourceProperties(provisioningState, sourceType, sourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OffAzureDiscoverySourceResourceProperties)} does not support writing '{options.Format}' format."); + } + } + + OffAzureDiscoverySourceResourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOffAzureDiscoverySourceResourceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OffAzureDiscoverySourceResourceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceResourceProperties.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceResourceProperties.cs new file mode 100644 index 000000000000..61cb3d3925ef --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceResourceProperties.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// OffAzure discovery source resource properties. + public partial class OffAzureDiscoverySourceResourceProperties : DiscoverySourceResourceProperties + { + /// Initializes a new instance of . + /// Source ArmId of Discovery Source resource. + /// is null. + public OffAzureDiscoverySourceResourceProperties(string sourceId) : base(sourceId) + { + Argument.AssertNotNull(sourceId, nameof(sourceId)); + + SourceType = SourceType.OffAzure; + } + + /// Initializes a new instance of . + /// Provisioning state of Discovery Source resource. + /// Source type of Discovery Source resource. + /// Source ArmId of Discovery Source resource. + /// Keeps track of any properties unknown to the library. + internal OffAzureDiscoverySourceResourceProperties(ProvisioningState? provisioningState, SourceType sourceType, string sourceId, IDictionary serializedAdditionalRawData) : base(provisioningState, sourceType, sourceId, serializedAdditionalRawData) + { + SourceType = sourceType; + } + + /// Initializes a new instance of for deserialization. + internal OffAzureDiscoverySourceResourceProperties() + { + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ProcessNameFilter.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ProcessNameFilter.Serialization.cs new file mode 100644 index 000000000000..3ffaba525f3f --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ProcessNameFilter.Serialization.cs @@ -0,0 +1,144 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + public partial class ProcessNameFilter : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProcessNameFilter)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("operator"u8); + writer.WriteStringValue(Operator.ToString()); + writer.WritePropertyName("processNames"u8); + writer.WriteStartArray(); + foreach (var item in ProcessNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProcessNameFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProcessNameFilter)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProcessNameFilter(document.RootElement, options); + } + + internal static ProcessNameFilter DeserializeProcessNameFilter(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProcessNameFilterOperator @operator = default; + IList processNames = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operator"u8)) + { + @operator = new ProcessNameFilterOperator(property.Value.GetString()); + continue; + } + if (property.NameEquals("processNames"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + processNames = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProcessNameFilter(@operator, processNames, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProcessNameFilter)} does not support writing '{options.Format}' format."); + } + } + + ProcessNameFilter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProcessNameFilter(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProcessNameFilter)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ProcessNameFilter.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ProcessNameFilter.cs new file mode 100644 index 000000000000..229da56b7458 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ProcessNameFilter.cs @@ -0,0 +1,82 @@ +// 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.DependencyMap.Models +{ + /// Process name filter for dependency map visualization apis. + public partial class ProcessNameFilter + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Operator for process name filter. + /// List of process names on which the operator should be applied. + /// is null. + public ProcessNameFilter(ProcessNameFilterOperator @operator, IEnumerable processNames) + { + Argument.AssertNotNull(processNames, nameof(processNames)); + + Operator = @operator; + ProcessNames = processNames.ToList(); + } + + /// Initializes a new instance of . + /// Operator for process name filter. + /// List of process names on which the operator should be applied. + /// Keeps track of any properties unknown to the library. + internal ProcessNameFilter(ProcessNameFilterOperator @operator, IList processNames, IDictionary serializedAdditionalRawData) + { + Operator = @operator; + ProcessNames = processNames; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProcessNameFilter() + { + } + + /// Operator for process name filter. + public ProcessNameFilterOperator Operator { get; } + /// List of process names on which the operator should be applied. + public IList ProcessNames { get; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ProcessNameFilterOperator.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ProcessNameFilterOperator.cs new file mode 100644 index 000000000000..908487d6539d --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ProcessNameFilterOperator.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// Operator enum for process name filter. + public readonly partial struct ProcessNameFilterOperator : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProcessNameFilterOperator(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ContainsValue = "contains"; + private const string NotContainsValue = "notContains"; + + /// Operator to include items in the result. + public static ProcessNameFilterOperator Contains { get; } = new ProcessNameFilterOperator(ContainsValue); + /// Operator to exclude items in the result. + public static ProcessNameFilterOperator NotContains { get; } = new ProcessNameFilterOperator(NotContainsValue); + /// Determines if two values are the same. + public static bool operator ==(ProcessNameFilterOperator left, ProcessNameFilterOperator right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProcessNameFilterOperator left, ProcessNameFilterOperator right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProcessNameFilterOperator(string value) => new ProcessNameFilterOperator(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProcessNameFilterOperator other && Equals(other); + /// + public bool Equals(ProcessNameFilterOperator other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ProvisioningState.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..8ea619102b6f --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ProvisioningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// Provisioning state of the resource. + public readonly partial struct ProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string ProvisioningValue = "Provisioning"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string AcceptedValue = "Accepted"; + + /// Resource has been created. + public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Resource creation failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); + /// This state indicates that the resource is being provisioned. + public static ProvisioningState Provisioning { get; } = new ProvisioningState(ProvisioningValue); + /// This state indicates that the resource is being updated. + public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); + /// This state indicates that the resource is being deleted. + public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); + /// This state indicates that the operation on the resource has been accepted. + public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); + /// Determines if two values are the same. + public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); + /// + public bool Equals(ProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/SourceType.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/SourceType.cs new file mode 100644 index 000000000000..6e1732d5abca --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/SourceType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// Source type of the discoverySource. + internal readonly partial struct SourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OffAzureValue = "OffAzure"; + + /// OffAzure source type. + public static SourceType OffAzure { get; } = new SourceType(OffAzureValue); + /// Determines if two values are the same. + public static bool operator ==(SourceType left, SourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SourceType left, SourceType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SourceType(string value) => new SourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SourceType other && Equals(other); + /// + public bool Equals(SourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDiscoverySourceResourceProperties.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDiscoverySourceResourceProperties.Serialization.cs new file mode 100644 index 000000000000..3f33e08d2dfa --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDiscoverySourceResourceProperties.Serialization.cs @@ -0,0 +1,126 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + internal partial class UnknownDiscoverySourceResourceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoverySourceResourceProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DiscoverySourceResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoverySourceResourceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiscoverySourceResourceProperties(document.RootElement, options); + } + + internal static UnknownDiscoverySourceResourceProperties DeserializeUnknownDiscoverySourceResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + SourceType sourceType = "Unknown"; + string sourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceType"u8)) + { + sourceType = new SourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceId"u8)) + { + sourceId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDiscoverySourceResourceProperties(provisioningState, sourceType, sourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiscoverySourceResourceProperties)} does not support writing '{options.Format}' format."); + } + } + + DiscoverySourceResourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiscoverySourceResourceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiscoverySourceResourceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDiscoverySourceResourceProperties.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDiscoverySourceResourceProperties.cs new file mode 100644 index 000000000000..03ea8ffcf8f2 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDiscoverySourceResourceProperties.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// Unknown version of DiscoverySourceResourceProperties. + internal partial class UnknownDiscoverySourceResourceProperties : DiscoverySourceResourceProperties + { + /// Initializes a new instance of . + /// Provisioning state of Discovery Source resource. + /// Source type of Discovery Source resource. + /// Source ArmId of Discovery Source resource. + /// Keeps track of any properties unknown to the library. + internal UnknownDiscoverySourceResourceProperties(ProvisioningState? provisioningState, SourceType sourceType, string sourceId, IDictionary serializedAdditionalRawData) : base(provisioningState, sourceType, sourceId, serializedAdditionalRawData) + { + SourceType = sourceType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDiscoverySourceResourceProperties() + { + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ProviderConstants.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..24660c191602 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ProviderConstants.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DependencyMap +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/DiscoverySourcesRestOperations.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/DiscoverySourcesRestOperations.cs new file mode 100644 index 000000000000..7280c7e53228 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/DiscoverySourcesRestOperations.cs @@ -0,0 +1,613 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DependencyMap.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + internal partial class DiscoverySourcesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DiscoverySourcesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public DiscoverySourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-01-31-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string mapName, string sourceName) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/discoverySources/", false); + uri.AppendPath(sourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string mapName, string sourceName) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/discoverySources/", false); + uri.AppendPath(sourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a DiscoverySourceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// discovery source resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string mapName, string sourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, mapName, sourceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DiscoverySourceResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DiscoverySourceResourceData.DeserializeDiscoverySourceResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DiscoverySourceResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a DiscoverySourceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// discovery source resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string mapName, string sourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, mapName, sourceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DiscoverySourceResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DiscoverySourceResourceData.DeserializeDiscoverySourceResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DiscoverySourceResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DiscoverySourceResourceData data) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/discoverySources/", false); + uri.AppendPath(sourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DiscoverySourceResourceData data) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/discoverySources/", false); + uri.AppendPath(sourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a DiscoverySourceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// discovery source resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DiscoverySourceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, mapName, sourceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a DiscoverySourceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// discovery source resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DiscoverySourceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, mapName, sourceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DiscoverySourceResourcePatch patch) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/discoverySources/", false); + uri.AppendPath(sourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DiscoverySourceResourcePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/discoverySources/", false); + uri.AppendPath(sourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a DiscoverySourceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// discovery source resource. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DiscoverySourceResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, mapName, sourceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a DiscoverySourceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// discovery source resource. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DiscoverySourceResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, mapName, sourceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string mapName, string sourceName) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/discoverySources/", false); + uri.AppendPath(sourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string mapName, string sourceName) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/discoverySources/", false); + uri.AppendPath(sourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a DiscoverySourceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// discovery source resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string mapName, string sourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, mapName, sourceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a DiscoverySourceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// discovery source resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string mapName, string sourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, mapName, sourceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByMapsResourceRequestUri(string subscriptionId, string resourceGroupName, string mapName) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/discoverySources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByMapsResourceRequest(string subscriptionId, string resourceGroupName, string mapName) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/discoverySources", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DiscoverySourceResource resources by MapsResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByMapsResourceAsync(string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var message = CreateListByMapsResourceRequest(subscriptionId, resourceGroupName, mapName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DiscoverySourceResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DiscoverySourceResourceListResult.DeserializeDiscoverySourceResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DiscoverySourceResource resources by MapsResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByMapsResource(string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var message = CreateListByMapsResourceRequest(subscriptionId, resourceGroupName, mapName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DiscoverySourceResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DiscoverySourceResourceListResult.DeserializeDiscoverySourceResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByMapsResourceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string mapName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByMapsResourceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string mapName) + { + 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; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DiscoverySourceResource resources by MapsResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByMapsResourceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var message = CreateListByMapsResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, mapName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DiscoverySourceResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DiscoverySourceResourceListResult.DeserializeDiscoverySourceResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DiscoverySourceResource resources by MapsResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByMapsResourceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var message = CreateListByMapsResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, mapName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DiscoverySourceResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DiscoverySourceResourceListResult.DeserializeDiscoverySourceResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/MapsRestOperations.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/MapsRestOperations.cs new file mode 100644 index 000000000000..9a0363efa963 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/MapsRestOperations.cs @@ -0,0 +1,1091 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DependencyMap.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + internal partial class MapsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of MapsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public MapsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-01-31-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string mapName) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string mapName) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a MapsResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, mapName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MapsResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MapsResourceData.DeserializeMapsResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MapsResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a MapsResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, mapName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MapsResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MapsResourceData.DeserializeMapsResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MapsResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string mapName, MapsResourceData data) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string mapName, MapsResourceData data) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a MapsResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string mapName, MapsResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, mapName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a MapsResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string mapName, MapsResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, mapName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string mapName, MapsResourcePatch patch) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string mapName, MapsResourcePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a MapsResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string mapName, MapsResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, mapName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a MapsResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string mapName, MapsResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, mapName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string mapName) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string mapName) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a MapsResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, mapName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a MapsResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, mapName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + 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.DependencyMap/maps", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + 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.DependencyMap/maps", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List MapsResource resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MapsResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List MapsResource resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MapsResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DependencyMap/maps", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + 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("/providers/Microsoft.DependencyMap/maps", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List MapsResource resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MapsResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List MapsResource resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MapsResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetDependencyViewForFocusedMachineRequestUri(string subscriptionId, string resourceGroupName, string mapName, GetDependencyViewForFocusedMachineContent content) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/getDependencyViewForFocusedMachine", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetDependencyViewForFocusedMachineRequest(string subscriptionId, string resourceGroupName, string mapName, GetDependencyViewForFocusedMachineContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/getDependencyViewForFocusedMachine", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Get dependency map of single machine. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task GetDependencyViewForFocusedMachineAsync(string subscriptionId, string resourceGroupName, string mapName, GetDependencyViewForFocusedMachineContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetDependencyViewForFocusedMachineRequest(subscriptionId, resourceGroupName, mapName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get dependency map of single machine. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetDependencyViewForFocusedMachine(string subscriptionId, string resourceGroupName, string mapName, GetDependencyViewForFocusedMachineContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetDependencyViewForFocusedMachineRequest(subscriptionId, resourceGroupName, mapName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetConnectionsWithConnectedMachineForFocusedMachineRequestUri(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsWithConnectedMachineForFocusedMachineContent content) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/getConnectionsWithConnectedMachineForFocusedMachine", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetConnectionsWithConnectedMachineForFocusedMachineRequest(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsWithConnectedMachineForFocusedMachineContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/getConnectionsWithConnectedMachineForFocusedMachine", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Get network connections between machines. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task GetConnectionsWithConnectedMachineForFocusedMachineAsync(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsWithConnectedMachineForFocusedMachineContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetConnectionsWithConnectedMachineForFocusedMachineRequest(subscriptionId, resourceGroupName, mapName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get network connections between machines. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetConnectionsWithConnectedMachineForFocusedMachine(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsWithConnectedMachineForFocusedMachineContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetConnectionsWithConnectedMachineForFocusedMachineRequest(subscriptionId, resourceGroupName, mapName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetConnectionsForProcessOnFocusedMachineRequestUri(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsForProcessOnFocusedMachineContent content) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/getConnectionsForProcessOnFocusedMachine", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetConnectionsForProcessOnFocusedMachineRequest(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsForProcessOnFocusedMachineContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/getConnectionsForProcessOnFocusedMachine", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Get network connections of a process. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task GetConnectionsForProcessOnFocusedMachineAsync(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsForProcessOnFocusedMachineContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetConnectionsForProcessOnFocusedMachineRequest(subscriptionId, resourceGroupName, mapName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get network connections of a process. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetConnectionsForProcessOnFocusedMachine(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsForProcessOnFocusedMachineContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetConnectionsForProcessOnFocusedMachineRequest(subscriptionId, resourceGroupName, mapName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateExportDependenciesRequestUri(string subscriptionId, string resourceGroupName, string mapName, ExportDependenciesContent content) + { + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/exportDependencies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateExportDependenciesRequest(string subscriptionId, string resourceGroupName, string mapName, ExportDependenciesContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.DependencyMap/maps/", false); + uri.AppendPath(mapName, true); + uri.AppendPath("/exportDependencies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Export dependencies. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ExportDependenciesAsync(string subscriptionId, string resourceGroupName, string mapName, ExportDependenciesContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateExportDependenciesRequest(subscriptionId, resourceGroupName, mapName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Export dependencies. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ExportDependencies(string subscriptionId, string resourceGroupName, string mapName, ExportDependenciesContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateExportDependenciesRequest(subscriptionId, resourceGroupName, mapName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + 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; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List MapsResource resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MapsResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List MapsResource resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MapsResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + 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; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List MapsResource resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MapsResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List MapsResource resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MapsResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Properties/AssemblyInfo.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..76da9bae4e8d --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.DependencyMap.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("DependencyMap")] diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Azure.ResourceManager.DependencyMap.Tests.csproj b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Azure.ResourceManager.DependencyMap.Tests.csproj new file mode 100644 index 000000000000..11a53c99de60 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Azure.ResourceManager.DependencyMap.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/DependencyMapManagementTestBase.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/DependencyMapManagementTestBase.cs new file mode 100644 index 000000000000..6d7ae4763bd4 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/DependencyMapManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.DependencyMap.Tests +{ + public class DependencyMapManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected DependencyMapManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected DependencyMapManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/DependencyMapManagementTestEnvironment.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/DependencyMapManagementTestEnvironment.cs new file mode 100644 index 000000000000..6121eda4251a --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/DependencyMapManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.DependencyMap.Tests +{ + public class DependencyMapManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tsp-location.yaml b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tsp-location.yaml new file mode 100644 index 000000000000..467d935d2128 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/azuredependencymap/DependencyMap.Management +commit: 7a71098ded360a72a7ddd2c76acab9b00b499b68 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/dependencymap/ci.mgmt.yml b/sdk/dependencymap/ci.mgmt.yml new file mode 100644 index 000000000000..8a338eb1f795 --- /dev/null +++ b/sdk/dependencymap/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/dependencymap /ci.mgmt.yml + - sdk/dependencymap /Azure.ResourceManager.DependencyMap / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: dependencymap + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.DependencyMap + safeName: AzureResourceManagerDependencyMap diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/Azure.ResourceManager.Migrate.sln b/sdk/migrate/Azure.ResourceManager.Migrate/Azure.ResourceManager.Migrate.sln new file mode 100644 index 000000000000..495165badd49 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/Azure.ResourceManager.Migrate.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Migrate.Samples", "samples\Azure.ResourceManager.Migrate.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Migrate", "src\Azure.ResourceManager.Migrate.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Migrate.Tests", "tests\Azure.ResourceManager.Migrate.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/CHANGELOG.md b/sdk/migrate/Azure.ResourceManager.Migrate/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/Directory.Build.props b/sdk/migrate/Azure.ResourceManager.Migrate/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/README.md b/sdk/migrate/Azure.ResourceManager.Migrate/README.md new file mode 100644 index 000000000000..63c311d9cf81 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure Migrate 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 Migrate management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.Migrate --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://learn.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/migrate/Azure.ResourceManager.Migrate/api/Azure.ResourceManager.Migrate.net8.0.cs b/sdk/migrate/Azure.ResourceManager.Migrate/api/Azure.ResourceManager.Migrate.net8.0.cs new file mode 100644 index 000000000000..2ca976931e2b --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/api/Azure.ResourceManager.Migrate.net8.0.cs @@ -0,0 +1,747 @@ +namespace Azure.ResourceManager.Migrate +{ + public partial class CompoundAssessmentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected CompoundAssessmentCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string compoundAssessmentName, Azure.ResourceManager.Migrate.CompoundAssessmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string compoundAssessmentName, Azure.ResourceManager.Migrate.CompoundAssessmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class CompoundAssessmentData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CompoundAssessmentData() { } + public Azure.ResourceManager.Migrate.Models.CompoundAssessmentProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.CompoundAssessmentData 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.Migrate.CompoundAssessmentData 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 CompoundAssessmentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected CompoundAssessmentResource() { } + public virtual Azure.ResourceManager.Migrate.CompoundAssessmentData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DownloadUrl(Azure.WaitUntil waitUntil, Azure.ResourceManager.Migrate.Models.DownloadUrlContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DownloadUrlAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Migrate.Models.DownloadUrlContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryCollection GetWebAppCompoundAssessmentSummaries() { throw null; } + public virtual Azure.Response GetWebAppCompoundAssessmentSummary(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWebAppCompoundAssessmentSummaryAsync(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Migrate.CompoundAssessmentData 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.Migrate.CompoundAssessmentData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Migrate.CompoundAssessmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Migrate.CompoundAssessmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class MigrateExtensions + { + public static Azure.Response GetCompoundAssessment(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string projectName, string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetCompoundAssessmentAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string projectName, string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Migrate.CompoundAssessmentResource GetCompoundAssessmentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Migrate.CompoundAssessmentCollection GetCompoundAssessments(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string projectName) { throw null; } + public static Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryResource GetWebAppCompoundAssessmentSummaryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class WebAppCompoundAssessmentSummaryCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WebAppCompoundAssessmentSummaryCollection() { } + public virtual Azure.Response Exists(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WebAppCompoundAssessmentSummaryData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebAppCompoundAssessmentSummaryData() { } + public Azure.ResourceManager.Migrate.Models.WebAppCompoundAssessmentSummaryProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryData 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.Migrate.WebAppCompoundAssessmentSummaryData 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 WebAppCompoundAssessmentSummaryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WebAppCompoundAssessmentSummaryResource() { } + public virtual Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, string summaryName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryData 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.Migrate.WebAppCompoundAssessmentSummaryData 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; } + } +} +namespace Azure.ResourceManager.Migrate.Mocking +{ + public partial class MockableMigrateArmClient : Azure.ResourceManager.ArmResource + { + protected MockableMigrateArmClient() { } + public virtual Azure.ResourceManager.Migrate.CompoundAssessmentResource GetCompoundAssessmentResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryResource GetWebAppCompoundAssessmentSummaryResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableMigrateResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableMigrateResourceGroupResource() { } + public virtual Azure.Response GetCompoundAssessment(string projectName, string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCompoundAssessmentAsync(string projectName, string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Migrate.CompoundAssessmentCollection GetCompoundAssessments(string projectName) { throw null; } + } +} +namespace Azure.ResourceManager.Migrate.Models +{ + public static partial class ArmMigrateModelFactory + { + public static Azure.ResourceManager.Migrate.CompoundAssessmentData CompoundAssessmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Migrate.Models.CompoundAssessmentProperties properties = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.CompoundAssessmentDetails CompoundAssessmentDetails(System.DateTimeOffset? createdTimestamp = default(System.DateTimeOffset?), System.DateTimeOffset? updatedTimestamp = default(System.DateTimeOffset?), Azure.ResourceManager.Migrate.Models.AssessmentStatus status = default(Azure.ResourceManager.Migrate.Models.AssessmentStatus)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.CompoundAssessmentProperties CompoundAssessmentProperties(Azure.ResourceManager.Migrate.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Migrate.Models.ProvisioningState?), Azure.ResourceManager.Migrate.Models.TargetAssessmentArmIds targetAssessmentArmIds = null, string fallbackMachineAssessmentArmId = null, Azure.ResourceManager.Migrate.Models.CompoundAssessmentDetails details = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.CostDetailsCommon CostDetailsCommon(Azure.ResourceManager.Migrate.Models.SavingsOption? savingOptions = default(Azure.ResourceManager.Migrate.Models.SavingsOption?), System.Collections.Generic.IEnumerable costDetail = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.DiscoveredLightSummary DiscoveredLightSummary(int numberOfWebApps = 0, System.Collections.Generic.IEnumerable numberOfWebAppsPerType = null, System.Collections.Generic.IEnumerable numberOfWebServersPerType = null, int numberOfWebServers = 0, int numberOfServers = 0) { throw null; } + public static Azure.ResourceManager.Migrate.Models.DownloadUri DownloadUri(string assessmentReportUri = null, System.DateTimeOffset expireOn = default(System.DateTimeOffset)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.ManagementDetails ManagementDetails(Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType? name = default(Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType?), System.Collections.Generic.IEnumerable readinessSummary = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.MigrationDetails MigrationDetails(System.Collections.Generic.IEnumerable readinessSummary = null, Azure.ResourceManager.Migrate.Models.MigrationType? migrationType = default(Azure.ResourceManager.Migrate.Models.MigrationType?)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.NameValuePairCloudSuitabilityCommon NameValuePairCloudSuitabilityCommon(Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon? name = default(Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon?), int? value = default(int?)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.NameValuePairCostType NameValuePairCostType(Azure.ResourceManager.Migrate.Models.CostType? name = default(Azure.ResourceManager.Migrate.Models.CostType?), float? value = default(float?)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.NameValuePairSavingsType NameValuePairSavingsType(Azure.ResourceManager.Migrate.Models.SavingsType? name = default(Azure.ResourceManager.Migrate.Models.SavingsType?), float? value = default(float?)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.SavingsDetailsCommon SavingsDetailsCommon(Azure.ResourceManager.Migrate.Models.SavingsOption? savingOptions = default(Azure.ResourceManager.Migrate.Models.SavingsOption?), System.Collections.Generic.IEnumerable savingsDetail = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.SourceDetails SourceDetails(Azure.ResourceManager.Migrate.Models.AssessmentSource? sourceName = default(Azure.ResourceManager.Migrate.Models.AssessmentSource?), Azure.ResourceManager.Migrate.Models.MigrateWorkloadType? sourceType = default(Azure.ResourceManager.Migrate.Models.MigrateWorkloadType?), Azure.ResourceManager.Migrate.Models.MigrationPlatform? platform = default(Azure.ResourceManager.Migrate.Models.MigrationPlatform?), int? count = default(int?)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.TargetDetails TargetDetails(Azure.ResourceManager.Migrate.Models.AzureTarget? targetName = default(Azure.ResourceManager.Migrate.Models.AzureTarget?), Azure.ResourceManager.Migrate.Models.MigrateWorkloadType? targetType = default(Azure.ResourceManager.Migrate.Models.MigrateWorkloadType?), Azure.ResourceManager.Migrate.Models.MigrationPlatform? platform = default(Azure.ResourceManager.Migrate.Models.MigrationPlatform?), int? count = default(int?)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.TargetSourcePair TargetSourcePair(Azure.ResourceManager.Migrate.Models.AssessmentSource? sourceRef = default(Azure.ResourceManager.Migrate.Models.AssessmentSource?), Azure.ResourceManager.Migrate.Models.AzureTarget? targetRef = default(Azure.ResourceManager.Migrate.Models.AzureTarget?), int? sourceCount = default(int?), int? targetCount = default(int?), Azure.ResourceManager.Migrate.Models.MigrationDetails migrationDetails = null, System.Collections.Generic.IEnumerable managementDetails = null, System.Collections.Generic.IEnumerable costDetails = null, System.Collections.Generic.IEnumerable savingsDetails = null, double? confidenceScore = default(double?)) { throw null; } + public static Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryData WebAppCompoundAssessmentSummaryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Migrate.Models.WebAppCompoundAssessmentSummaryProperties properties = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.WebAppCompoundAssessmentSummaryProperties WebAppCompoundAssessmentSummaryProperties(Azure.ResourceManager.Migrate.Models.SummaryType? summaryType = default(Azure.ResourceManager.Migrate.Models.SummaryType?), string summaryName = null, System.Collections.Generic.IEnumerable sources = null, System.Collections.Generic.IEnumerable targets = null, System.Collections.Generic.IEnumerable targetSourceMapping = null, System.Collections.Generic.IEnumerable costComponents = null, System.Collections.Generic.IEnumerable savingsComponents = null, string assessmentName = null, Azure.ResourceManager.Migrate.Models.DiscoveredLightSummary discoveredLightSummary = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.WebAppsPerType WebAppsPerType(Azure.ResourceManager.Migrate.Models.WebAppType webAppType = default(Azure.ResourceManager.Migrate.Models.WebAppType), int count = 0) { throw null; } + public static Azure.ResourceManager.Migrate.Models.WebServersPerType WebServersPerType(Azure.ResourceManager.Migrate.Models.WebServerType webServerType = default(Azure.ResourceManager.Migrate.Models.WebServerType), int count = 0) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AssessmentSource : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AssessmentSource(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource IIS { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource Machine { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource MySQLServer { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource OracleDatabase { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource OracleServer { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource SAPInstance { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource SpringbootApplication { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource SqlDatabase { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource SqlInstance { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource TomCat { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource Unknown { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource WebApps { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.AssessmentSource 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.ResourceManager.Migrate.Models.AssessmentSource left, Azure.ResourceManager.Migrate.Models.AssessmentSource right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.AssessmentSource (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.AssessmentSource left, Azure.ResourceManager.Migrate.Models.AssessmentSource right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AssessmentStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AssessmentStatus(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Completed { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Created { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Deleted { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Failed { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Invalid { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus OutDated { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus OutOfSync { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Running { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Updated { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.AssessmentStatus 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.ResourceManager.Migrate.Models.AssessmentStatus left, Azure.ResourceManager.Migrate.Models.AssessmentStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.AssessmentStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.AssessmentStatus left, Azure.ResourceManager.Migrate.Models.AssessmentStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AzureManagementOfferingType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AzureManagementOfferingType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType AUM { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType AzMon { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType AzureBackup { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType No { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType SCOMMI { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType 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.ResourceManager.Migrate.Models.AzureManagementOfferingType left, Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType left, Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AzureTarget : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AzureTarget(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.AzureTarget AKS { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget Avs { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget AzureAppService { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget AzureAppServiceContainer { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget AzureSpringApps { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget AzureSQLVM { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget AzureVm { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget FlexServerPG { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget MySQLAzureFlexServer { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget OracleIaasVm { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget SAPAzureInstance { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget SqlDatabase { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget SqlMI { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.AzureTarget 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.ResourceManager.Migrate.Models.AzureTarget left, Azure.ResourceManager.Migrate.Models.AzureTarget right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.AzureTarget (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.AzureTarget left, Azure.ResourceManager.Migrate.Models.AzureTarget right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CloudSuitabilityCommon : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CloudSuitabilityCommon(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon ConditionallySuitable { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon NotSuitable { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon ReadinessUnknown { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon Suitable { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon SuitableWithWarnings { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon 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.ResourceManager.Migrate.Models.CloudSuitabilityCommon left, Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon left, Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CompoundAssessmentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CompoundAssessmentDetails() { } + public System.DateTimeOffset? CreatedTimestamp { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.AssessmentStatus Status { get { throw null; } } + public System.DateTimeOffset? UpdatedTimestamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.CompoundAssessmentDetails 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.Migrate.Models.CompoundAssessmentDetails 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 CompoundAssessmentProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CompoundAssessmentProperties(Azure.ResourceManager.Migrate.Models.TargetAssessmentArmIds targetAssessmentArmIds) { } + public Azure.ResourceManager.Migrate.Models.CompoundAssessmentDetails Details { get { throw null; } } + public string FallbackMachineAssessmentArmId { get { throw null; } set { } } + public Azure.ResourceManager.Migrate.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.TargetAssessmentArmIds TargetAssessmentArmIds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.CompoundAssessmentProperties 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.Migrate.Models.CompoundAssessmentProperties 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 CostDetailsCommon : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CostDetailsCommon() { } + public System.Collections.Generic.IReadOnlyList CostDetail { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.SavingsOption? SavingOptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.CostDetailsCommon 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.Migrate.Models.CostDetailsCommon 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CostType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CostType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.CostType DataProtectionService { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonitoringService { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyAvsExternalStorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyAvsNetworkCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyAvsNodeCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyAzureHybridCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyBandwidthCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyComputeCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyLicensingCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyLinuxAzureHybridCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyManagementCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyPremiumStorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyPremiumV2StorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlySecurityCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyStandardHddStorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyStandardSsdStorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyStorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyUltraDiskCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyUltraStorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType PatchingService { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType TotalMonthlyCost { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.CostType 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.ResourceManager.Migrate.Models.CostType left, Azure.ResourceManager.Migrate.Models.CostType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.CostType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.CostType left, Azure.ResourceManager.Migrate.Models.CostType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DiscoveredLightSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DiscoveredLightSummary() { } + public int NumberOfServers { get { throw null; } } + public int NumberOfWebApps { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NumberOfWebAppsPerType { get { throw null; } } + public int NumberOfWebServers { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NumberOfWebServersPerType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.DiscoveredLightSummary 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.Migrate.Models.DiscoveredLightSummary 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 DownloadUri : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DownloadUri() { } + public string AssessmentReportUri { get { throw null; } } + public System.DateTimeOffset ExpireOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.DownloadUri 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.Migrate.Models.DownloadUri 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 DownloadUrlContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DownloadUrlContent() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.DownloadUrlContent 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.Migrate.Models.DownloadUrlContent 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 ManagementDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ManagementDetails() { } + public Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType? Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ReadinessSummary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.ManagementDetails 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.Migrate.Models.ManagementDetails 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MigrateWorkloadType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MigrateWorkloadType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType Database { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType Host { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType Instance { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType Machine { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType ManagementServer { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType Server { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType Unknown { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType WebApplication { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType WebServer { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.MigrateWorkloadType 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.ResourceManager.Migrate.Models.MigrateWorkloadType left, Azure.ResourceManager.Migrate.Models.MigrateWorkloadType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.MigrateWorkloadType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.MigrateWorkloadType left, Azure.ResourceManager.Migrate.Models.MigrateWorkloadType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MigrationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MigrationDetails() { } + public Azure.ResourceManager.Migrate.Models.MigrationType? MigrationType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ReadinessSummary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.MigrationDetails 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.Migrate.Models.MigrationDetails 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MigrationPlatform : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MigrationPlatform(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.MigrationPlatform IaaS { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationPlatform PaaS { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationPlatform SaaS { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationPlatform Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.MigrationPlatform 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.ResourceManager.Migrate.Models.MigrationPlatform left, Azure.ResourceManager.Migrate.Models.MigrationPlatform right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.MigrationPlatform (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.MigrationPlatform left, Azure.ResourceManager.Migrate.Models.MigrationPlatform right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MigrationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MigrationType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.MigrationType Rearchitect { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationType Rehost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationType Replatform { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationType Retain { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationType Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.MigrationType 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.ResourceManager.Migrate.Models.MigrationType left, Azure.ResourceManager.Migrate.Models.MigrationType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.MigrationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.MigrationType left, Azure.ResourceManager.Migrate.Models.MigrationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NameValuePairCloudSuitabilityCommon : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NameValuePairCloudSuitabilityCommon() { } + public Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon? Name { get { throw null; } } + public int? Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.NameValuePairCloudSuitabilityCommon 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.Migrate.Models.NameValuePairCloudSuitabilityCommon 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 NameValuePairCostType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NameValuePairCostType() { } + public Azure.ResourceManager.Migrate.Models.CostType? Name { get { throw null; } } + public float? Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.NameValuePairCostType 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.Migrate.Models.NameValuePairCostType 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 NameValuePairSavingsType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NameValuePairSavingsType() { } + public Azure.ResourceManager.Migrate.Models.SavingsType? Name { get { throw null; } } + public float? Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.NameValuePairSavingsType 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.Migrate.Models.NameValuePairSavingsType 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.ProvisioningState 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.ResourceManager.Migrate.Models.ProvisioningState left, Azure.ResourceManager.Migrate.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.ProvisioningState left, Azure.ResourceManager.Migrate.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SavingsDetailsCommon : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SavingsDetailsCommon() { } + public Azure.ResourceManager.Migrate.Models.SavingsOption? SavingOptions { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SavingsDetail { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.SavingsDetailsCommon 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.Migrate.Models.SavingsDetailsCommon 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SavingsOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SavingsOption(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.SavingsOption CustomAzureOfferCode { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsOption None { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsOption RI1Year { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsOption RI3Year { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsOption SavingsPlan1Year { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsOption SavingsPlan3Year { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.SavingsOption 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.ResourceManager.Migrate.Models.SavingsOption left, Azure.ResourceManager.Migrate.Models.SavingsOption right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.SavingsOption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.SavingsOption left, Azure.ResourceManager.Migrate.Models.SavingsOption right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SavingsType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SavingsType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.SavingsType MonthlyAhubSqlCostSavings { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsType MonthlyAzureHybridCostSavings { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsType MonthlyLinuxAzureHybridCostSavings { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsType MonthlyVcfByolCostDifference { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.SavingsType 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.ResourceManager.Migrate.Models.SavingsType left, Azure.ResourceManager.Migrate.Models.SavingsType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.SavingsType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.SavingsType left, Azure.ResourceManager.Migrate.Models.SavingsType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SourceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SourceDetails() { } + public int? Count { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.MigrationPlatform? Platform { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.AssessmentSource? SourceName { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.MigrateWorkloadType? SourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.SourceDetails 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.Migrate.Models.SourceDetails 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SummaryType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SummaryType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.SummaryType Strategy { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SummaryType Target { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SummaryType Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.SummaryType 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.ResourceManager.Migrate.Models.SummaryType left, Azure.ResourceManager.Migrate.Models.SummaryType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.SummaryType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.SummaryType left, Azure.ResourceManager.Migrate.Models.SummaryType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TargetAssessmentArmIds : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TargetAssessmentArmIds() { } + public string Aks { get { throw null; } set { } } + public string AzureAppService { get { throw null; } set { } } + public string AzureAppServiceContainer { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.TargetAssessmentArmIds 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.Migrate.Models.TargetAssessmentArmIds 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 TargetDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TargetDetails() { } + public int? Count { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.MigrationPlatform? Platform { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.AzureTarget? TargetName { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.MigrateWorkloadType? TargetType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.TargetDetails 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.Migrate.Models.TargetDetails 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 TargetSourcePair : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TargetSourcePair() { } + public double? ConfidenceScore { get { throw null; } } + public System.Collections.Generic.IReadOnlyList CostDetails { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ManagementDetails { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.MigrationDetails MigrationDetails { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SavingsDetails { get { throw null; } } + public int? SourceCount { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.AssessmentSource? SourceRef { get { throw null; } } + public int? TargetCount { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.AzureTarget? TargetRef { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.TargetSourcePair 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.Migrate.Models.TargetSourcePair 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 WebAppCompoundAssessmentSummaryProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebAppCompoundAssessmentSummaryProperties() { } + public string AssessmentName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList CostComponents { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.DiscoveredLightSummary DiscoveredLightSummary { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SavingsComponents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + public string SummaryName { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.SummaryType? SummaryType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Targets { get { throw null; } } + public System.Collections.Generic.IReadOnlyList TargetSourceMapping { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.WebAppCompoundAssessmentSummaryProperties 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.Migrate.Models.WebAppCompoundAssessmentSummaryProperties 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 WebAppsPerType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebAppsPerType() { } + public int Count { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.WebAppType WebAppType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.WebAppsPerType 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.Migrate.Models.WebAppsPerType 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WebAppType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WebAppType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.WebAppType ASPNET { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.WebAppType Java { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.WebAppType Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.WebAppType 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.ResourceManager.Migrate.Models.WebAppType left, Azure.ResourceManager.Migrate.Models.WebAppType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.WebAppType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.WebAppType left, Azure.ResourceManager.Migrate.Models.WebAppType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WebServersPerType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebServersPerType() { } + public int Count { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.WebServerType WebServerType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.WebServersPerType 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.Migrate.Models.WebServersPerType 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WebServerType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WebServerType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.WebServerType IIS { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.WebServerType Tomcat { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.WebServerType Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.WebServerType 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.ResourceManager.Migrate.Models.WebServerType left, Azure.ResourceManager.Migrate.Models.WebServerType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.WebServerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.WebServerType left, Azure.ResourceManager.Migrate.Models.WebServerType right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/api/Azure.ResourceManager.Migrate.netstandard2.0.cs b/sdk/migrate/Azure.ResourceManager.Migrate/api/Azure.ResourceManager.Migrate.netstandard2.0.cs new file mode 100644 index 000000000000..2ca976931e2b --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/api/Azure.ResourceManager.Migrate.netstandard2.0.cs @@ -0,0 +1,747 @@ +namespace Azure.ResourceManager.Migrate +{ + public partial class CompoundAssessmentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected CompoundAssessmentCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string compoundAssessmentName, Azure.ResourceManager.Migrate.CompoundAssessmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string compoundAssessmentName, Azure.ResourceManager.Migrate.CompoundAssessmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class CompoundAssessmentData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CompoundAssessmentData() { } + public Azure.ResourceManager.Migrate.Models.CompoundAssessmentProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.CompoundAssessmentData 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.Migrate.CompoundAssessmentData 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 CompoundAssessmentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected CompoundAssessmentResource() { } + public virtual Azure.ResourceManager.Migrate.CompoundAssessmentData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DownloadUrl(Azure.WaitUntil waitUntil, Azure.ResourceManager.Migrate.Models.DownloadUrlContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DownloadUrlAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Migrate.Models.DownloadUrlContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryCollection GetWebAppCompoundAssessmentSummaries() { throw null; } + public virtual Azure.Response GetWebAppCompoundAssessmentSummary(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWebAppCompoundAssessmentSummaryAsync(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Migrate.CompoundAssessmentData 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.Migrate.CompoundAssessmentData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Migrate.CompoundAssessmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Migrate.CompoundAssessmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class MigrateExtensions + { + public static Azure.Response GetCompoundAssessment(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string projectName, string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetCompoundAssessmentAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string projectName, string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Migrate.CompoundAssessmentResource GetCompoundAssessmentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Migrate.CompoundAssessmentCollection GetCompoundAssessments(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string projectName) { throw null; } + public static Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryResource GetWebAppCompoundAssessmentSummaryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class WebAppCompoundAssessmentSummaryCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WebAppCompoundAssessmentSummaryCollection() { } + public virtual Azure.Response Exists(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string summaryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WebAppCompoundAssessmentSummaryData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebAppCompoundAssessmentSummaryData() { } + public Azure.ResourceManager.Migrate.Models.WebAppCompoundAssessmentSummaryProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryData 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.Migrate.WebAppCompoundAssessmentSummaryData 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 WebAppCompoundAssessmentSummaryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WebAppCompoundAssessmentSummaryResource() { } + public virtual Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, string summaryName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryData 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.Migrate.WebAppCompoundAssessmentSummaryData 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; } + } +} +namespace Azure.ResourceManager.Migrate.Mocking +{ + public partial class MockableMigrateArmClient : Azure.ResourceManager.ArmResource + { + protected MockableMigrateArmClient() { } + public virtual Azure.ResourceManager.Migrate.CompoundAssessmentResource GetCompoundAssessmentResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryResource GetWebAppCompoundAssessmentSummaryResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableMigrateResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableMigrateResourceGroupResource() { } + public virtual Azure.Response GetCompoundAssessment(string projectName, string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCompoundAssessmentAsync(string projectName, string compoundAssessmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Migrate.CompoundAssessmentCollection GetCompoundAssessments(string projectName) { throw null; } + } +} +namespace Azure.ResourceManager.Migrate.Models +{ + public static partial class ArmMigrateModelFactory + { + public static Azure.ResourceManager.Migrate.CompoundAssessmentData CompoundAssessmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Migrate.Models.CompoundAssessmentProperties properties = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.CompoundAssessmentDetails CompoundAssessmentDetails(System.DateTimeOffset? createdTimestamp = default(System.DateTimeOffset?), System.DateTimeOffset? updatedTimestamp = default(System.DateTimeOffset?), Azure.ResourceManager.Migrate.Models.AssessmentStatus status = default(Azure.ResourceManager.Migrate.Models.AssessmentStatus)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.CompoundAssessmentProperties CompoundAssessmentProperties(Azure.ResourceManager.Migrate.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Migrate.Models.ProvisioningState?), Azure.ResourceManager.Migrate.Models.TargetAssessmentArmIds targetAssessmentArmIds = null, string fallbackMachineAssessmentArmId = null, Azure.ResourceManager.Migrate.Models.CompoundAssessmentDetails details = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.CostDetailsCommon CostDetailsCommon(Azure.ResourceManager.Migrate.Models.SavingsOption? savingOptions = default(Azure.ResourceManager.Migrate.Models.SavingsOption?), System.Collections.Generic.IEnumerable costDetail = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.DiscoveredLightSummary DiscoveredLightSummary(int numberOfWebApps = 0, System.Collections.Generic.IEnumerable numberOfWebAppsPerType = null, System.Collections.Generic.IEnumerable numberOfWebServersPerType = null, int numberOfWebServers = 0, int numberOfServers = 0) { throw null; } + public static Azure.ResourceManager.Migrate.Models.DownloadUri DownloadUri(string assessmentReportUri = null, System.DateTimeOffset expireOn = default(System.DateTimeOffset)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.ManagementDetails ManagementDetails(Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType? name = default(Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType?), System.Collections.Generic.IEnumerable readinessSummary = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.MigrationDetails MigrationDetails(System.Collections.Generic.IEnumerable readinessSummary = null, Azure.ResourceManager.Migrate.Models.MigrationType? migrationType = default(Azure.ResourceManager.Migrate.Models.MigrationType?)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.NameValuePairCloudSuitabilityCommon NameValuePairCloudSuitabilityCommon(Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon? name = default(Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon?), int? value = default(int?)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.NameValuePairCostType NameValuePairCostType(Azure.ResourceManager.Migrate.Models.CostType? name = default(Azure.ResourceManager.Migrate.Models.CostType?), float? value = default(float?)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.NameValuePairSavingsType NameValuePairSavingsType(Azure.ResourceManager.Migrate.Models.SavingsType? name = default(Azure.ResourceManager.Migrate.Models.SavingsType?), float? value = default(float?)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.SavingsDetailsCommon SavingsDetailsCommon(Azure.ResourceManager.Migrate.Models.SavingsOption? savingOptions = default(Azure.ResourceManager.Migrate.Models.SavingsOption?), System.Collections.Generic.IEnumerable savingsDetail = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.SourceDetails SourceDetails(Azure.ResourceManager.Migrate.Models.AssessmentSource? sourceName = default(Azure.ResourceManager.Migrate.Models.AssessmentSource?), Azure.ResourceManager.Migrate.Models.MigrateWorkloadType? sourceType = default(Azure.ResourceManager.Migrate.Models.MigrateWorkloadType?), Azure.ResourceManager.Migrate.Models.MigrationPlatform? platform = default(Azure.ResourceManager.Migrate.Models.MigrationPlatform?), int? count = default(int?)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.TargetDetails TargetDetails(Azure.ResourceManager.Migrate.Models.AzureTarget? targetName = default(Azure.ResourceManager.Migrate.Models.AzureTarget?), Azure.ResourceManager.Migrate.Models.MigrateWorkloadType? targetType = default(Azure.ResourceManager.Migrate.Models.MigrateWorkloadType?), Azure.ResourceManager.Migrate.Models.MigrationPlatform? platform = default(Azure.ResourceManager.Migrate.Models.MigrationPlatform?), int? count = default(int?)) { throw null; } + public static Azure.ResourceManager.Migrate.Models.TargetSourcePair TargetSourcePair(Azure.ResourceManager.Migrate.Models.AssessmentSource? sourceRef = default(Azure.ResourceManager.Migrate.Models.AssessmentSource?), Azure.ResourceManager.Migrate.Models.AzureTarget? targetRef = default(Azure.ResourceManager.Migrate.Models.AzureTarget?), int? sourceCount = default(int?), int? targetCount = default(int?), Azure.ResourceManager.Migrate.Models.MigrationDetails migrationDetails = null, System.Collections.Generic.IEnumerable managementDetails = null, System.Collections.Generic.IEnumerable costDetails = null, System.Collections.Generic.IEnumerable savingsDetails = null, double? confidenceScore = default(double?)) { throw null; } + public static Azure.ResourceManager.Migrate.WebAppCompoundAssessmentSummaryData WebAppCompoundAssessmentSummaryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Migrate.Models.WebAppCompoundAssessmentSummaryProperties properties = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.WebAppCompoundAssessmentSummaryProperties WebAppCompoundAssessmentSummaryProperties(Azure.ResourceManager.Migrate.Models.SummaryType? summaryType = default(Azure.ResourceManager.Migrate.Models.SummaryType?), string summaryName = null, System.Collections.Generic.IEnumerable sources = null, System.Collections.Generic.IEnumerable targets = null, System.Collections.Generic.IEnumerable targetSourceMapping = null, System.Collections.Generic.IEnumerable costComponents = null, System.Collections.Generic.IEnumerable savingsComponents = null, string assessmentName = null, Azure.ResourceManager.Migrate.Models.DiscoveredLightSummary discoveredLightSummary = null) { throw null; } + public static Azure.ResourceManager.Migrate.Models.WebAppsPerType WebAppsPerType(Azure.ResourceManager.Migrate.Models.WebAppType webAppType = default(Azure.ResourceManager.Migrate.Models.WebAppType), int count = 0) { throw null; } + public static Azure.ResourceManager.Migrate.Models.WebServersPerType WebServersPerType(Azure.ResourceManager.Migrate.Models.WebServerType webServerType = default(Azure.ResourceManager.Migrate.Models.WebServerType), int count = 0) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AssessmentSource : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AssessmentSource(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource IIS { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource Machine { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource MySQLServer { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource OracleDatabase { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource OracleServer { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource SAPInstance { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource SpringbootApplication { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource SqlDatabase { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource SqlInstance { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource TomCat { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource Unknown { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentSource WebApps { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.AssessmentSource 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.ResourceManager.Migrate.Models.AssessmentSource left, Azure.ResourceManager.Migrate.Models.AssessmentSource right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.AssessmentSource (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.AssessmentSource left, Azure.ResourceManager.Migrate.Models.AssessmentSource right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AssessmentStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AssessmentStatus(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Completed { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Created { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Deleted { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Failed { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Invalid { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus OutDated { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus OutOfSync { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Running { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AssessmentStatus Updated { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.AssessmentStatus 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.ResourceManager.Migrate.Models.AssessmentStatus left, Azure.ResourceManager.Migrate.Models.AssessmentStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.AssessmentStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.AssessmentStatus left, Azure.ResourceManager.Migrate.Models.AssessmentStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AzureManagementOfferingType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AzureManagementOfferingType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType AUM { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType AzMon { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType AzureBackup { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType No { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType SCOMMI { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType 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.ResourceManager.Migrate.Models.AzureManagementOfferingType left, Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType left, Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AzureTarget : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AzureTarget(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.AzureTarget AKS { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget Avs { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget AzureAppService { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget AzureAppServiceContainer { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget AzureSpringApps { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget AzureSQLVM { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget AzureVm { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget FlexServerPG { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget MySQLAzureFlexServer { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget OracleIaasVm { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget SAPAzureInstance { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget SqlDatabase { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget SqlMI { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.AzureTarget Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.AzureTarget 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.ResourceManager.Migrate.Models.AzureTarget left, Azure.ResourceManager.Migrate.Models.AzureTarget right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.AzureTarget (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.AzureTarget left, Azure.ResourceManager.Migrate.Models.AzureTarget right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CloudSuitabilityCommon : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CloudSuitabilityCommon(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon ConditionallySuitable { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon NotSuitable { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon ReadinessUnknown { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon Suitable { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon SuitableWithWarnings { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon 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.ResourceManager.Migrate.Models.CloudSuitabilityCommon left, Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon left, Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CompoundAssessmentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CompoundAssessmentDetails() { } + public System.DateTimeOffset? CreatedTimestamp { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.AssessmentStatus Status { get { throw null; } } + public System.DateTimeOffset? UpdatedTimestamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.CompoundAssessmentDetails 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.Migrate.Models.CompoundAssessmentDetails 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 CompoundAssessmentProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CompoundAssessmentProperties(Azure.ResourceManager.Migrate.Models.TargetAssessmentArmIds targetAssessmentArmIds) { } + public Azure.ResourceManager.Migrate.Models.CompoundAssessmentDetails Details { get { throw null; } } + public string FallbackMachineAssessmentArmId { get { throw null; } set { } } + public Azure.ResourceManager.Migrate.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.TargetAssessmentArmIds TargetAssessmentArmIds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.CompoundAssessmentProperties 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.Migrate.Models.CompoundAssessmentProperties 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 CostDetailsCommon : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CostDetailsCommon() { } + public System.Collections.Generic.IReadOnlyList CostDetail { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.SavingsOption? SavingOptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.CostDetailsCommon 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.Migrate.Models.CostDetailsCommon 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CostType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CostType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.CostType DataProtectionService { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonitoringService { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyAvsExternalStorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyAvsNetworkCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyAvsNodeCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyAzureHybridCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyBandwidthCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyComputeCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyLicensingCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyLinuxAzureHybridCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyManagementCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyPremiumStorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyPremiumV2StorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlySecurityCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyStandardHddStorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyStandardSsdStorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyStorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyUltraDiskCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType MonthlyUltraStorageCost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType PatchingService { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.CostType TotalMonthlyCost { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.CostType 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.ResourceManager.Migrate.Models.CostType left, Azure.ResourceManager.Migrate.Models.CostType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.CostType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.CostType left, Azure.ResourceManager.Migrate.Models.CostType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DiscoveredLightSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DiscoveredLightSummary() { } + public int NumberOfServers { get { throw null; } } + public int NumberOfWebApps { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NumberOfWebAppsPerType { get { throw null; } } + public int NumberOfWebServers { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NumberOfWebServersPerType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.DiscoveredLightSummary 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.Migrate.Models.DiscoveredLightSummary 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 DownloadUri : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DownloadUri() { } + public string AssessmentReportUri { get { throw null; } } + public System.DateTimeOffset ExpireOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.DownloadUri 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.Migrate.Models.DownloadUri 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 DownloadUrlContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DownloadUrlContent() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.DownloadUrlContent 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.Migrate.Models.DownloadUrlContent 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 ManagementDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ManagementDetails() { } + public Azure.ResourceManager.Migrate.Models.AzureManagementOfferingType? Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ReadinessSummary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.ManagementDetails 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.Migrate.Models.ManagementDetails 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MigrateWorkloadType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MigrateWorkloadType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType Database { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType Host { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType Instance { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType Machine { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType ManagementServer { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType Server { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType Unknown { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType WebApplication { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrateWorkloadType WebServer { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.MigrateWorkloadType 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.ResourceManager.Migrate.Models.MigrateWorkloadType left, Azure.ResourceManager.Migrate.Models.MigrateWorkloadType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.MigrateWorkloadType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.MigrateWorkloadType left, Azure.ResourceManager.Migrate.Models.MigrateWorkloadType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MigrationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MigrationDetails() { } + public Azure.ResourceManager.Migrate.Models.MigrationType? MigrationType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ReadinessSummary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.MigrationDetails 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.Migrate.Models.MigrationDetails 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MigrationPlatform : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MigrationPlatform(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.MigrationPlatform IaaS { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationPlatform PaaS { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationPlatform SaaS { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationPlatform Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.MigrationPlatform 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.ResourceManager.Migrate.Models.MigrationPlatform left, Azure.ResourceManager.Migrate.Models.MigrationPlatform right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.MigrationPlatform (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.MigrationPlatform left, Azure.ResourceManager.Migrate.Models.MigrationPlatform right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MigrationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MigrationType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.MigrationType Rearchitect { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationType Rehost { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationType Replatform { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationType Retain { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.MigrationType Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.MigrationType 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.ResourceManager.Migrate.Models.MigrationType left, Azure.ResourceManager.Migrate.Models.MigrationType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.MigrationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.MigrationType left, Azure.ResourceManager.Migrate.Models.MigrationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NameValuePairCloudSuitabilityCommon : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NameValuePairCloudSuitabilityCommon() { } + public Azure.ResourceManager.Migrate.Models.CloudSuitabilityCommon? Name { get { throw null; } } + public int? Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.NameValuePairCloudSuitabilityCommon 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.Migrate.Models.NameValuePairCloudSuitabilityCommon 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 NameValuePairCostType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NameValuePairCostType() { } + public Azure.ResourceManager.Migrate.Models.CostType? Name { get { throw null; } } + public float? Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.NameValuePairCostType 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.Migrate.Models.NameValuePairCostType 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 NameValuePairSavingsType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NameValuePairSavingsType() { } + public Azure.ResourceManager.Migrate.Models.SavingsType? Name { get { throw null; } } + public float? Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.NameValuePairSavingsType 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.Migrate.Models.NameValuePairSavingsType 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.ProvisioningState 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.ResourceManager.Migrate.Models.ProvisioningState left, Azure.ResourceManager.Migrate.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.ProvisioningState left, Azure.ResourceManager.Migrate.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SavingsDetailsCommon : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SavingsDetailsCommon() { } + public Azure.ResourceManager.Migrate.Models.SavingsOption? SavingOptions { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SavingsDetail { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.SavingsDetailsCommon 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.Migrate.Models.SavingsDetailsCommon 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SavingsOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SavingsOption(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.SavingsOption CustomAzureOfferCode { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsOption None { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsOption RI1Year { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsOption RI3Year { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsOption SavingsPlan1Year { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsOption SavingsPlan3Year { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.SavingsOption 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.ResourceManager.Migrate.Models.SavingsOption left, Azure.ResourceManager.Migrate.Models.SavingsOption right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.SavingsOption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.SavingsOption left, Azure.ResourceManager.Migrate.Models.SavingsOption right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SavingsType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SavingsType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.SavingsType MonthlyAhubSqlCostSavings { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsType MonthlyAzureHybridCostSavings { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsType MonthlyLinuxAzureHybridCostSavings { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SavingsType MonthlyVcfByolCostDifference { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.SavingsType 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.ResourceManager.Migrate.Models.SavingsType left, Azure.ResourceManager.Migrate.Models.SavingsType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.SavingsType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.SavingsType left, Azure.ResourceManager.Migrate.Models.SavingsType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SourceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SourceDetails() { } + public int? Count { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.MigrationPlatform? Platform { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.AssessmentSource? SourceName { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.MigrateWorkloadType? SourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.SourceDetails 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.Migrate.Models.SourceDetails 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SummaryType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SummaryType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.SummaryType Strategy { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SummaryType Target { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.SummaryType Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.SummaryType 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.ResourceManager.Migrate.Models.SummaryType left, Azure.ResourceManager.Migrate.Models.SummaryType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.SummaryType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.SummaryType left, Azure.ResourceManager.Migrate.Models.SummaryType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TargetAssessmentArmIds : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TargetAssessmentArmIds() { } + public string Aks { get { throw null; } set { } } + public string AzureAppService { get { throw null; } set { } } + public string AzureAppServiceContainer { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.TargetAssessmentArmIds 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.Migrate.Models.TargetAssessmentArmIds 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 TargetDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TargetDetails() { } + public int? Count { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.MigrationPlatform? Platform { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.AzureTarget? TargetName { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.MigrateWorkloadType? TargetType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.TargetDetails 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.Migrate.Models.TargetDetails 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 TargetSourcePair : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TargetSourcePair() { } + public double? ConfidenceScore { get { throw null; } } + public System.Collections.Generic.IReadOnlyList CostDetails { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ManagementDetails { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.MigrationDetails MigrationDetails { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SavingsDetails { get { throw null; } } + public int? SourceCount { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.AssessmentSource? SourceRef { get { throw null; } } + public int? TargetCount { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.AzureTarget? TargetRef { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.TargetSourcePair 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.Migrate.Models.TargetSourcePair 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 WebAppCompoundAssessmentSummaryProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebAppCompoundAssessmentSummaryProperties() { } + public string AssessmentName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList CostComponents { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.DiscoveredLightSummary DiscoveredLightSummary { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SavingsComponents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + public string SummaryName { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.SummaryType? SummaryType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Targets { get { throw null; } } + public System.Collections.Generic.IReadOnlyList TargetSourceMapping { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.WebAppCompoundAssessmentSummaryProperties 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.Migrate.Models.WebAppCompoundAssessmentSummaryProperties 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 WebAppsPerType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebAppsPerType() { } + public int Count { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.WebAppType WebAppType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.WebAppsPerType 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.Migrate.Models.WebAppsPerType 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WebAppType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WebAppType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.WebAppType ASPNET { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.WebAppType Java { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.WebAppType Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.WebAppType 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.ResourceManager.Migrate.Models.WebAppType left, Azure.ResourceManager.Migrate.Models.WebAppType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.WebAppType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.WebAppType left, Azure.ResourceManager.Migrate.Models.WebAppType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WebServersPerType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebServersPerType() { } + public int Count { get { throw null; } } + public Azure.ResourceManager.Migrate.Models.WebServerType WebServerType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Migrate.Models.WebServersPerType 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.Migrate.Models.WebServersPerType 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WebServerType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WebServerType(string value) { throw null; } + public static Azure.ResourceManager.Migrate.Models.WebServerType IIS { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.WebServerType Tomcat { get { throw null; } } + public static Azure.ResourceManager.Migrate.Models.WebServerType Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Migrate.Models.WebServerType 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.ResourceManager.Migrate.Models.WebServerType left, Azure.ResourceManager.Migrate.Models.WebServerType right) { throw null; } + public static implicit operator Azure.ResourceManager.Migrate.Models.WebServerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Migrate.Models.WebServerType left, Azure.ResourceManager.Migrate.Models.WebServerType right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/assets.json b/sdk/migrate/Azure.ResourceManager.Migrate/assets.json new file mode 100644 index 000000000000..7eb82a025442 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/migrate/Azure.ResourceManager.Migrate", + "Tag": "" +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Azure.ResourceManager.Migrate.Samples.csproj b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Azure.ResourceManager.Migrate.Samples.csproj new file mode 100644 index 000000000000..c8b72c599c4a --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Azure.ResourceManager.Migrate.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSAssessmentCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSAssessmentCollection.cs new file mode 100644 index 000000000000..455c4015ef33 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSAssessmentCollection.cs @@ -0,0 +1,235 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AKSAssessmentCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_AksAssessmentOperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksAssessmentOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessment_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AKSAssessmentResource + string projectName = "testProject"; + AKSAssessmentCollection collection = resourceGroupResource.GetAKSAssessments(projectName); + + // invoke the operation + string assessmentName = "testaksassessment"; + AKSAssessmentData data = new AKSAssessmentData + { + Properties = new AKSAssessmentProperties + { + Scope = new Scope + { + ScopeType = ScopeType.ServerGroupId, + ServerGroupId = "this-will-be-a-valid-arm-id", + AzureResourceGraphQuery = "zyhczkubwaqjqrmyithugmedmtdjxb", + }, + Settings = new AKSAssessmentSettings(AzureVmCategory.All, ConsolidationType.Full, PricingTier.Standard) + { + AzureLocation = "EastUS", + Currency = AzureCurrency.USD, + ScalingFactor = 20F, + DiscountPercentage = 14F, + SizingCriterion = AssessmentSizingCriterion.PerformanceBased, + PerformanceData = new PerformanceData + { + Percentile = new Percentile("Unknown"), + TimeRange = TimeRange.Day, + PerfDataStartOn = DateTimeOffset.Parse("2025-02-14T07:09:09.242Z"), + PerfDataEndOn = DateTimeOffset.Parse("2025-02-14T07:09:09.242Z"), + }, + SavingsSettings = new SavingsSettings + { + SavingsOptions = SavingsOption.None, + AzureOfferCode = AzureOffer.Unknown, + }, + BillingSettings = new BillingSettings + { + LicensingProgram = LicensingProgram.EA, + SubscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56", + }, + EnvironmentType = EnvironmentType.Production, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, assessmentName, data); + AKSAssessmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AksAssessmentOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksAssessmentOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessment_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AKSAssessmentResource + string projectName = "testProject"; + AKSAssessmentCollection collection = resourceGroupResource.GetAKSAssessments(projectName); + + // invoke the operation + string assessmentName = "testaksassessment"; + AKSAssessmentResource result = await collection.GetAsync(assessmentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AksAssessmentOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksAssessmentOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessment_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AKSAssessmentResource + string projectName = "testProject"; + AKSAssessmentCollection collection = resourceGroupResource.GetAKSAssessments(projectName); + + // invoke the operation and iterate over the result + await foreach (AKSAssessmentResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSAssessmentData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AksAssessmentOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksAssessmentOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessment_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AKSAssessmentResource + string projectName = "testProject"; + AKSAssessmentCollection collection = resourceGroupResource.GetAKSAssessments(projectName); + + // invoke the operation + string assessmentName = "testaksassessment"; + bool result = await collection.ExistsAsync(assessmentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AksAssessmentOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksAssessmentOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessment_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AKSAssessmentResource + string projectName = "testProject"; + AKSAssessmentCollection collection = resourceGroupResource.GetAKSAssessments(projectName); + + // invoke the operation + string assessmentName = "testaksassessment"; + NullableResponse response = await collection.GetIfExistsAsync(assessmentName); + AKSAssessmentResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSAssessmentOptionCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSAssessmentOptionCollection.cs new file mode 100644 index 000000000000..e57c79db8108 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSAssessmentOptionCollection.cs @@ -0,0 +1,161 @@ +// 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; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AKSAssessmentOptionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AksOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AKSAssessmentOptionResource + string projectName = "testProject"; + AKSAssessmentOptionCollection collection = resourceGroupResource.GetAKSAssessmentOptions(projectName); + + // invoke the operation + string assessmentOptionsName = "default"; + AKSAssessmentOptionResource result = await collection.GetAsync(assessmentOptionsName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AksOptionsOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksOptionsOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessmentOptions_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AKSAssessmentOptionResource + string projectName = "testProject"; + AKSAssessmentOptionCollection collection = resourceGroupResource.GetAKSAssessmentOptions(projectName); + + // invoke the operation and iterate over the result + await foreach (AKSAssessmentOptionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSAssessmentOptionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AksOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AKSAssessmentOptionResource + string projectName = "testProject"; + AKSAssessmentOptionCollection collection = resourceGroupResource.GetAKSAssessmentOptions(projectName); + + // invoke the operation + string assessmentOptionsName = "default"; + bool result = await collection.ExistsAsync(assessmentOptionsName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AksOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AKSAssessmentOptionResource + string projectName = "testProject"; + AKSAssessmentOptionCollection collection = resourceGroupResource.GetAKSAssessmentOptions(projectName); + + // invoke the operation + string assessmentOptionsName = "default"; + NullableResponse response = await collection.GetIfExistsAsync(assessmentOptionsName); + AKSAssessmentOptionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSAssessmentOptionResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSAssessmentOptionResource.cs new file mode 100644 index 000000000000..ab9e57303c15 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSAssessmentOptionResource.cs @@ -0,0 +1,49 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AKSAssessmentOptionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AksOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessmentOptions_Get" 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 AKSAssessmentOptionResource created on azure + // for more information of creating AKSAssessmentOptionResource, please refer to the document of AKSAssessmentOptionResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentOptionsName = "default"; + ResourceIdentifier aksAssessmentOptionResourceId = AKSAssessmentOptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentOptionsName); + AKSAssessmentOptionResource aksAssessmentOption = client.GetAKSAssessmentOptionResource(aksAssessmentOptionResourceId); + + // invoke the operation + AKSAssessmentOptionResource result = await aksAssessmentOption.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSAssessmentResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSAssessmentResource.cs new file mode 100644 index 000000000000..866f2ddb9c35 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSAssessmentResource.cs @@ -0,0 +1,206 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AKSAssessmentResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AksAssessmentOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksAssessmentOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessment_Get" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // invoke the operation + AKSAssessmentResource result = await aksAssessment.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_AksAssessmentOperationsDeleteMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksAssessmentOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessment_Delete" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // invoke the operation + await aksAssessment.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_AksAssessmentOperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksAssessmentOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessment_Create" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // invoke the operation + AKSAssessmentData data = new AKSAssessmentData + { + Properties = new AKSAssessmentProperties + { + Scope = new Scope + { + ScopeType = ScopeType.ServerGroupId, + ServerGroupId = "this-will-be-a-valid-arm-id", + AzureResourceGraphQuery = "zyhczkubwaqjqrmyithugmedmtdjxb", + }, + Settings = new AKSAssessmentSettings(AzureVmCategory.All, ConsolidationType.Full, PricingTier.Standard) + { + AzureLocation = "EastUS", + Currency = AzureCurrency.USD, + ScalingFactor = 20F, + DiscountPercentage = 14F, + SizingCriterion = AssessmentSizingCriterion.PerformanceBased, + PerformanceData = new PerformanceData + { + Percentile = new Percentile("Unknown"), + TimeRange = TimeRange.Day, + PerfDataStartOn = DateTimeOffset.Parse("2025-02-14T07:09:09.242Z"), + PerfDataEndOn = DateTimeOffset.Parse("2025-02-14T07:09:09.242Z"), + }, + SavingsSettings = new SavingsSettings + { + SavingsOptions = SavingsOption.None, + AzureOfferCode = AzureOffer.Unknown, + }, + BillingSettings = new BillingSettings + { + LicensingProgram = LicensingProgram.EA, + SubscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56", + }, + EnvironmentType = EnvironmentType.Production, + }, + }, + }; + ArmOperation lro = await aksAssessment.UpdateAsync(WaitUntil.Completed, data); + AKSAssessmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DownloadUrl_AksAssessmentOperationsDownloadUrlMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksAssessmentOperations_DownloadUrl_MaximumSet_Gen.json + // this example is just showing the usage of "AKSAssessmentOperations_DownloadUrl" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // invoke the operation + DownloadUrlContent content = new DownloadUrlContent(); + ArmOperation lro = await aksAssessment.DownloadUrlAsync(WaitUntil.Completed, content); + DownloadUri result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAKSCostDetailOperationsByParent_AksCostDetailOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksCostDetailOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AKSCostDetail_ListByParent" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // invoke the operation and iterate over the result + await foreach (AKSCostDetail item in aksAssessment.GetAKSCostDetailOperationsByParentAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSClusterCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSClusterCollection.cs new file mode 100644 index 000000000000..ee8c8e979372 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSClusterCollection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AKSClusterCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AksClusterOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksClusterOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSCluster_Get" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // get the collection of this AKSClusterResource + AKSClusterCollection collection = aksAssessment.GetAKSClusters(); + + // invoke the operation + string clusterName = "testaksassessment-cluster"; + AKSClusterResource result = await collection.GetAsync(clusterName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AksClusterOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksClusterOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AKSCluster_ListByParent" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // get the collection of this AKSClusterResource + AKSClusterCollection collection = aksAssessment.GetAKSClusters(); + + // invoke the operation and iterate over the result + await foreach (AKSClusterResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSClusterData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AksClusterOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksClusterOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSCluster_Get" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // get the collection of this AKSClusterResource + AKSClusterCollection collection = aksAssessment.GetAKSClusters(); + + // invoke the operation + string clusterName = "testaksassessment-cluster"; + bool result = await collection.ExistsAsync(clusterName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AksClusterOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksClusterOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSCluster_Get" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // get the collection of this AKSClusterResource + AKSClusterCollection collection = aksAssessment.GetAKSClusters(); + + // invoke the operation + string clusterName = "testaksassessment-cluster"; + NullableResponse response = await collection.GetIfExistsAsync(clusterName); + AKSClusterResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSClusterResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSClusterResource.cs new file mode 100644 index 000000000000..c1517fe259bd --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSClusterResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AKSClusterResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AksClusterOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksClusterOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSCluster_Get" 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 AKSClusterResource created on azure + // for more information of creating AKSClusterResource, please refer to the document of AKSClusterResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + string clusterName = "testaksassessment-cluster"; + ResourceIdentifier aksClusterResourceId = AKSClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, clusterName); + AKSClusterResource aksCluster = client.GetAKSClusterResource(aksClusterResourceId); + + // invoke the operation + AKSClusterResource result = await aksCluster.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSSummaryCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSSummaryCollection.cs new file mode 100644 index 000000000000..20198aad2467 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSSummaryCollection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AKSSummaryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AksSummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSSummary_Get" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // get the collection of this AKSSummaryResource + AKSSummaryCollection collection = aksAssessment.GetAKSSummaries(); + + // invoke the operation + string summaryName = "AKS"; + AKSSummaryResource result = await collection.GetAsync(summaryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AksSummaryOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksSummaryOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AKSSummary_ListByParent" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // get the collection of this AKSSummaryResource + AKSSummaryCollection collection = aksAssessment.GetAKSSummaries(); + + // invoke the operation and iterate over the result + await foreach (AKSSummaryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSSummaryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AksSummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSSummary_Get" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // get the collection of this AKSSummaryResource + AKSSummaryCollection collection = aksAssessment.GetAKSSummaries(); + + // invoke the operation + string summaryName = "AKS"; + bool result = await collection.ExistsAsync(summaryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AksSummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSSummary_Get" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // get the collection of this AKSSummaryResource + AKSSummaryCollection collection = aksAssessment.GetAKSSummaries(); + + // invoke the operation + string summaryName = "AKS"; + NullableResponse response = await collection.GetIfExistsAsync(summaryName); + AKSSummaryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSSummaryResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSSummaryResource.cs new file mode 100644 index 000000000000..d5739d562a28 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AKSSummaryResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AKSSummaryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AksSummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AksSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AKSSummary_Get" 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 AKSSummaryResource created on azure + // for more information of creating AKSSummaryResource, please refer to the document of AKSSummaryResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + string summaryName = "AKS"; + ResourceIdentifier aksSummaryResourceId = AKSSummaryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, summaryName); + AKSSummaryResource aksSummary = client.GetAKSSummaryResource(aksSummaryResourceId); + + // invoke the operation + AKSSummaryResource result = await aksSummary.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AKSSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedMachineV2Collection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedMachineV2Collection.cs new file mode 100644 index 000000000000..ceb677eed395 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedMachineV2Collection.cs @@ -0,0 +1,167 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessedMachineV2Collection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessedMachinesV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedMachinesV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedMachineV2_Get" 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 MachineAssessmentV2Resource created on azure + // for more information of creating MachineAssessmentV2Resource, please refer to the document of MachineAssessmentV2Resource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier machineAssessmentV2ResourceId = MachineAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + MachineAssessmentV2Resource machineAssessmentV2 = client.GetMachineAssessmentV2Resource(machineAssessmentV2ResourceId); + + // get the collection of this AssessedMachineV2Resource + AssessedMachineV2Collection collection = machineAssessmentV2.GetAssessedMachineV2s(); + + // invoke the operation + string assessedMachineName = "machine1"; + AssessedMachineV2Resource result = await collection.GetAsync(assessedMachineName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedMachineV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AssessedMachinesV2OperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedMachinesV2Operations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedMachineV2_ListByParent" 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 MachineAssessmentV2Resource created on azure + // for more information of creating MachineAssessmentV2Resource, please refer to the document of MachineAssessmentV2Resource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier machineAssessmentV2ResourceId = MachineAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + MachineAssessmentV2Resource machineAssessmentV2 = client.GetMachineAssessmentV2Resource(machineAssessmentV2ResourceId); + + // get the collection of this AssessedMachineV2Resource + AssessedMachineV2Collection collection = machineAssessmentV2.GetAssessedMachineV2s(); + + // invoke the operation and iterate over the result + int? pageSize = 13; + string continuationToken = "lsuhpxtnundds"; + int? totalRecordCount = 28; + await foreach (AssessedMachineV2Resource item in collection.GetAllAsync(pageSize: pageSize, continuationToken: continuationToken, totalRecordCount: totalRecordCount)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedMachineV2Data resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AssessedMachinesV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedMachinesV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedMachineV2_Get" 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 MachineAssessmentV2Resource created on azure + // for more information of creating MachineAssessmentV2Resource, please refer to the document of MachineAssessmentV2Resource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier machineAssessmentV2ResourceId = MachineAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + MachineAssessmentV2Resource machineAssessmentV2 = client.GetMachineAssessmentV2Resource(machineAssessmentV2ResourceId); + + // get the collection of this AssessedMachineV2Resource + AssessedMachineV2Collection collection = machineAssessmentV2.GetAssessedMachineV2s(); + + // invoke the operation + string assessedMachineName = "machine1"; + bool result = await collection.ExistsAsync(assessedMachineName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AssessedMachinesV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedMachinesV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedMachineV2_Get" 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 MachineAssessmentV2Resource created on azure + // for more information of creating MachineAssessmentV2Resource, please refer to the document of MachineAssessmentV2Resource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier machineAssessmentV2ResourceId = MachineAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + MachineAssessmentV2Resource machineAssessmentV2 = client.GetMachineAssessmentV2Resource(machineAssessmentV2ResourceId); + + // get the collection of this AssessedMachineV2Resource + AssessedMachineV2Collection collection = machineAssessmentV2.GetAssessedMachineV2s(); + + // invoke the operation + string assessedMachineName = "machine1"; + NullableResponse response = await collection.GetIfExistsAsync(assessedMachineName); + AssessedMachineV2Resource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedMachineV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedMachineV2Resource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedMachineV2Resource.cs new file mode 100644 index 000000000000..7966b6779ca5 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedMachineV2Resource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessedMachineV2Resource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessedMachinesV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedMachinesV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedMachineV2_Get" 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 AssessedMachineV2Resource created on azure + // for more information of creating AssessedMachineV2Resource, please refer to the document of AssessedMachineV2Resource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + string assessedMachineName = "machine1"; + ResourceIdentifier assessedMachineV2ResourceId = AssessedMachineV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, assessedMachineName); + AssessedMachineV2Resource assessedMachineV2 = client.GetAssessedMachineV2Resource(assessedMachineV2ResourceId); + + // invoke the operation + AssessedMachineV2Resource result = await assessedMachineV2.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedMachineV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlDatabaseV3Collection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlDatabaseV3Collection.cs new file mode 100644 index 000000000000..920e21ab0aaf --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlDatabaseV3Collection.cs @@ -0,0 +1,167 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessedSqlDatabaseV3Collection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessedSqlDatabaseV3OperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlDatabaseV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlDatabaseV3_Get" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this AssessedSqlDatabaseV3Resource + AssessedSqlDatabaseV3Collection collection = sqlAssessmentV3.GetAssessedSqlDatabaseV3s(); + + // invoke the operation + string assessedSqlDatabaseName = "db1"; + AssessedSqlDatabaseV3Resource result = await collection.GetAsync(assessedSqlDatabaseName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedSqlDatabaseV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AssessedSqlDatabaseV3OperationsListByParent() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlDatabaseV3Operations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlDatabaseV3_ListByParent" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this AssessedSqlDatabaseV3Resource + AssessedSqlDatabaseV3Collection collection = sqlAssessmentV3.GetAssessedSqlDatabaseV3s(); + + // invoke the operation and iterate over the result + int? pageSize = 11; + string continuationToken = "ahjkwi"; + int? totalRecordCount = 11; + await foreach (AssessedSqlDatabaseV3Resource item in collection.GetAllAsync(pageSize: pageSize, continuationToken: continuationToken, totalRecordCount: totalRecordCount)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedSqlDatabaseV3Data resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AssessedSqlDatabaseV3OperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlDatabaseV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlDatabaseV3_Get" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this AssessedSqlDatabaseV3Resource + AssessedSqlDatabaseV3Collection collection = sqlAssessmentV3.GetAssessedSqlDatabaseV3s(); + + // invoke the operation + string assessedSqlDatabaseName = "db1"; + bool result = await collection.ExistsAsync(assessedSqlDatabaseName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AssessedSqlDatabaseV3OperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlDatabaseV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlDatabaseV3_Get" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this AssessedSqlDatabaseV3Resource + AssessedSqlDatabaseV3Collection collection = sqlAssessmentV3.GetAssessedSqlDatabaseV3s(); + + // invoke the operation + string assessedSqlDatabaseName = "db1"; + NullableResponse response = await collection.GetIfExistsAsync(assessedSqlDatabaseName); + AssessedSqlDatabaseV3Resource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedSqlDatabaseV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlDatabaseV3Resource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlDatabaseV3Resource.cs new file mode 100644 index 000000000000..ecce0772602a --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlDatabaseV3Resource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessedSqlDatabaseV3Resource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessedSqlDatabaseV3OperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlDatabaseV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlDatabaseV3_Get" 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 AssessedSqlDatabaseV3Resource created on azure + // for more information of creating AssessedSqlDatabaseV3Resource, please refer to the document of AssessedSqlDatabaseV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + string assessedSqlDatabaseName = "db1"; + ResourceIdentifier assessedSqlDatabaseV3ResourceId = AssessedSqlDatabaseV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, assessedSqlDatabaseName); + AssessedSqlDatabaseV3Resource assessedSqlDatabaseV3 = client.GetAssessedSqlDatabaseV3Resource(assessedSqlDatabaseV3ResourceId); + + // invoke the operation + AssessedSqlDatabaseV3Resource result = await assessedSqlDatabaseV3.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedSqlDatabaseV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlInstanceV3Collection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlInstanceV3Collection.cs new file mode 100644 index 000000000000..f78028ae2435 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlInstanceV3Collection.cs @@ -0,0 +1,167 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessedSqlInstanceV3Collection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessedSqlInstanceV3OperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlInstanceV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlInstanceV3_Get" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this AssessedSqlInstanceV3Resource + AssessedSqlInstanceV3Collection collection = sqlAssessmentV3.GetAssessedSqlInstanceV3s(); + + // invoke the operation + string assessedSqlInstanceName = "sql1"; + AssessedSqlInstanceV3Resource result = await collection.GetAsync(assessedSqlInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedSqlInstanceV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AssessedSqlInstanceV3OperationsListByParent() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlInstanceV3Operations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlInstanceV3_ListByParent" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this AssessedSqlInstanceV3Resource + AssessedSqlInstanceV3Collection collection = sqlAssessmentV3.GetAssessedSqlInstanceV3s(); + + // invoke the operation and iterate over the result + int? pageSize = 30; + string continuationToken = "tvblslp"; + int? totalRecordCount = 29; + await foreach (AssessedSqlInstanceV3Resource item in collection.GetAllAsync(pageSize: pageSize, continuationToken: continuationToken, totalRecordCount: totalRecordCount)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedSqlInstanceV3Data resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AssessedSqlInstanceV3OperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlInstanceV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlInstanceV3_Get" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this AssessedSqlInstanceV3Resource + AssessedSqlInstanceV3Collection collection = sqlAssessmentV3.GetAssessedSqlInstanceV3s(); + + // invoke the operation + string assessedSqlInstanceName = "sql1"; + bool result = await collection.ExistsAsync(assessedSqlInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AssessedSqlInstanceV3OperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlInstanceV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlInstanceV3_Get" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this AssessedSqlInstanceV3Resource + AssessedSqlInstanceV3Collection collection = sqlAssessmentV3.GetAssessedSqlInstanceV3s(); + + // invoke the operation + string assessedSqlInstanceName = "sql1"; + NullableResponse response = await collection.GetIfExistsAsync(assessedSqlInstanceName); + AssessedSqlInstanceV3Resource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedSqlInstanceV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlInstanceV3Resource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlInstanceV3Resource.cs new file mode 100644 index 000000000000..f2e8bcf2a4d6 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlInstanceV3Resource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessedSqlInstanceV3Resource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessedSqlInstanceV3OperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlInstanceV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlInstanceV3_Get" 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 AssessedSqlInstanceV3Resource created on azure + // for more information of creating AssessedSqlInstanceV3Resource, please refer to the document of AssessedSqlInstanceV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + string assessedSqlInstanceName = "sql1"; + ResourceIdentifier assessedSqlInstanceV3ResourceId = AssessedSqlInstanceV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, assessedSqlInstanceName); + AssessedSqlInstanceV3Resource assessedSqlInstanceV3 = client.GetAssessedSqlInstanceV3Resource(assessedSqlInstanceV3ResourceId); + + // invoke the operation + AssessedSqlInstanceV3Resource result = await assessedSqlInstanceV3.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedSqlInstanceV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlMachineV3Collection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlMachineV3Collection.cs new file mode 100644 index 000000000000..e55cd17b650b --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlMachineV3Collection.cs @@ -0,0 +1,167 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessedSqlMachineV3Collection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessedSqlMachinesV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlMachinesV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlMachineV3_Get" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this AssessedSqlMachineV3Resource + AssessedSqlMachineV3Collection collection = sqlAssessmentV3.GetAssessedSqlMachineV3s(); + + // invoke the operation + string assessedSqlMachineName = "machine1"; + AssessedSqlMachineV3Resource result = await collection.GetAsync(assessedSqlMachineName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedSqlMachineV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AssessedSqlMachinesV3OperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlMachinesV3Operations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlMachineV3_ListByParent" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this AssessedSqlMachineV3Resource + AssessedSqlMachineV3Collection collection = sqlAssessmentV3.GetAssessedSqlMachineV3s(); + + // invoke the operation and iterate over the result + int? pageSize = 27; + string continuationToken = "vzjkdmjvvkeuvm"; + int? totalRecordCount = 30; + await foreach (AssessedSqlMachineV3Resource item in collection.GetAllAsync(pageSize: pageSize, continuationToken: continuationToken, totalRecordCount: totalRecordCount)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedSqlMachineV3Data resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AssessedSqlMachinesV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlMachinesV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlMachineV3_Get" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this AssessedSqlMachineV3Resource + AssessedSqlMachineV3Collection collection = sqlAssessmentV3.GetAssessedSqlMachineV3s(); + + // invoke the operation + string assessedSqlMachineName = "machine1"; + bool result = await collection.ExistsAsync(assessedSqlMachineName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AssessedSqlMachinesV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlMachinesV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlMachineV3_Get" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this AssessedSqlMachineV3Resource + AssessedSqlMachineV3Collection collection = sqlAssessmentV3.GetAssessedSqlMachineV3s(); + + // invoke the operation + string assessedSqlMachineName = "machine1"; + NullableResponse response = await collection.GetIfExistsAsync(assessedSqlMachineName); + AssessedSqlMachineV3Resource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedSqlMachineV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlMachineV3Resource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlMachineV3Resource.cs new file mode 100644 index 000000000000..9954c5daa2b4 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedSqlMachineV3Resource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessedSqlMachineV3Resource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessedSqlMachinesV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedSqlMachinesV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedSqlMachineV3_Get" 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 AssessedSqlMachineV3Resource created on azure + // for more information of creating AssessedSqlMachineV3Resource, please refer to the document of AssessedSqlMachineV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + string assessedSqlMachineName = "machine1"; + ResourceIdentifier assessedSqlMachineV3ResourceId = AssessedSqlMachineV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, assessedSqlMachineName); + AssessedSqlMachineV3Resource assessedSqlMachineV3 = client.GetAssessedSqlMachineV3Resource(assessedSqlMachineV3ResourceId); + + // invoke the operation + AssessedSqlMachineV3Resource result = await assessedSqlMachineV3.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedSqlMachineV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedWebAppV3Collection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedWebAppV3Collection.cs new file mode 100644 index 000000000000..4da4af3903e4 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedWebAppV3Collection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessedWebAppV3Collection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessedWebAppsV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedWebAppsV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedWebAppV3_Get" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // get the collection of this AssessedWebAppV3Resource + AssessedWebAppV3Collection collection = webAppAssessmentV3.GetAssessedWebAppV3s(); + + // invoke the operation + string assessedWebAppName = "webapp1"; + AssessedWebAppV3Resource result = await collection.GetAsync(assessedWebAppName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedWebAppV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AssessedWebAppsV3OperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedWebAppsV3Operations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedWebAppV3_ListByParent" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // get the collection of this AssessedWebAppV3Resource + AssessedWebAppV3Collection collection = webAppAssessmentV3.GetAssessedWebAppV3s(); + + // invoke the operation and iterate over the result + await foreach (AssessedWebAppV3Resource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedWebAppV3Data resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AssessedWebAppsV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedWebAppsV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedWebAppV3_Get" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // get the collection of this AssessedWebAppV3Resource + AssessedWebAppV3Collection collection = webAppAssessmentV3.GetAssessedWebAppV3s(); + + // invoke the operation + string assessedWebAppName = "webapp1"; + bool result = await collection.ExistsAsync(assessedWebAppName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AssessedWebAppsV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedWebAppsV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedWebAppV3_Get" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // get the collection of this AssessedWebAppV3Resource + AssessedWebAppV3Collection collection = webAppAssessmentV3.GetAssessedWebAppV3s(); + + // invoke the operation + string assessedWebAppName = "webapp1"; + NullableResponse response = await collection.GetIfExistsAsync(assessedWebAppName); + AssessedWebAppV3Resource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedWebAppV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedWebAppV3Resource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedWebAppV3Resource.cs new file mode 100644 index 000000000000..ae35dd024b6d --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedWebAppV3Resource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessedWebAppV3Resource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessedWebAppsV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedWebAppsV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedWebAppV3_Get" 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 AssessedWebAppV3Resource created on azure + // for more information of creating AssessedWebAppV3Resource, please refer to the document of AssessedWebAppV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + string assessedWebAppName = "webapp1"; + ResourceIdentifier assessedWebAppV3ResourceId = AssessedWebAppV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, assessedWebAppName); + AssessedWebAppV3Resource assessedWebAppV3 = client.GetAssessedWebAppV3Resource(assessedWebAppV3ResourceId); + + // invoke the operation + AssessedWebAppV3Resource result = await assessedWebAppV3.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedWebAppV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedWebApplicationCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedWebApplicationCollection.cs new file mode 100644 index 000000000000..7fcc9126ba0f --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedWebApplicationCollection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessedWebApplicationCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessedWebApplicationOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedWebApplicationOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedWebApplication_Get" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // get the collection of this AssessedWebApplicationResource + AssessedWebApplicationCollection collection = aksAssessment.GetAssessedWebApplications(); + + // invoke the operation + string assessedWorkload = "webapp"; + AssessedWebApplicationResource result = await collection.GetAsync(assessedWorkload); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedWebApplicationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AssessedWebApplicationOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedWebApplicationOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedWebApplication_ListByParent" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // get the collection of this AssessedWebApplicationResource + AssessedWebApplicationCollection collection = aksAssessment.GetAssessedWebApplications(); + + // invoke the operation and iterate over the result + await foreach (AssessedWebApplicationResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedWebApplicationData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AssessedWebApplicationOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedWebApplicationOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedWebApplication_Get" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // get the collection of this AssessedWebApplicationResource + AssessedWebApplicationCollection collection = aksAssessment.GetAssessedWebApplications(); + + // invoke the operation + string assessedWorkload = "webapp"; + bool result = await collection.ExistsAsync(assessedWorkload); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AssessedWebApplicationOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedWebApplicationOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedWebApplication_Get" 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 AKSAssessmentResource created on azure + // for more information of creating AKSAssessmentResource, please refer to the document of AKSAssessmentResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + ResourceIdentifier aksAssessmentResourceId = AKSAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AKSAssessmentResource aksAssessment = client.GetAKSAssessmentResource(aksAssessmentResourceId); + + // get the collection of this AssessedWebApplicationResource + AssessedWebApplicationCollection collection = aksAssessment.GetAssessedWebApplications(); + + // invoke the operation + string assessedWorkload = "webapp"; + NullableResponse response = await collection.GetIfExistsAsync(assessedWorkload); + AssessedWebApplicationResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedWebApplicationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedWebApplicationResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedWebApplicationResource.cs new file mode 100644 index 000000000000..9ba47572365d --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessedWebApplicationResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessedWebApplicationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessedWebApplicationOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AssessedWebApplicationOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessedWebApplication_Get" 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 AssessedWebApplicationResource created on azure + // for more information of creating AssessedWebApplicationResource, please refer to the document of AssessedWebApplicationResource + string subscriptionId = "572C3D3F-425D-4AE8-A935-72631EADDE56"; + string resourceGroupName = "rgaksAssessments"; + string projectName = "testProject"; + string assessmentName = "testaksassessment"; + string assessedWorkload = "webapp"; + ResourceIdentifier assessedWebApplicationResourceId = AssessedWebApplicationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, assessedWorkload); + AssessedWebApplicationResource assessedWebApplication = client.GetAssessedWebApplicationResource(assessedWebApplicationResourceId); + + // invoke the operation + AssessedWebApplicationResource result = await assessedWebApplication.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessedWebApplicationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessmentProjectCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessmentProjectCollection.cs new file mode 100644 index 000000000000..d85aac7c6c34 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessmentProjectCollection.cs @@ -0,0 +1,206 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessmentProjectCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_AssessmentProjectsOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectsOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProject_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AssessmentProjectResource + AssessmentProjectCollection collection = resourceGroupResource.GetAssessmentProjects(); + + // invoke the operation + string projectName = "sakanwar1204project"; + AssessmentProjectData data = new AssessmentProjectData(new AzureLocation("southeastasia")) + { + Properties = new ProjectProperties + { + AssessmentSolutionId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/sakanwar/providers/Microsoft.Storage/storageAccounts/sakanwar1204usa", + ProjectStatus = ProjectStatus.Active, + PublicNetworkAccess = "Disabled", + CustomerStorageAccountArmId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/sakanwar/providers/Microsoft.Storage/storageAccounts/sakanwar1204usa", + }, + Tags = +{ +["Migrate Project"] = "sakanwar-PE-SEA" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, projectName, data); + AssessmentProjectResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessmentProjectData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessmentProjectsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProject_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AssessmentProjectResource + AssessmentProjectCollection collection = resourceGroupResource.GetAssessmentProjects(); + + // invoke the operation + string projectName = "sakanwar1204project"; + AssessmentProjectResource result = await collection.GetAsync(projectName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessmentProjectData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AssessmentProjectsOperationsListByParent() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectsOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProject_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AssessmentProjectResource + AssessmentProjectCollection collection = resourceGroupResource.GetAssessmentProjects(); + + // invoke the operation and iterate over the result + await foreach (AssessmentProjectResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessmentProjectData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AssessmentProjectsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProject_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AssessmentProjectResource + AssessmentProjectCollection collection = resourceGroupResource.GetAssessmentProjects(); + + // invoke the operation + string projectName = "sakanwar1204project"; + bool result = await collection.ExistsAsync(projectName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AssessmentProjectsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProject_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AssessmentProjectResource + AssessmentProjectCollection collection = resourceGroupResource.GetAssessmentProjects(); + + // invoke the operation + string projectName = "sakanwar1204project"; + NullableResponse response = await collection.GetIfExistsAsync(projectName); + AssessmentProjectResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessmentProjectData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessmentProjectResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessmentProjectResource.cs new file mode 100644 index 000000000000..9e95c5b17e0e --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessmentProjectResource.cs @@ -0,0 +1,120 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessmentProjectResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessmentProjectsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProject_Get" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // invoke the operation + AssessmentProjectResource result = await assessmentProject.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessmentProjectData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_AssessmentProjectsOperationsDelete() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectsOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProject_Delete" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "A926B99C-7F4C-4556-871E-20CB8C6ADB56"; + string resourceGroupName = "rgmigrate"; + string projectName = "zqrsyncwahgydqvwuchkfd"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // invoke the operation + await assessmentProject.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_AssessmentProjectsOperationsUpdate() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectsOperations_Update_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProject_Update" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // invoke the operation + AssessmentProjectData data = new AssessmentProjectData(default) + { + Properties = new ProjectProperties + { + AssessmentSolutionId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/sakanwar/providers/Microsoft.Storage/storageAccounts/sakanwar1204usa", + ProjectStatus = ProjectStatus.Active, + PublicNetworkAccess = "Disabled", + CustomerStorageAccountArmId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/sakanwar/providers/Microsoft.Storage/storageAccounts/sakanwar1204usa", + }, + Tags = +{ +["Migrate Project"] = "sakanwar-PE-SEA" +}, + }; + ArmOperation lro = await assessmentProject.UpdateAsync(WaitUntil.Completed, data); + AssessmentProjectResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessmentProjectData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessmentProjectSummaryCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessmentProjectSummaryCollection.cs new file mode 100644 index 000000000000..00953c54cb68 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessmentProjectSummaryCollection.cs @@ -0,0 +1,160 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessmentProjectSummaryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessmentProjectSummaryOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProjectSummary_Get" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "piyushapp1"; + string projectName = "PiyushApp15328project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // get the collection of this AssessmentProjectSummaryResource + AssessmentProjectSummaryCollection collection = assessmentProject.GetAssessmentProjectSummaries(); + + // invoke the operation + string projectSummaryName = "default"; + AssessmentProjectSummaryResource result = await collection.GetAsync(projectSummaryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessmentProjectSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AssessmentProjectSummaryOperationsListByParent() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectSummaryOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProjectSummary_ListByParent" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "piyushapp1"; + string projectName = "PiyushApp15328project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // get the collection of this AssessmentProjectSummaryResource + AssessmentProjectSummaryCollection collection = assessmentProject.GetAssessmentProjectSummaries(); + + // invoke the operation and iterate over the result + await foreach (AssessmentProjectSummaryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessmentProjectSummaryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AssessmentProjectSummaryOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProjectSummary_Get" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "piyushapp1"; + string projectName = "PiyushApp15328project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // get the collection of this AssessmentProjectSummaryResource + AssessmentProjectSummaryCollection collection = assessmentProject.GetAssessmentProjectSummaries(); + + // invoke the operation + string projectSummaryName = "default"; + bool result = await collection.ExistsAsync(projectSummaryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AssessmentProjectSummaryOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProjectSummary_Get" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "piyushapp1"; + string projectName = "PiyushApp15328project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // get the collection of this AssessmentProjectSummaryResource + AssessmentProjectSummaryCollection collection = assessmentProject.GetAssessmentProjectSummaries(); + + // invoke the operation + string projectSummaryName = "default"; + NullableResponse response = await collection.GetIfExistsAsync(projectSummaryName); + AssessmentProjectSummaryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessmentProjectSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessmentProjectSummaryResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessmentProjectSummaryResource.cs new file mode 100644 index 000000000000..16db2ea0bc54 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AssessmentProjectSummaryResource.cs @@ -0,0 +1,49 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AssessmentProjectSummaryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AssessmentProjectSummaryOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProjectSummary_Get" 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 AssessmentProjectSummaryResource created on azure + // for more information of creating AssessmentProjectSummaryResource, please refer to the document of AssessmentProjectSummaryResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "piyushapp1"; + string projectName = "PiyushApp15328project"; + string projectSummaryName = "default"; + ResourceIdentifier assessmentProjectSummaryResourceId = AssessmentProjectSummaryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, projectSummaryName); + AssessmentProjectSummaryResource assessmentProjectSummary = client.GetAssessmentProjectSummaryResource(assessmentProjectSummaryResourceId); + + // invoke the operation + AssessmentProjectSummaryResource result = await assessmentProjectSummary.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessmentProjectSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessedMachineV2Collection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessedMachineV2Collection.cs new file mode 100644 index 000000000000..435039d9d30c --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessedMachineV2Collection.cs @@ -0,0 +1,167 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AvsAssessedMachineV2Collection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsAssessedMachinesV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessedMachinesV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessedMachineV2_Get" 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 AvsAssessmentV2Resource created on azure + // for more information of creating AvsAssessmentV2Resource, please refer to the document of AvsAssessmentV2Resource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier avsAssessmentV2ResourceId = AvsAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AvsAssessmentV2Resource avsAssessmentV2 = client.GetAvsAssessmentV2Resource(avsAssessmentV2ResourceId); + + // get the collection of this AvsAssessedMachineV2Resource + AvsAssessedMachineV2Collection collection = avsAssessmentV2.GetAvsAssessedMachineV2s(); + + // invoke the operation + string avsAssessedMachineName = "machine1"; + AvsAssessedMachineV2Resource result = await collection.GetAsync(avsAssessedMachineName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessedMachineV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AvsAssessedMachinesV2OperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessedMachinesV2Operations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessedMachineV2_ListByParent" 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 AvsAssessmentV2Resource created on azure + // for more information of creating AvsAssessmentV2Resource, please refer to the document of AvsAssessmentV2Resource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier avsAssessmentV2ResourceId = AvsAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AvsAssessmentV2Resource avsAssessmentV2 = client.GetAvsAssessmentV2Resource(avsAssessmentV2ResourceId); + + // get the collection of this AvsAssessedMachineV2Resource + AvsAssessedMachineV2Collection collection = avsAssessmentV2.GetAvsAssessedMachineV2s(); + + // invoke the operation and iterate over the result + int? pageSize = 26; + string continuationToken = "vhdrqptyyromhgz"; + int? totalRecordCount = 7; + await foreach (AvsAssessedMachineV2Resource item in collection.GetAllAsync(pageSize: pageSize, continuationToken: continuationToken, totalRecordCount: totalRecordCount)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessedMachineV2Data resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AvsAssessedMachinesV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessedMachinesV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessedMachineV2_Get" 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 AvsAssessmentV2Resource created on azure + // for more information of creating AvsAssessmentV2Resource, please refer to the document of AvsAssessmentV2Resource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier avsAssessmentV2ResourceId = AvsAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AvsAssessmentV2Resource avsAssessmentV2 = client.GetAvsAssessmentV2Resource(avsAssessmentV2ResourceId); + + // get the collection of this AvsAssessedMachineV2Resource + AvsAssessedMachineV2Collection collection = avsAssessmentV2.GetAvsAssessedMachineV2s(); + + // invoke the operation + string avsAssessedMachineName = "machine1"; + bool result = await collection.ExistsAsync(avsAssessedMachineName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AvsAssessedMachinesV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessedMachinesV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessedMachineV2_Get" 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 AvsAssessmentV2Resource created on azure + // for more information of creating AvsAssessmentV2Resource, please refer to the document of AvsAssessmentV2Resource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier avsAssessmentV2ResourceId = AvsAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AvsAssessmentV2Resource avsAssessmentV2 = client.GetAvsAssessmentV2Resource(avsAssessmentV2ResourceId); + + // get the collection of this AvsAssessedMachineV2Resource + AvsAssessedMachineV2Collection collection = avsAssessmentV2.GetAvsAssessedMachineV2s(); + + // invoke the operation + string avsAssessedMachineName = "machine1"; + NullableResponse response = await collection.GetIfExistsAsync(avsAssessedMachineName); + AvsAssessedMachineV2Resource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessedMachineV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessedMachineV2Resource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessedMachineV2Resource.cs new file mode 100644 index 000000000000..61cc94628207 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessedMachineV2Resource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AvsAssessedMachineV2Resource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsAssessedMachinesV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessedMachinesV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessedMachineV2_Get" 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 AvsAssessedMachineV2Resource created on azure + // for more information of creating AvsAssessedMachineV2Resource, please refer to the document of AvsAssessedMachineV2Resource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + string avsAssessedMachineName = "machine1"; + ResourceIdentifier avsAssessedMachineV2ResourceId = AvsAssessedMachineV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, avsAssessedMachineName); + AvsAssessedMachineV2Resource avsAssessedMachineV2 = client.GetAvsAssessedMachineV2Resource(avsAssessedMachineV2ResourceId); + + // invoke the operation + AvsAssessedMachineV2Resource result = await avsAssessedMachineV2.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessedMachineV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessmentV2Collection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessmentV2Collection.cs new file mode 100644 index 000000000000..629cfccbc8df --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessmentV2Collection.cs @@ -0,0 +1,247 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AvsAssessmentV2Collection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_AvsAssessmentsV2OperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentsV2Operations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentV2_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AvsAssessmentV2Resource + string projectName = "contosoProject"; + AvsAssessmentV2Collection collection = resourceGroupResource.GetAvsAssessmentV2s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + AvsAssessmentV2Data data = new AvsAssessmentV2Data + { + Properties = new AvsAssessmentPropertiesV2 + { + Scope = new Scope + { + ScopeType = ScopeType.ServerGroupId, + ServerGroupId = "fxonspfmzfuiaepr", + AzureResourceGraphQuery = "ylnfwgptlyzwzkotmunbx", + }, + Settings = new AvsAssessmentSettings + { + AzureLocation = "actuloeieva", + Currency = AzureCurrency.Unknown, + ScalingFactor = 28F, + DiscountPercentage = 27F, + SizingCriterion = AssessmentSizingCriterion.PerformanceBased, + PerformanceData = new PerformanceData + { + Percentile = new Percentile("Unknown"), + TimeRange = TimeRange.Day, + PerfDataStartOn = DateTimeOffset.Parse("2025-02-21T05:36:34.751Z"), + PerfDataEndOn = DateTimeOffset.Parse("2025-02-21T05:36:34.751Z"), + }, + SavingsSettings = new SavingsSettings + { + SavingsOptions = SavingsOption.None, + AzureOfferCode = AzureOffer.Unknown, + }, + BillingSettings = new BillingSettings + { + LicensingProgram = LicensingProgram.Retail, + SubscriptionId = "xvtuenxmmjuqlhgmvev", + }, + EnvironmentType = EnvironmentType.Production, + FailuresToTolerateAndRaidLevelList = { FttAndRaidLevel.Unknown }, + VcpuOversubscription = 25F, + NodeTypes = { AzureAvsNodeType.Unknown }, + AvsAssessmentScenario = AvsAssessmentScenario.Unknown, + ExternalStorageTypes = { ExternalStorageType.Unknown }, + CpuHeadroom = 27F, + IsVcfByolEnabled = true, + MemOvercommit = 11F, + DedupeCompression = 26F, + IsStretchClusterEnabled = true, + }, + Details = new AssessmentDetails(), + FallbackMachineAssessmentArmId = "tpjvxfcyxsgngqdxyrrfh", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, assessmentName, data); + AvsAssessmentV2Resource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessmentV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsAssessmentsV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentsV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentV2_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AvsAssessmentV2Resource + string projectName = "contosoProject"; + AvsAssessmentV2Collection collection = resourceGroupResource.GetAvsAssessmentV2s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + AvsAssessmentV2Resource result = await collection.GetAsync(assessmentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessmentV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AvsAssessmentsV2OperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentsV2Operations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentV2_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AvsAssessmentV2Resource + string projectName = "contosoProject"; + AvsAssessmentV2Collection collection = resourceGroupResource.GetAvsAssessmentV2s(projectName); + + // invoke the operation and iterate over the result + await foreach (AvsAssessmentV2Resource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessmentV2Data resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AvsAssessmentsV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentsV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentV2_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AvsAssessmentV2Resource + string projectName = "contosoProject"; + AvsAssessmentV2Collection collection = resourceGroupResource.GetAvsAssessmentV2s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + bool result = await collection.ExistsAsync(assessmentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AvsAssessmentsV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentsV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentV2_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AvsAssessmentV2Resource + string projectName = "contosoProject"; + AvsAssessmentV2Collection collection = resourceGroupResource.GetAvsAssessmentV2s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + NullableResponse response = await collection.GetIfExistsAsync(assessmentName); + AvsAssessmentV2Resource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessmentV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessmentV2Resource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessmentV2Resource.cs new file mode 100644 index 000000000000..601aa062faa2 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessmentV2Resource.cs @@ -0,0 +1,188 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AvsAssessmentV2Resource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsAssessmentsV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentsV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentV2_Get" 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 AvsAssessmentV2Resource created on azure + // for more information of creating AvsAssessmentV2Resource, please refer to the document of AvsAssessmentV2Resource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier avsAssessmentV2ResourceId = AvsAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AvsAssessmentV2Resource avsAssessmentV2 = client.GetAvsAssessmentV2Resource(avsAssessmentV2ResourceId); + + // invoke the operation + AvsAssessmentV2Resource result = await avsAssessmentV2.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessmentV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_AvsAssessmentsV2OperationsDeleteMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentsV2Operations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentV2_Delete" 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 AvsAssessmentV2Resource created on azure + // for more information of creating AvsAssessmentV2Resource, please refer to the document of AvsAssessmentV2Resource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier avsAssessmentV2ResourceId = AvsAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AvsAssessmentV2Resource avsAssessmentV2 = client.GetAvsAssessmentV2Resource(avsAssessmentV2ResourceId); + + // invoke the operation + await avsAssessmentV2.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_AvsAssessmentsV2OperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentsV2Operations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentV2_Create" 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 AvsAssessmentV2Resource created on azure + // for more information of creating AvsAssessmentV2Resource, please refer to the document of AvsAssessmentV2Resource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier avsAssessmentV2ResourceId = AvsAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AvsAssessmentV2Resource avsAssessmentV2 = client.GetAvsAssessmentV2Resource(avsAssessmentV2ResourceId); + + // invoke the operation + AvsAssessmentV2Data data = new AvsAssessmentV2Data + { + Properties = new AvsAssessmentPropertiesV2 + { + Scope = new Scope + { + ScopeType = ScopeType.ServerGroupId, + ServerGroupId = "fxonspfmzfuiaepr", + AzureResourceGraphQuery = "ylnfwgptlyzwzkotmunbx", + }, + Settings = new AvsAssessmentSettings + { + AzureLocation = "actuloeieva", + Currency = AzureCurrency.Unknown, + ScalingFactor = 28F, + DiscountPercentage = 27F, + SizingCriterion = AssessmentSizingCriterion.PerformanceBased, + PerformanceData = new PerformanceData + { + Percentile = new Percentile("Unknown"), + TimeRange = TimeRange.Day, + PerfDataStartOn = DateTimeOffset.Parse("2025-02-21T05:36:34.751Z"), + PerfDataEndOn = DateTimeOffset.Parse("2025-02-21T05:36:34.751Z"), + }, + SavingsSettings = new SavingsSettings + { + SavingsOptions = SavingsOption.None, + AzureOfferCode = AzureOffer.Unknown, + }, + BillingSettings = new BillingSettings + { + LicensingProgram = LicensingProgram.Retail, + SubscriptionId = "xvtuenxmmjuqlhgmvev", + }, + EnvironmentType = EnvironmentType.Production, + FailuresToTolerateAndRaidLevelList = { FttAndRaidLevel.Unknown }, + VcpuOversubscription = 25F, + NodeTypes = { AzureAvsNodeType.Unknown }, + AvsAssessmentScenario = AvsAssessmentScenario.Unknown, + ExternalStorageTypes = { ExternalStorageType.Unknown }, + CpuHeadroom = 27F, + IsVcfByolEnabled = true, + MemOvercommit = 11F, + DedupeCompression = 26F, + IsStretchClusterEnabled = true, + }, + Details = new AssessmentDetails(), + FallbackMachineAssessmentArmId = "tpjvxfcyxsgngqdxyrrfh", + }, + }; + ArmOperation lro = await avsAssessmentV2.UpdateAsync(WaitUntil.Completed, data); + AvsAssessmentV2Resource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessmentV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DownloadUrl_GetDownloadURLForTheAssessmentReport() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentsV2Operations_DownloadUrl_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentsV2Operations_DownloadUrl" 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 AvsAssessmentV2Resource created on azure + // for more information of creating AvsAssessmentV2Resource, please refer to the document of AvsAssessmentV2Resource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier avsAssessmentV2ResourceId = AvsAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AvsAssessmentV2Resource avsAssessmentV2 = client.GetAvsAssessmentV2Resource(avsAssessmentV2ResourceId); + + // invoke the operation + DownloadUrlContent content = new DownloadUrlContent(); + ArmOperation lro = await avsAssessmentV2.DownloadUrlAsync(WaitUntil.Completed, content); + DownloadUri result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessmentV2SummaryCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessmentV2SummaryCollection.cs new file mode 100644 index 000000000000..f7e880aa6171 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessmentV2SummaryCollection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AvsAssessmentV2SummaryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsAssessmentV2SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentV2Summary_Get" 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 AvsAssessmentV2Resource created on azure + // for more information of creating AvsAssessmentV2Resource, please refer to the document of AvsAssessmentV2Resource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier avsAssessmentV2ResourceId = AvsAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AvsAssessmentV2Resource avsAssessmentV2 = client.GetAvsAssessmentV2Resource(avsAssessmentV2ResourceId); + + // get the collection of this AvsAssessmentV2SummaryResource + AvsAssessmentV2SummaryCollection collection = avsAssessmentV2.GetAvsAssessmentV2Summaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + AvsAssessmentV2SummaryResource result = await collection.GetAsync(summaryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessmentV2SummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AvsAssessmentV2SummaryOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentV2Summary_ListByParent" 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 AvsAssessmentV2Resource created on azure + // for more information of creating AvsAssessmentV2Resource, please refer to the document of AvsAssessmentV2Resource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier avsAssessmentV2ResourceId = AvsAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AvsAssessmentV2Resource avsAssessmentV2 = client.GetAvsAssessmentV2Resource(avsAssessmentV2ResourceId); + + // get the collection of this AvsAssessmentV2SummaryResource + AvsAssessmentV2SummaryCollection collection = avsAssessmentV2.GetAvsAssessmentV2Summaries(); + + // invoke the operation and iterate over the result + await foreach (AvsAssessmentV2SummaryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessmentV2SummaryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AvsAssessmentV2SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentV2Summary_Get" 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 AvsAssessmentV2Resource created on azure + // for more information of creating AvsAssessmentV2Resource, please refer to the document of AvsAssessmentV2Resource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier avsAssessmentV2ResourceId = AvsAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AvsAssessmentV2Resource avsAssessmentV2 = client.GetAvsAssessmentV2Resource(avsAssessmentV2ResourceId); + + // get the collection of this AvsAssessmentV2SummaryResource + AvsAssessmentV2SummaryCollection collection = avsAssessmentV2.GetAvsAssessmentV2Summaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + bool result = await collection.ExistsAsync(summaryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AvsAssessmentV2SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentV2Summary_Get" 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 AvsAssessmentV2Resource created on azure + // for more information of creating AvsAssessmentV2Resource, please refer to the document of AvsAssessmentV2Resource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier avsAssessmentV2ResourceId = AvsAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + AvsAssessmentV2Resource avsAssessmentV2 = client.GetAvsAssessmentV2Resource(avsAssessmentV2ResourceId); + + // get the collection of this AvsAssessmentV2SummaryResource + AvsAssessmentV2SummaryCollection collection = avsAssessmentV2.GetAvsAssessmentV2Summaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + NullableResponse response = await collection.GetIfExistsAsync(summaryName); + AvsAssessmentV2SummaryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessmentV2SummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessmentV2SummaryResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessmentV2SummaryResource.cs new file mode 100644 index 000000000000..57e0a7ddd7f3 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsAssessmentV2SummaryResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AvsAssessmentV2SummaryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsAssessmentV2SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsAssessmentV2Summary_Get" 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 AvsAssessmentV2SummaryResource created on azure + // for more information of creating AvsAssessmentV2SummaryResource, please refer to the document of AvsAssessmentV2SummaryResource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + string summaryName = "PaaSPreferred"; + ResourceIdentifier avsAssessmentV2SummaryResourceId = AvsAssessmentV2SummaryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, summaryName); + AvsAssessmentV2SummaryResource avsAssessmentV2Summary = client.GetAvsAssessmentV2SummaryResource(avsAssessmentV2SummaryResourceId); + + // invoke the operation + AvsAssessmentV2SummaryResource result = await avsAssessmentV2Summary.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsAssessmentV2SummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsGraphAssessmentOptionCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsGraphAssessmentOptionCollection.cs new file mode 100644 index 000000000000..4ff9257e4c6c --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsGraphAssessmentOptionCollection.cs @@ -0,0 +1,158 @@ +// 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; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AvsGraphAssessmentOptionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsGraphAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AvsGraphAssessmentOptionResource + string projectName = "contosoProject"; + AvsGraphAssessmentOptionCollection collection = resourceGroupResource.GetAvsGraphAssessmentOptions(projectName); + + // invoke the operation + AvsGraphAssessmentOptionResource result = await collection.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsGraphAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AvsGraphAssessmentOptionsOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AvsGraphAssessmentOptions_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AvsGraphAssessmentOptionResource + string projectName = "contosoProject"; + AvsGraphAssessmentOptionCollection collection = resourceGroupResource.GetAvsGraphAssessmentOptions(projectName); + + // invoke the operation and iterate over the result + await foreach (AvsGraphAssessmentOptionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsGraphAssessmentOptionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AvsGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsGraphAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AvsGraphAssessmentOptionResource + string projectName = "contosoProject"; + AvsGraphAssessmentOptionCollection collection = resourceGroupResource.GetAvsGraphAssessmentOptions(projectName); + + // invoke the operation + bool result = await collection.ExistsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AvsGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsGraphAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AvsGraphAssessmentOptionResource + string projectName = "contosoProject"; + AvsGraphAssessmentOptionCollection collection = resourceGroupResource.GetAvsGraphAssessmentOptions(projectName); + + // invoke the operation + NullableResponse response = await collection.GetIfExistsAsync(); + AvsGraphAssessmentOptionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsGraphAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsGraphAssessmentOptionResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsGraphAssessmentOptionResource.cs new file mode 100644 index 000000000000..c02bcabeadcb --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsGraphAssessmentOptionResource.cs @@ -0,0 +1,48 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AvsGraphAssessmentOptionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsGraphAssessmentOptions_Get" 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 AvsGraphAssessmentOptionResource created on azure + // for more information of creating AvsGraphAssessmentOptionResource, please refer to the document of AvsGraphAssessmentOptionResource + string subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + string resourceGroupName = "rgavsAssessments"; + string projectName = "contosoProject"; + ResourceIdentifier avsGraphAssessmentOptionResourceId = AvsGraphAssessmentOptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AvsGraphAssessmentOptionResource avsGraphAssessmentOption = client.GetAvsGraphAssessmentOptionResource(avsGraphAssessmentOptionResourceId); + + // invoke the operation + AvsGraphAssessmentOptionResource result = await avsGraphAssessmentOption.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsGraphAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsSummaryCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsSummaryCollection.cs new file mode 100644 index 000000000000..e247255583a2 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsSummaryCollection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AvsSummaryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BusinessCaseAvsSummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseAvsSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsSummary_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this AvsSummaryResource + AvsSummaryCollection collection = businessCase.GetAvsSummaries(); + + // invoke the operation + string avsSummaryName = "MySummary"; + AvsSummaryResource result = await collection.GetAsync(avsSummaryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_BusinessCaseAvsSummaryOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseAvsSummaryOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AvsSummary_ListByParent" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this AvsSummaryResource + AvsSummaryCollection collection = businessCase.GetAvsSummaries(); + + // invoke the operation and iterate over the result + await foreach (AvsSummaryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsSummaryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_BusinessCaseAvsSummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseAvsSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsSummary_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this AvsSummaryResource + AvsSummaryCollection collection = businessCase.GetAvsSummaries(); + + // invoke the operation + string avsSummaryName = "MySummary"; + bool result = await collection.ExistsAsync(avsSummaryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_BusinessCaseAvsSummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseAvsSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsSummary_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this AvsSummaryResource + AvsSummaryCollection collection = businessCase.GetAvsSummaries(); + + // invoke the operation + string avsSummaryName = "MySummary"; + NullableResponse response = await collection.GetIfExistsAsync(avsSummaryName); + AvsSummaryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsSummaryResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsSummaryResource.cs new file mode 100644 index 000000000000..6c6523791c57 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_AvsSummaryResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_AvsSummaryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BusinessCaseAvsSummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseAvsSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsSummary_Get" 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 AvsSummaryResource created on azure + // for more information of creating AvsSummaryResource, please refer to the document of AvsSummaryResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + string avsSummaryName = "MySummary"; + ResourceIdentifier avsSummaryResourceId = AvsSummaryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName, avsSummaryName); + AvsSummaryResource avsSummary = client.GetAvsSummaryResource(avsSummaryResourceId); + + // invoke the operation + AvsSummaryResource result = await avsSummary.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AvsSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_BusinessCaseCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_BusinessCaseCollection.cs new file mode 100644 index 000000000000..bfcdab882c04 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_BusinessCaseCollection.cs @@ -0,0 +1,261 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_BusinessCaseCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_BusinessCaseOperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "BusinessCase_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this BusinessCaseResource + string projectName = "MyMigrateProject"; + BusinessCaseCollection collection = resourceGroupResource.GetBusinessCases(projectName); + + // invoke the operation + string businessCaseName = "MyBusinessCase"; + BusinessCaseData data = new BusinessCaseData + { + Properties = new BusinessCaseProperties + { + Settings = new Settings(new AzureSettings("hpocokeckktxpzilk", BusinessCaseCurrency.Unknown) + { + DiscountPercentage = 48F, + BusinessCaseType = MigrationStrategy.Unknown, + WorkloadDiscoverySource = DiscoverySource.Unknown, + PerformanceDataStartOn = DateTimeOffset.Parse("2024-11-14T10:27:58.436Z"), + PerformanceDataEndOn = DateTimeOffset.Parse("2024-11-14T10:27:58.436Z"), + ComfortFactor = 19F, + PerformanceUtilizationPercentile = 93F, + PerYearMigrationCompletionPercentage = {new NameValuePair +{ +Name = "cthxvjhedpsnbddvyghswtgp", +Value = 13F, +}}, + InfrastructureGrowthRate = 79F, + Wacc = 43F, + NetworkCostPercentage = 81F, + IaasLaborCostPercentage = 51F, + PaasLaborCostPercentage = 13F, + AvsLaborCostPercentage = 2F, + SavingsOption = SavingsOption.Unknown, + }) + { + OnPremiseSettings = new OnPremiseSettings( + new ComputeSettings( + 26F, + 8F, + 1F, + 10F, + 10F, + new SqlServerLicensingSettings[] + { +new SqlServerLicensingSettings(SqlServerLicenseType.Unknown, 28F, 27F) + }, + new WindowsServerLicensingSettings(2F, 6F, 21), + new LinuxServerLicensingSettings(7F), + new LinuxServerLicensingSettings(7F), + new VirtualizationSoftwareSettings(23F)), + new StorageSettings(12F, 5F), + new NetworkSettings(84F, 18, 27F), + new FacilitySettings(25F) + { + FacilitiesCostPerKwh = 1F, + }, + new LaborSettings(16, 18, 22F), + new SecuritySettings(6F, 10F)) + { + ManagementSettings = new ManagementSettings(new HypervVirtualizationManagementSettings(8, 15F, new HypervLicense[] + { +new HypervLicense(1F, HyperVLicenseType.Unknown) + }), new ThirdPartyManagementSettings(1F, 13F), new OtherManagementCostsSettings(2F, 28F, 4F)), + }, + AzureArcSettings = new AzureArcSettings(AzureArcState.Disabled) + { + LaborCostPercentage = 46F, + ManagementMonitoringSettings = new AzureArcMonitoringSettings(17F, 19), + }, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, businessCaseName, data); + BusinessCaseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BusinessCaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BusinessCaseOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "BusinessCase_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this BusinessCaseResource + string projectName = "MyMigrateProject"; + BusinessCaseCollection collection = resourceGroupResource.GetBusinessCases(projectName); + + // invoke the operation + string businessCaseName = "MyBusinessCase"; + BusinessCaseResource result = await collection.GetAsync(businessCaseName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BusinessCaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_BusinessCaseOperationsListByParentMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "BusinessCase_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this BusinessCaseResource + string projectName = "MyMigrateProject"; + BusinessCaseCollection collection = resourceGroupResource.GetBusinessCases(projectName); + + // invoke the operation and iterate over the result + await foreach (BusinessCaseResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BusinessCaseData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_BusinessCaseOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "BusinessCase_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this BusinessCaseResource + string projectName = "MyMigrateProject"; + BusinessCaseCollection collection = resourceGroupResource.GetBusinessCases(projectName); + + // invoke the operation + string businessCaseName = "MyBusinessCase"; + bool result = await collection.ExistsAsync(businessCaseName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_BusinessCaseOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "BusinessCase_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this BusinessCaseResource + string projectName = "MyMigrateProject"; + BusinessCaseCollection collection = resourceGroupResource.GetBusinessCases(projectName); + + // invoke the operation + string businessCaseName = "MyBusinessCase"; + NullableResponse response = await collection.GetIfExistsAsync(businessCaseName); + BusinessCaseResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BusinessCaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_BusinessCaseResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_BusinessCaseResource.cs new file mode 100644 index 000000000000..c39f4f6e56fa --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_BusinessCaseResource.cs @@ -0,0 +1,231 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_BusinessCaseResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BusinessCaseOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "BusinessCase_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // invoke the operation + BusinessCaseResource result = await businessCase.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BusinessCaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_BusinessCaseOperationsDeleteMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "BusinessCase_Delete" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // invoke the operation + await businessCase.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_BusinessCaseOperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "BusinessCase_Create" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // invoke the operation + BusinessCaseData data = new BusinessCaseData + { + Properties = new BusinessCaseProperties + { + Settings = new Settings(new AzureSettings("hpocokeckktxpzilk", BusinessCaseCurrency.Unknown) + { + DiscountPercentage = 48F, + BusinessCaseType = MigrationStrategy.Unknown, + WorkloadDiscoverySource = DiscoverySource.Unknown, + PerformanceDataStartOn = DateTimeOffset.Parse("2024-11-14T10:27:58.436Z"), + PerformanceDataEndOn = DateTimeOffset.Parse("2024-11-14T10:27:58.436Z"), + ComfortFactor = 19F, + PerformanceUtilizationPercentile = 93F, + PerYearMigrationCompletionPercentage = {new NameValuePair +{ +Name = "cthxvjhedpsnbddvyghswtgp", +Value = 13F, +}}, + InfrastructureGrowthRate = 79F, + Wacc = 43F, + NetworkCostPercentage = 81F, + IaasLaborCostPercentage = 51F, + PaasLaborCostPercentage = 13F, + AvsLaborCostPercentage = 2F, + SavingsOption = SavingsOption.Unknown, + }) + { + OnPremiseSettings = new OnPremiseSettings( + new ComputeSettings( + 26F, + 8F, + 1F, + 10F, + 10F, + new SqlServerLicensingSettings[] + { +new SqlServerLicensingSettings(SqlServerLicenseType.Unknown, 28F, 27F) + }, + new WindowsServerLicensingSettings(2F, 6F, 21), + new LinuxServerLicensingSettings(7F), + new LinuxServerLicensingSettings(7F), + new VirtualizationSoftwareSettings(23F)), + new StorageSettings(12F, 5F), + new NetworkSettings(84F, 18, 27F), + new FacilitySettings(25F) + { + FacilitiesCostPerKwh = 1F, + }, + new LaborSettings(16, 18, 22F), + new SecuritySettings(6F, 10F)) + { + ManagementSettings = new ManagementSettings(new HypervVirtualizationManagementSettings(8, 15F, new HypervLicense[] + { +new HypervLicense(1F, HyperVLicenseType.Unknown) + }), new ThirdPartyManagementSettings(1F, 13F), new OtherManagementCostsSettings(2F, 28F, 4F)), + }, + AzureArcSettings = new AzureArcSettings(AzureArcState.Disabled) + { + LaborCostPercentage = 46F, + ManagementMonitoringSettings = new AzureArcMonitoringSettings(17F, 19), + }, + }, + }, + }; + ArmOperation lro = await businessCase.UpdateAsync(WaitUntil.Completed, data); + BusinessCaseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BusinessCaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CompareSummary_GetCompareSummaryReportForBusinessCase() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOperations_CompareSummary_MaximumSet_Gen.json + // this example is just showing the usage of "BusinessCaseOperations_CompareSummary" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // invoke the operation + CompareSummaryContent content = new CompareSummaryContent(); + ArmOperation lro = await businessCase.CompareSummaryAsync(WaitUntil.Completed, content); + CompareSummary result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetReportDownloadUrl_GetDownloadURLForTheBusinessCaseReportGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOperations_GetReportDownloadUrl_MaximumSet_Gen.json + // this example is just showing the usage of "BusinessCaseOperations_GetReportDownloadUrl" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // invoke the operation + GetReportDownloadUrlContent content = new GetReportDownloadUrlContent(); + ArmOperation lro = await businessCase.GetReportDownloadUrlAsync(WaitUntil.Completed, content); + ReportDownloadUri result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_CompoundAssessmentCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_CompoundAssessmentCollection.cs new file mode 100644 index 000000000000..86d04d3073fb --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_CompoundAssessmentCollection.cs @@ -0,0 +1,209 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_CompoundAssessmentCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CompoundAssessmentOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "CompoundAssessment_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this CompoundAssessmentResource + string projectName = "contosoProject"; + CompoundAssessmentCollection collection = resourceGroupResource.GetCompoundAssessments(projectName); + + // invoke the operation + string compoundAssessmentName = "assessmentName"; + CompoundAssessmentData data = new CompoundAssessmentData + { + Properties = new CompoundAssessmentProperties(new TargetAssessmentArmIds + { + Aks = "/subscriptions/6898488D-BBF0-40FC-A5E3-3DF2C00C5F21/resourceGroups/rgwebAppCompoundAssessments/providers/Microsoft.Migrate/assessmentprojects/contosoProject/aksAssessments/nameOfAssessment", + AzureAppService = "/subscriptions/6898488D-BBF0-40FC-A5E3-3DF2C00C5F21/resourceGroups/rgwebAppCompoundAssessments/providers/Microsoft.Migrate/assessmentprojects/contosoProject/webAppAssessments/nameOfAssessment", + AzureAppServiceContainer = "/subscriptions/6898488D-BBF0-40FC-A5E3-3DF2C00C5F21/resourceGroups/rgwebAppCompoundAssessments/providers/Microsoft.Migrate/assessmentprojects/contosoProject/webAppAssessments/nameOfAssessment", + }) + { + FallbackMachineAssessmentArmId = "/subscriptions/6898488D-BBF0-40FC-A5E3-3DF2C00C5F21/resourceGroups/rgwebAppCompoundAssessments/providers/Microsoft.Migrate/assessmentprojects/contosoProject/assessments/nameOfAssessment", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, compoundAssessmentName, data); + CompoundAssessmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CompoundAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_CompoundAssessmentOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "CompoundAssessment_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this CompoundAssessmentResource + string projectName = "contosoProject"; + CompoundAssessmentCollection collection = resourceGroupResource.GetCompoundAssessments(projectName); + + // invoke the operation + string compoundAssessmentName = "assessmentName"; + CompoundAssessmentResource result = await collection.GetAsync(compoundAssessmentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CompoundAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_CompoundAssessmentOperationsListByParent() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "CompoundAssessment_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this CompoundAssessmentResource + string projectName = "contosoProject"; + CompoundAssessmentCollection collection = resourceGroupResource.GetCompoundAssessments(projectName); + + // invoke the operation and iterate over the result + await foreach (CompoundAssessmentResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CompoundAssessmentData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_CompoundAssessmentOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "CompoundAssessment_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this CompoundAssessmentResource + string projectName = "contosoProject"; + CompoundAssessmentCollection collection = resourceGroupResource.GetCompoundAssessments(projectName); + + // invoke the operation + string compoundAssessmentName = "assessmentName"; + bool result = await collection.ExistsAsync(compoundAssessmentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_CompoundAssessmentOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "CompoundAssessment_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this CompoundAssessmentResource + string projectName = "contosoProject"; + CompoundAssessmentCollection collection = resourceGroupResource.GetCompoundAssessments(projectName); + + // invoke the operation + string compoundAssessmentName = "assessmentName"; + NullableResponse response = await collection.GetIfExistsAsync(compoundAssessmentName); + CompoundAssessmentResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CompoundAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_CompoundAssessmentResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_CompoundAssessmentResource.cs new file mode 100644 index 000000000000..ac077129ae27 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_CompoundAssessmentResource.cs @@ -0,0 +1,150 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_CompoundAssessmentResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_CompoundAssessmentOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "CompoundAssessment_Get" 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 CompoundAssessmentResource created on azure + // for more information of creating CompoundAssessmentResource, please refer to the document of CompoundAssessmentResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + string projectName = "contosoProject"; + string compoundAssessmentName = "assessmentName"; + ResourceIdentifier compoundAssessmentResourceId = CompoundAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + CompoundAssessmentResource compoundAssessment = client.GetCompoundAssessmentResource(compoundAssessmentResourceId); + + // invoke the operation + CompoundAssessmentResource result = await compoundAssessment.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CompoundAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_CompoundAssessmentOperationsDelete() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "CompoundAssessment_Delete" 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 CompoundAssessmentResource created on azure + // for more information of creating CompoundAssessmentResource, please refer to the document of CompoundAssessmentResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + string projectName = "contosoProject"; + string compoundAssessmentName = "assessmentName"; + ResourceIdentifier compoundAssessmentResourceId = CompoundAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + CompoundAssessmentResource compoundAssessment = client.GetCompoundAssessmentResource(compoundAssessmentResourceId); + + // invoke the operation + await compoundAssessment.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CompoundAssessmentOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "CompoundAssessment_Create" 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 CompoundAssessmentResource created on azure + // for more information of creating CompoundAssessmentResource, please refer to the document of CompoundAssessmentResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + string projectName = "contosoProject"; + string compoundAssessmentName = "assessmentName"; + ResourceIdentifier compoundAssessmentResourceId = CompoundAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + CompoundAssessmentResource compoundAssessment = client.GetCompoundAssessmentResource(compoundAssessmentResourceId); + + // invoke the operation + CompoundAssessmentData data = new CompoundAssessmentData + { + Properties = new CompoundAssessmentProperties(new TargetAssessmentArmIds + { + Aks = "/subscriptions/6898488D-BBF0-40FC-A5E3-3DF2C00C5F21/resourceGroups/rgwebAppCompoundAssessments/providers/Microsoft.Migrate/assessmentprojects/contosoProject/aksAssessments/nameOfAssessment", + AzureAppService = "/subscriptions/6898488D-BBF0-40FC-A5E3-3DF2C00C5F21/resourceGroups/rgwebAppCompoundAssessments/providers/Microsoft.Migrate/assessmentprojects/contosoProject/webAppAssessments/nameOfAssessment", + AzureAppServiceContainer = "/subscriptions/6898488D-BBF0-40FC-A5E3-3DF2C00C5F21/resourceGroups/rgwebAppCompoundAssessments/providers/Microsoft.Migrate/assessmentprojects/contosoProject/webAppAssessments/nameOfAssessment", + }) + { + FallbackMachineAssessmentArmId = "/subscriptions/6898488D-BBF0-40FC-A5E3-3DF2C00C5F21/resourceGroups/rgwebAppCompoundAssessments/providers/Microsoft.Migrate/assessmentprojects/contosoProject/assessments/nameOfAssessment", + }, + }; + ArmOperation lro = await compoundAssessment.UpdateAsync(WaitUntil.Completed, data); + CompoundAssessmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CompoundAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DownloadUrl_CompoundAssessmentOperationsDownloadUrl() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentOperations_DownloadUrl_MaximumSet_Gen.json + // this example is just showing the usage of "CompoundAssessmentOperations_DownloadUrl" 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 CompoundAssessmentResource created on azure + // for more information of creating CompoundAssessmentResource, please refer to the document of CompoundAssessmentResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + string projectName = "contosoProject"; + string compoundAssessmentName = "assessmentName"; + ResourceIdentifier compoundAssessmentResourceId = CompoundAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + CompoundAssessmentResource compoundAssessment = client.GetCompoundAssessmentResource(compoundAssessmentResourceId); + + // invoke the operation + DownloadUrlContent content = new DownloadUrlContent(); + ArmOperation lro = await compoundAssessment.DownloadUrlAsync(WaitUntil.Completed, content); + DownloadUri result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedAvsMachineCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedAvsMachineCollection.cs new file mode 100644 index 000000000000..5b00bb8813ad --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedAvsMachineCollection.cs @@ -0,0 +1,167 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_EvaluatedAvsMachineCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EvaluatedAvsMachinesOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedAvsMachinesOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedAvsMachine_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedAvsMachineResource + EvaluatedAvsMachineCollection collection = businessCase.GetEvaluatedAvsMachines(); + + // invoke the operation + string evaluatedAvsMachineName = "MyMachine"; + EvaluatedAvsMachineResource result = await collection.GetAsync(evaluatedAvsMachineName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedAvsMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_EvaluatedAvsMachinesOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedAvsMachinesOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedAvsMachine_ListByParent" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedAvsMachineResource + EvaluatedAvsMachineCollection collection = businessCase.GetEvaluatedAvsMachines(); + + // invoke the operation and iterate over the result + int? pageSize = 18; + string continuationToken = "kri"; + int? totalRecordCount = 12; + await foreach (EvaluatedAvsMachineResource item in collection.GetAllAsync(pageSize: pageSize, continuationToken: continuationToken, totalRecordCount: totalRecordCount)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedAvsMachineData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_EvaluatedAvsMachinesOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedAvsMachinesOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedAvsMachine_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedAvsMachineResource + EvaluatedAvsMachineCollection collection = businessCase.GetEvaluatedAvsMachines(); + + // invoke the operation + string evaluatedAvsMachineName = "MyMachine"; + bool result = await collection.ExistsAsync(evaluatedAvsMachineName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_EvaluatedAvsMachinesOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedAvsMachinesOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedAvsMachine_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedAvsMachineResource + EvaluatedAvsMachineCollection collection = businessCase.GetEvaluatedAvsMachines(); + + // invoke the operation + string evaluatedAvsMachineName = "MyMachine"; + NullableResponse response = await collection.GetIfExistsAsync(evaluatedAvsMachineName); + EvaluatedAvsMachineResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedAvsMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedAvsMachineResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedAvsMachineResource.cs new file mode 100644 index 000000000000..055ff7c31512 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedAvsMachineResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_EvaluatedAvsMachineResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EvaluatedAvsMachinesOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedAvsMachinesOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedAvsMachine_Get" 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 EvaluatedAvsMachineResource created on azure + // for more information of creating EvaluatedAvsMachineResource, please refer to the document of EvaluatedAvsMachineResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + string evaluatedAvsMachineName = "MyMachine"; + ResourceIdentifier evaluatedAvsMachineResourceId = EvaluatedAvsMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName, evaluatedAvsMachineName); + EvaluatedAvsMachineResource evaluatedAvsMachine = client.GetEvaluatedAvsMachineResource(evaluatedAvsMachineResourceId); + + // invoke the operation + EvaluatedAvsMachineResource result = await evaluatedAvsMachine.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedAvsMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedMachineCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedMachineCollection.cs new file mode 100644 index 000000000000..d26eda4d8104 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedMachineCollection.cs @@ -0,0 +1,167 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_EvaluatedMachineCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EvaluatedMachinesOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedMachinesOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedMachine_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedMachineResource + EvaluatedMachineCollection collection = businessCase.GetEvaluatedMachines(); + + // invoke the operation + string evaluatedMachineName = "MyMachine"; + EvaluatedMachineResource result = await collection.GetAsync(evaluatedMachineName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_EvaluatedMachinesOperationsListByParentMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedMachinesOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedMachine_ListByParent" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedMachineResource + EvaluatedMachineCollection collection = businessCase.GetEvaluatedMachines(); + + // invoke the operation and iterate over the result + int? pageSize = 24; + string continuationToken = "eoevgdmtpkbhlgyglvsa"; + int? totalRecordCount = 6; + await foreach (EvaluatedMachineResource item in collection.GetAllAsync(pageSize: pageSize, continuationToken: continuationToken, totalRecordCount: totalRecordCount)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedMachineData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_EvaluatedMachinesOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedMachinesOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedMachine_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedMachineResource + EvaluatedMachineCollection collection = businessCase.GetEvaluatedMachines(); + + // invoke the operation + string evaluatedMachineName = "MyMachine"; + bool result = await collection.ExistsAsync(evaluatedMachineName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_EvaluatedMachinesOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedMachinesOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedMachine_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedMachineResource + EvaluatedMachineCollection collection = businessCase.GetEvaluatedMachines(); + + // invoke the operation + string evaluatedMachineName = "MyMachine"; + NullableResponse response = await collection.GetIfExistsAsync(evaluatedMachineName); + EvaluatedMachineResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedMachineResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedMachineResource.cs new file mode 100644 index 000000000000..cd0e4381cd62 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedMachineResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_EvaluatedMachineResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EvaluatedMachinesOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedMachinesOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedMachine_Get" 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 EvaluatedMachineResource created on azure + // for more information of creating EvaluatedMachineResource, please refer to the document of EvaluatedMachineResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + string evaluatedMachineName = "MyMachine"; + ResourceIdentifier evaluatedMachineResourceId = EvaluatedMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName, evaluatedMachineName); + EvaluatedMachineResource evaluatedMachine = client.GetEvaluatedMachineResource(evaluatedMachineResourceId); + + // invoke the operation + EvaluatedMachineResource result = await evaluatedMachine.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedSqlEntityCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedSqlEntityCollection.cs new file mode 100644 index 000000000000..4ed56435890b --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedSqlEntityCollection.cs @@ -0,0 +1,167 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_EvaluatedSqlEntityCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EvaluatedSqlEntitiesOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedSqlEntitiesOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedSqlEntity_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedSqlEntityResource + EvaluatedSqlEntityCollection collection = businessCase.GetEvaluatedSqlEntities(); + + // invoke the operation + string evaluatedSqlEntityName = "MyEntity"; + EvaluatedSqlEntityResource result = await collection.GetAsync(evaluatedSqlEntityName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedSqlEntityData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_EvaluatedSqlEntitiesOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedSqlEntitiesOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedSqlEntity_ListByParent" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedSqlEntityResource + EvaluatedSqlEntityCollection collection = businessCase.GetEvaluatedSqlEntities(); + + // invoke the operation and iterate over the result + int? pageSize = 13; + string continuationToken = "bnmyic"; + int? totalRecordCount = 23; + await foreach (EvaluatedSqlEntityResource item in collection.GetAllAsync(pageSize: pageSize, continuationToken: continuationToken, totalRecordCount: totalRecordCount)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedSqlEntityData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_EvaluatedSqlEntitiesOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedSqlEntitiesOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedSqlEntity_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedSqlEntityResource + EvaluatedSqlEntityCollection collection = businessCase.GetEvaluatedSqlEntities(); + + // invoke the operation + string evaluatedSqlEntityName = "MyEntity"; + bool result = await collection.ExistsAsync(evaluatedSqlEntityName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_EvaluatedSqlEntitiesOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedSqlEntitiesOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedSqlEntity_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedSqlEntityResource + EvaluatedSqlEntityCollection collection = businessCase.GetEvaluatedSqlEntities(); + + // invoke the operation + string evaluatedSqlEntityName = "MyEntity"; + NullableResponse response = await collection.GetIfExistsAsync(evaluatedSqlEntityName); + EvaluatedSqlEntityResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedSqlEntityData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedSqlEntityResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedSqlEntityResource.cs new file mode 100644 index 000000000000..019076fe6d4d --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedSqlEntityResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_EvaluatedSqlEntityResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EvaluatedSqlEntitiesOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedSqlEntitiesOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedSqlEntity_Get" 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 EvaluatedSqlEntityResource created on azure + // for more information of creating EvaluatedSqlEntityResource, please refer to the document of EvaluatedSqlEntityResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + string evaluatedSqlEntityName = "MyEntity"; + ResourceIdentifier evaluatedSqlEntityResourceId = EvaluatedSqlEntityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName, evaluatedSqlEntityName); + EvaluatedSqlEntityResource evaluatedSqlEntity = client.GetEvaluatedSqlEntityResource(evaluatedSqlEntityResourceId); + + // invoke the operation + EvaluatedSqlEntityResource result = await evaluatedSqlEntity.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedSqlEntityData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedWebAppCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedWebAppCollection.cs new file mode 100644 index 000000000000..a411b7c71a0f --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedWebAppCollection.cs @@ -0,0 +1,167 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_EvaluatedWebAppCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EvaluatedWebAppsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedWebAppsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedWebApp_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedWebAppResource + EvaluatedWebAppCollection collection = businessCase.GetEvaluatedWebApps(); + + // invoke the operation + string evaluatedWebAppName = "MyWebApp"; + EvaluatedWebAppResource result = await collection.GetAsync(evaluatedWebAppName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedWebAppData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_EvaluatedWebAppsOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedWebAppsOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedWebApp_ListByParent" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedWebAppResource + EvaluatedWebAppCollection collection = businessCase.GetEvaluatedWebApps(); + + // invoke the operation and iterate over the result + int? pageSize = 20; + string continuationToken = "giprsbjufkenlzmqf"; + int? totalRecordCount = 12; + await foreach (EvaluatedWebAppResource item in collection.GetAllAsync(pageSize: pageSize, continuationToken: continuationToken, totalRecordCount: totalRecordCount)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedWebAppData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_EvaluatedWebAppsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedWebAppsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedWebApp_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedWebAppResource + EvaluatedWebAppCollection collection = businessCase.GetEvaluatedWebApps(); + + // invoke the operation + string evaluatedWebAppName = "MyWebApp"; + bool result = await collection.ExistsAsync(evaluatedWebAppName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_EvaluatedWebAppsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedWebAppsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedWebApp_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this EvaluatedWebAppResource + EvaluatedWebAppCollection collection = businessCase.GetEvaluatedWebApps(); + + // invoke the operation + string evaluatedWebAppName = "MyWebApp"; + NullableResponse response = await collection.GetIfExistsAsync(evaluatedWebAppName); + EvaluatedWebAppResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedWebAppData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedWebAppResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedWebAppResource.cs new file mode 100644 index 000000000000..3ebf4f0822f0 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_EvaluatedWebAppResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_EvaluatedWebAppResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EvaluatedWebAppsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/EvaluatedWebAppsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "EvaluatedWebApp_Get" 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 EvaluatedWebAppResource created on azure + // for more information of creating EvaluatedWebAppResource, please refer to the document of EvaluatedWebAppResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + string evaluatedWebAppName = "MyWebApp"; + ResourceIdentifier evaluatedWebAppResourceId = EvaluatedWebAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName, evaluatedWebAppName); + EvaluatedWebAppResource evaluatedWebApp = client.GetEvaluatedWebAppResource(evaluatedWebAppResourceId); + + // invoke the operation + EvaluatedWebAppResource result = await evaluatedWebApp.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EvaluatedWebAppData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HeterogeneousAssessmentCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HeterogeneousAssessmentCollection.cs new file mode 100644 index 000000000000..de3126bc528c --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HeterogeneousAssessmentCollection.cs @@ -0,0 +1,204 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_HeterogeneousAssessmentCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_HeterogeneousAssessmentOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/HeterogeneousAssessmentOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "HeterogeneousAssessment_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "EC3B3DC9-A26C-468D-B5F2-9C775E8BBA5F"; + string resourceGroupName = "rgheterogeneousAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HeterogeneousAssessmentResource + string projectName = "contosoProject"; + HeterogeneousAssessmentCollection collection = resourceGroupResource.GetHeterogeneousAssessments(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + HeterogeneousAssessmentData data = new HeterogeneousAssessmentData + { + Properties = new HeterogeneousAssessmentProperties + { + AssessmentArmIds = { "gartykxgfvqccfs" }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, assessmentName, data); + HeterogeneousAssessmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HeterogeneousAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_HeterogeneousAssessmentOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/HeterogeneousAssessmentOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HeterogeneousAssessment_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "EC3B3DC9-A26C-468D-B5F2-9C775E8BBA5F"; + string resourceGroupName = "rgheterogeneousAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HeterogeneousAssessmentResource + string projectName = "contosoProject"; + HeterogeneousAssessmentCollection collection = resourceGroupResource.GetHeterogeneousAssessments(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + HeterogeneousAssessmentResource result = await collection.GetAsync(assessmentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HeterogeneousAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_HeterogeneousAssessmentOperationsListByParent() + { + // Generated from example definition: 2024-03-03-preview/HeterogeneousAssessmentOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "HeterogeneousAssessment_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "EC3B3DC9-A26C-468D-B5F2-9C775E8BBA5F"; + string resourceGroupName = "rgheterogeneousAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HeterogeneousAssessmentResource + string projectName = "contosoProject"; + HeterogeneousAssessmentCollection collection = resourceGroupResource.GetHeterogeneousAssessments(projectName); + + // invoke the operation and iterate over the result + await foreach (HeterogeneousAssessmentResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HeterogeneousAssessmentData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_HeterogeneousAssessmentOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/HeterogeneousAssessmentOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HeterogeneousAssessment_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "EC3B3DC9-A26C-468D-B5F2-9C775E8BBA5F"; + string resourceGroupName = "rgheterogeneousAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HeterogeneousAssessmentResource + string projectName = "contosoProject"; + HeterogeneousAssessmentCollection collection = resourceGroupResource.GetHeterogeneousAssessments(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + bool result = await collection.ExistsAsync(assessmentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_HeterogeneousAssessmentOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/HeterogeneousAssessmentOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HeterogeneousAssessment_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "EC3B3DC9-A26C-468D-B5F2-9C775E8BBA5F"; + string resourceGroupName = "rgheterogeneousAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HeterogeneousAssessmentResource + string projectName = "contosoProject"; + HeterogeneousAssessmentCollection collection = resourceGroupResource.GetHeterogeneousAssessments(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + NullableResponse response = await collection.GetIfExistsAsync(assessmentName); + HeterogeneousAssessmentResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HeterogeneousAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HeterogeneousAssessmentResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HeterogeneousAssessmentResource.cs new file mode 100644 index 000000000000..fc9135ee77cd --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HeterogeneousAssessmentResource.cs @@ -0,0 +1,116 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_HeterogeneousAssessmentResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_HeterogeneousAssessmentOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/HeterogeneousAssessmentOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HeterogeneousAssessment_Get" 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 HeterogeneousAssessmentResource created on azure + // for more information of creating HeterogeneousAssessmentResource, please refer to the document of HeterogeneousAssessmentResource + string subscriptionId = "EC3B3DC9-A26C-468D-B5F2-9C775E8BBA5F"; + string resourceGroupName = "rgheterogeneousAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier heterogeneousAssessmentResourceId = HeterogeneousAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + HeterogeneousAssessmentResource heterogeneousAssessment = client.GetHeterogeneousAssessmentResource(heterogeneousAssessmentResourceId); + + // invoke the operation + HeterogeneousAssessmentResource result = await heterogeneousAssessment.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HeterogeneousAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_HeterogeneousAssessmentOperationsDelete() + { + // Generated from example definition: 2024-03-03-preview/HeterogeneousAssessmentOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "HeterogeneousAssessment_Delete" 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 HeterogeneousAssessmentResource created on azure + // for more information of creating HeterogeneousAssessmentResource, please refer to the document of HeterogeneousAssessmentResource + string subscriptionId = "EC3B3DC9-A26C-468D-B5F2-9C775E8BBA5F"; + string resourceGroupName = "rgheterogeneousAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier heterogeneousAssessmentResourceId = HeterogeneousAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + HeterogeneousAssessmentResource heterogeneousAssessment = client.GetHeterogeneousAssessmentResource(heterogeneousAssessmentResourceId); + + // invoke the operation + await heterogeneousAssessment.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_HeterogeneousAssessmentOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/HeterogeneousAssessmentOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "HeterogeneousAssessment_Create" 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 HeterogeneousAssessmentResource created on azure + // for more information of creating HeterogeneousAssessmentResource, please refer to the document of HeterogeneousAssessmentResource + string subscriptionId = "EC3B3DC9-A26C-468D-B5F2-9C775E8BBA5F"; + string resourceGroupName = "rgheterogeneousAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier heterogeneousAssessmentResourceId = HeterogeneousAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + HeterogeneousAssessmentResource heterogeneousAssessment = client.GetHeterogeneousAssessmentResource(heterogeneousAssessmentResourceId); + + // invoke the operation + HeterogeneousAssessmentData data = new HeterogeneousAssessmentData + { + Properties = new HeterogeneousAssessmentProperties + { + AssessmentArmIds = { "gartykxgfvqccfs" }, + }, + }; + ArmOperation lro = await heterogeneousAssessment.UpdateAsync(WaitUntil.Completed, data); + HeterogeneousAssessmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HeterogeneousAssessmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HeterogeneousAssessmentSummaryCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HeterogeneousAssessmentSummaryCollection.cs new file mode 100644 index 000000000000..1731b0a1ae97 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HeterogeneousAssessmentSummaryCollection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_HeterogeneousAssessmentSummaryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_HeterogeneousAssessmentSummaryOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/HeterogeneousAssessmentSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HeterogeneousAssessmentSummary_Get" 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 HeterogeneousAssessmentResource created on azure + // for more information of creating HeterogeneousAssessmentResource, please refer to the document of HeterogeneousAssessmentResource + string subscriptionId = "EC3B3DC9-A26C-468D-B5F2-9C775E8BBA5F"; + string resourceGroupName = "rgheterogeneousAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier heterogeneousAssessmentResourceId = HeterogeneousAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + HeterogeneousAssessmentResource heterogeneousAssessment = client.GetHeterogeneousAssessmentResource(heterogeneousAssessmentResourceId); + + // get the collection of this HeterogeneousAssessmentSummaryResource + HeterogeneousAssessmentSummaryCollection collection = heterogeneousAssessment.GetHeterogeneousAssessmentSummaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + HeterogeneousAssessmentSummaryResource result = await collection.GetAsync(summaryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HeterogeneousAssessmentSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_HeterogeneousAssessmentSummaryOperationsListByParent() + { + // Generated from example definition: 2024-03-03-preview/HeterogeneousAssessmentSummaryOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "HeterogeneousAssessmentSummary_ListByParent" 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 HeterogeneousAssessmentResource created on azure + // for more information of creating HeterogeneousAssessmentResource, please refer to the document of HeterogeneousAssessmentResource + string subscriptionId = "EC3B3DC9-A26C-468D-B5F2-9C775E8BBA5F"; + string resourceGroupName = "rgheterogeneousAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier heterogeneousAssessmentResourceId = HeterogeneousAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + HeterogeneousAssessmentResource heterogeneousAssessment = client.GetHeterogeneousAssessmentResource(heterogeneousAssessmentResourceId); + + // get the collection of this HeterogeneousAssessmentSummaryResource + HeterogeneousAssessmentSummaryCollection collection = heterogeneousAssessment.GetHeterogeneousAssessmentSummaries(); + + // invoke the operation and iterate over the result + await foreach (HeterogeneousAssessmentSummaryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HeterogeneousAssessmentSummaryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_HeterogeneousAssessmentSummaryOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/HeterogeneousAssessmentSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HeterogeneousAssessmentSummary_Get" 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 HeterogeneousAssessmentResource created on azure + // for more information of creating HeterogeneousAssessmentResource, please refer to the document of HeterogeneousAssessmentResource + string subscriptionId = "EC3B3DC9-A26C-468D-B5F2-9C775E8BBA5F"; + string resourceGroupName = "rgheterogeneousAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier heterogeneousAssessmentResourceId = HeterogeneousAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + HeterogeneousAssessmentResource heterogeneousAssessment = client.GetHeterogeneousAssessmentResource(heterogeneousAssessmentResourceId); + + // get the collection of this HeterogeneousAssessmentSummaryResource + HeterogeneousAssessmentSummaryCollection collection = heterogeneousAssessment.GetHeterogeneousAssessmentSummaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + bool result = await collection.ExistsAsync(summaryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_HeterogeneousAssessmentSummaryOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/HeterogeneousAssessmentSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HeterogeneousAssessmentSummary_Get" 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 HeterogeneousAssessmentResource created on azure + // for more information of creating HeterogeneousAssessmentResource, please refer to the document of HeterogeneousAssessmentResource + string subscriptionId = "EC3B3DC9-A26C-468D-B5F2-9C775E8BBA5F"; + string resourceGroupName = "rgheterogeneousAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier heterogeneousAssessmentResourceId = HeterogeneousAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + HeterogeneousAssessmentResource heterogeneousAssessment = client.GetHeterogeneousAssessmentResource(heterogeneousAssessmentResourceId); + + // get the collection of this HeterogeneousAssessmentSummaryResource + HeterogeneousAssessmentSummaryCollection collection = heterogeneousAssessment.GetHeterogeneousAssessmentSummaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + NullableResponse response = await collection.GetIfExistsAsync(summaryName); + HeterogeneousAssessmentSummaryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HeterogeneousAssessmentSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HeterogeneousAssessmentSummaryResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HeterogeneousAssessmentSummaryResource.cs new file mode 100644 index 000000000000..8d60f7b81cd9 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HeterogeneousAssessmentSummaryResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_HeterogeneousAssessmentSummaryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_HeterogeneousAssessmentSummaryOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/HeterogeneousAssessmentSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HeterogeneousAssessmentSummary_Get" 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 HeterogeneousAssessmentSummaryResource created on azure + // for more information of creating HeterogeneousAssessmentSummaryResource, please refer to the document of HeterogeneousAssessmentSummaryResource + string subscriptionId = "EC3B3DC9-A26C-468D-B5F2-9C775E8BBA5F"; + string resourceGroupName = "rgheterogeneousAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + string summaryName = "PaaSPreferred"; + ResourceIdentifier heterogeneousAssessmentSummaryResourceId = HeterogeneousAssessmentSummaryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, summaryName); + HeterogeneousAssessmentSummaryResource heterogeneousAssessmentSummary = client.GetHeterogeneousAssessmentSummaryResource(heterogeneousAssessmentSummaryResourceId); + + // invoke the operation + HeterogeneousAssessmentSummaryResource result = await heterogeneousAssessmentSummary.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HeterogeneousAssessmentSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HypervCollectorCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HypervCollectorCollection.cs new file mode 100644 index 000000000000..871a26bc2f69 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HypervCollectorCollection.cs @@ -0,0 +1,218 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_HypervCollectorCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_HypervCollectorsOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/HypervCollectorsOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "HypervCollector_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HypervCollectorResource + string projectName = "app18700project"; + HypervCollectorCollection collection = resourceGroupResource.GetHypervCollectors(projectName); + + // invoke the operation + string hypervCollectorName = "test-697cecollector"; + HypervCollectorData data = new HypervCollectorData + { + Properties = new CollectorPropertiesBaseWithAgent + { + AgentProperties = new CollectorAgentPropertiesBase + { + Id = "12f1d90f-b3fa-4926-8893-e56803a09af0", + Version = "2.0.1993.19", + LastHeartbeatUtc = DateTimeOffset.Parse("2022-07-07T14:25:35.708325Z"), + SpnDetails = new CollectorAgentSpnPropertiesBase + { + Authority = "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + ApplicationId = "e3bd6eaa-980b-40ae-a30e-2a5069ba097c", + Audience = "e3bd6eaa-980b-40ae-a30e-2a5069ba097c", + ObjectId = "01b9f9e2-2d82-414c-adaa-09ce259b6b44", + TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47", + }, + }, + DiscoverySiteId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/ayagrawRG/providers/Microsoft.OffAzure/HyperVSites/test-60527site", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, hypervCollectorName, data); + HypervCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HypervCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_HypervCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/HypervCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HypervCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HypervCollectorResource + string projectName = "app18700project"; + HypervCollectorCollection collection = resourceGroupResource.GetHypervCollectors(projectName); + + // invoke the operation + string hypervCollectorName = "test-697cecollector"; + HypervCollectorResource result = await collection.GetAsync(hypervCollectorName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HypervCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_HypervCollectorsOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/HypervCollectorsOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "HypervCollector_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HypervCollectorResource + string projectName = "app18700project"; + HypervCollectorCollection collection = resourceGroupResource.GetHypervCollectors(projectName); + + // invoke the operation and iterate over the result + await foreach (HypervCollectorResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HypervCollectorData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_HypervCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/HypervCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HypervCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HypervCollectorResource + string projectName = "app18700project"; + HypervCollectorCollection collection = resourceGroupResource.GetHypervCollectors(projectName); + + // invoke the operation + string hypervCollectorName = "test-697cecollector"; + bool result = await collection.ExistsAsync(hypervCollectorName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_HypervCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/HypervCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HypervCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HypervCollectorResource + string projectName = "app18700project"; + HypervCollectorCollection collection = resourceGroupResource.GetHypervCollectors(projectName); + + // invoke the operation + string hypervCollectorName = "test-697cecollector"; + NullableResponse response = await collection.GetIfExistsAsync(hypervCollectorName); + HypervCollectorResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HypervCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HypervCollectorResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HypervCollectorResource.cs new file mode 100644 index 000000000000..18a0f22d6699 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_HypervCollectorResource.cs @@ -0,0 +1,130 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_HypervCollectorResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_HypervCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/HypervCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HypervCollector_Get" 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 HypervCollectorResource created on azure + // for more information of creating HypervCollectorResource, please refer to the document of HypervCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + string projectName = "app18700project"; + string hypervCollectorName = "test-697cecollector"; + ResourceIdentifier hypervCollectorResourceId = HypervCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, hypervCollectorName); + HypervCollectorResource hypervCollector = client.GetHypervCollectorResource(hypervCollectorResourceId); + + // invoke the operation + HypervCollectorResource result = await hypervCollector.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HypervCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_HypervCollectorsOperationsDelete() + { + // Generated from example definition: 2024-03-03-preview/HypervCollectorsOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "HypervCollector_Delete" 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 HypervCollectorResource created on azure + // for more information of creating HypervCollectorResource, please refer to the document of HypervCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + string projectName = "app18700project"; + string hypervCollectorName = "test-697cecollector"; + ResourceIdentifier hypervCollectorResourceId = HypervCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, hypervCollectorName); + HypervCollectorResource hypervCollector = client.GetHypervCollectorResource(hypervCollectorResourceId); + + // invoke the operation + await hypervCollector.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_HypervCollectorsOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/HypervCollectorsOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "HypervCollector_Create" 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 HypervCollectorResource created on azure + // for more information of creating HypervCollectorResource, please refer to the document of HypervCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + string projectName = "app18700project"; + string hypervCollectorName = "test-697cecollector"; + ResourceIdentifier hypervCollectorResourceId = HypervCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, hypervCollectorName); + HypervCollectorResource hypervCollector = client.GetHypervCollectorResource(hypervCollectorResourceId); + + // invoke the operation + HypervCollectorData data = new HypervCollectorData + { + Properties = new CollectorPropertiesBaseWithAgent + { + AgentProperties = new CollectorAgentPropertiesBase + { + Id = "12f1d90f-b3fa-4926-8893-e56803a09af0", + Version = "2.0.1993.19", + LastHeartbeatUtc = DateTimeOffset.Parse("2022-07-07T14:25:35.708325Z"), + SpnDetails = new CollectorAgentSpnPropertiesBase + { + Authority = "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + ApplicationId = "e3bd6eaa-980b-40ae-a30e-2a5069ba097c", + Audience = "e3bd6eaa-980b-40ae-a30e-2a5069ba097c", + ObjectId = "01b9f9e2-2d82-414c-adaa-09ce259b6b44", + TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47", + }, + }, + DiscoverySiteId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/ayagrawRG/providers/Microsoft.OffAzure/HyperVSites/test-60527site", + }, + }; + ArmOperation lro = await hypervCollector.UpdateAsync(WaitUntil.Completed, data); + HypervCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HypervCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_IaasSummaryCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_IaasSummaryCollection.cs new file mode 100644 index 000000000000..36fb13618834 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_IaasSummaryCollection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_IaasSummaryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BusinessCaseIaasSummaryOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseIaasSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "IaasSummary_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this IaasSummaryResource + IaasSummaryCollection collection = businessCase.GetIaasSummaries(); + + // invoke the operation + string iaasSummaryName = "MySummary"; + IaasSummaryResource result = await collection.GetAsync(iaasSummaryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + IaasSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_BusinessCaseIaasSummaryOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseIaasSummaryOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "IaasSummary_ListByParent" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this IaasSummaryResource + IaasSummaryCollection collection = businessCase.GetIaasSummaries(); + + // invoke the operation and iterate over the result + await foreach (IaasSummaryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + IaasSummaryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_BusinessCaseIaasSummaryOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseIaasSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "IaasSummary_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this IaasSummaryResource + IaasSummaryCollection collection = businessCase.GetIaasSummaries(); + + // invoke the operation + string iaasSummaryName = "MySummary"; + bool result = await collection.ExistsAsync(iaasSummaryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_BusinessCaseIaasSummaryOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseIaasSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "IaasSummary_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this IaasSummaryResource + IaasSummaryCollection collection = businessCase.GetIaasSummaries(); + + // invoke the operation + string iaasSummaryName = "MySummary"; + NullableResponse response = await collection.GetIfExistsAsync(iaasSummaryName); + IaasSummaryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + IaasSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_IaasSummaryResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_IaasSummaryResource.cs new file mode 100644 index 000000000000..7cac5d617705 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_IaasSummaryResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_IaasSummaryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BusinessCaseIaasSummaryOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseIaasSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "IaasSummary_Get" 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 IaasSummaryResource created on azure + // for more information of creating IaasSummaryResource, please refer to the document of IaasSummaryResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + string iaasSummaryName = "MySummary"; + ResourceIdentifier iaasSummaryResourceId = IaasSummaryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName, iaasSummaryName); + IaasSummaryResource iaasSummary = client.GetIaasSummaryResource(iaasSummaryResourceId); + + // invoke the operation + IaasSummaryResource result = await iaasSummary.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + IaasSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ImportCollectorCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ImportCollectorCollection.cs new file mode 100644 index 000000000000..2f2a96fb582d --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ImportCollectorCollection.cs @@ -0,0 +1,204 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_ImportCollectorCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ImportCollectorsOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/ImportCollectorsOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "ImportCollector_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ImportCollectorResource + string projectName = "app18700project"; + ImportCollectorCollection collection = resourceGroupResource.GetImportCollectors(projectName); + + // invoke the operation + string importCollectorName = "importCollectore7d5"; + ImportCollectorData data = new ImportCollectorData + { + Properties = new CollectorPropertiesBase + { + DiscoverySiteId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourcegroups/ayagrawRG/providers/microsoft.offazure/importsites/actualSEA37d4importSite", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, importCollectorName, data); + ImportCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImportCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImportCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/ImportCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ImportCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ImportCollectorResource + string projectName = "app18700project"; + ImportCollectorCollection collection = resourceGroupResource.GetImportCollectors(projectName); + + // invoke the operation + string importCollectorName = "importCollectore7d5"; + ImportCollectorResource result = await collection.GetAsync(importCollectorName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImportCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ImportCollectorsOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/ImportCollectorsOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "ImportCollector_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ImportCollectorResource + string projectName = "app18700project"; + ImportCollectorCollection collection = resourceGroupResource.GetImportCollectors(projectName); + + // invoke the operation and iterate over the result + await foreach (ImportCollectorResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImportCollectorData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ImportCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/ImportCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ImportCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ImportCollectorResource + string projectName = "app18700project"; + ImportCollectorCollection collection = resourceGroupResource.GetImportCollectors(projectName); + + // invoke the operation + string importCollectorName = "importCollectore7d5"; + bool result = await collection.ExistsAsync(importCollectorName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ImportCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/ImportCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ImportCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ImportCollectorResource + string projectName = "app18700project"; + ImportCollectorCollection collection = resourceGroupResource.GetImportCollectors(projectName); + + // invoke the operation + string importCollectorName = "importCollectore7d5"; + NullableResponse response = await collection.GetIfExistsAsync(importCollectorName); + ImportCollectorResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImportCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ImportCollectorResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ImportCollectorResource.cs new file mode 100644 index 000000000000..b7f39df1f397 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ImportCollectorResource.cs @@ -0,0 +1,116 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_ImportCollectorResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImportCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/ImportCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ImportCollector_Get" 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 ImportCollectorResource created on azure + // for more information of creating ImportCollectorResource, please refer to the document of ImportCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + string projectName = "app18700project"; + string importCollectorName = "importCollectore7d5"; + ResourceIdentifier importCollectorResourceId = ImportCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, importCollectorName); + ImportCollectorResource importCollector = client.GetImportCollectorResource(importCollectorResourceId); + + // invoke the operation + ImportCollectorResource result = await importCollector.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImportCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ImportCollectorsOperationsDelete() + { + // Generated from example definition: 2024-03-03-preview/ImportCollectorsOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "ImportCollector_Delete" 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 ImportCollectorResource created on azure + // for more information of creating ImportCollectorResource, please refer to the document of ImportCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + string projectName = "app18700project"; + string importCollectorName = "importCollectore7d5"; + ResourceIdentifier importCollectorResourceId = ImportCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, importCollectorName); + ImportCollectorResource importCollector = client.GetImportCollectorResource(importCollectorResourceId); + + // invoke the operation + await importCollector.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ImportCollectorsOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/ImportCollectorsOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "ImportCollector_Create" 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 ImportCollectorResource created on azure + // for more information of creating ImportCollectorResource, please refer to the document of ImportCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + string projectName = "app18700project"; + string importCollectorName = "importCollectore7d5"; + ResourceIdentifier importCollectorResourceId = ImportCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, importCollectorName); + ImportCollectorResource importCollector = client.GetImportCollectorResource(importCollectorResourceId); + + // invoke the operation + ImportCollectorData data = new ImportCollectorData + { + Properties = new CollectorPropertiesBase + { + DiscoverySiteId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourcegroups/ayagrawRG/providers/microsoft.offazure/importsites/actualSEA37d4importSite", + }, + }; + ArmOperation lro = await importCollector.UpdateAsync(WaitUntil.Completed, data); + ImportCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImportCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ImportSqlCollectorCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ImportSqlCollectorCollection.cs new file mode 100644 index 000000000000..d3d8f941a2ff --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ImportSqlCollectorCollection.cs @@ -0,0 +1,204 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_ImportSqlCollectorCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ImportSqlCollectorOperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/ImportSqlCollectorOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "ImportSqlCollector_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C1DB66AE-BCF9-42FD-ADC2-390E0721C351"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ImportSqlCollectorResource + string projectName = "contosoProject"; + ImportSqlCollectorCollection collection = resourceGroupResource.GetImportSqlCollectors(projectName); + + // invoke the operation + string importSqlCollectorsName = "importCollector"; + ImportSqlCollectorData data = new ImportSqlCollectorData + { + Properties = new ImportSqlCollectorProperties + { + DiscoverySiteId = "/subscriptions/C1DB66AE-BCF9-42FD-ADC2-390E0721C351/resourceGroups/rgsqlAssessments/providers/Microsoft.OffAzure/MasterSites/testproject8566mastersite/SqlSites/testproject8566sqlsites", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, importSqlCollectorsName, data); + ImportSqlCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImportSqlCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImportSqlCollectorOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/ImportSqlCollectorOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ImportSqlCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C1DB66AE-BCF9-42FD-ADC2-390E0721C351"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ImportSqlCollectorResource + string projectName = "contosoProject"; + ImportSqlCollectorCollection collection = resourceGroupResource.GetImportSqlCollectors(projectName); + + // invoke the operation + string importSqlCollectorsName = "importCollector"; + ImportSqlCollectorResource result = await collection.GetAsync(importSqlCollectorsName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImportSqlCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ImportSqlCollectorOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/ImportSqlCollectorOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "ImportSqlCollector_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C1DB66AE-BCF9-42FD-ADC2-390E0721C351"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ImportSqlCollectorResource + string projectName = "contosoProject"; + ImportSqlCollectorCollection collection = resourceGroupResource.GetImportSqlCollectors(projectName); + + // invoke the operation and iterate over the result + await foreach (ImportSqlCollectorResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImportSqlCollectorData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ImportSqlCollectorOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/ImportSqlCollectorOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ImportSqlCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C1DB66AE-BCF9-42FD-ADC2-390E0721C351"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ImportSqlCollectorResource + string projectName = "contosoProject"; + ImportSqlCollectorCollection collection = resourceGroupResource.GetImportSqlCollectors(projectName); + + // invoke the operation + string importSqlCollectorsName = "importCollector"; + bool result = await collection.ExistsAsync(importSqlCollectorsName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ImportSqlCollectorOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/ImportSqlCollectorOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ImportSqlCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C1DB66AE-BCF9-42FD-ADC2-390E0721C351"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ImportSqlCollectorResource + string projectName = "contosoProject"; + ImportSqlCollectorCollection collection = resourceGroupResource.GetImportSqlCollectors(projectName); + + // invoke the operation + string importSqlCollectorsName = "importCollector"; + NullableResponse response = await collection.GetIfExistsAsync(importSqlCollectorsName); + ImportSqlCollectorResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImportSqlCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ImportSqlCollectorResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ImportSqlCollectorResource.cs new file mode 100644 index 000000000000..8db36c6efca1 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ImportSqlCollectorResource.cs @@ -0,0 +1,116 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_ImportSqlCollectorResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImportSqlCollectorOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/ImportSqlCollectorOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ImportSqlCollector_Get" 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 ImportSqlCollectorResource created on azure + // for more information of creating ImportSqlCollectorResource, please refer to the document of ImportSqlCollectorResource + string subscriptionId = "C1DB66AE-BCF9-42FD-ADC2-390E0721C351"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string importSqlCollectorsName = "importCollector"; + ResourceIdentifier importSqlCollectorResourceId = ImportSqlCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, importSqlCollectorsName); + ImportSqlCollectorResource importSqlCollector = client.GetImportSqlCollectorResource(importSqlCollectorResourceId); + + // invoke the operation + ImportSqlCollectorResource result = await importSqlCollector.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImportSqlCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ImportSqlCollectorOperationsDeleteMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/ImportSqlCollectorOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "ImportSqlCollector_Delete" 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 ImportSqlCollectorResource created on azure + // for more information of creating ImportSqlCollectorResource, please refer to the document of ImportSqlCollectorResource + string subscriptionId = "C1DB66AE-BCF9-42FD-ADC2-390E0721C351"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string importSqlCollectorsName = "importCollector"; + ResourceIdentifier importSqlCollectorResourceId = ImportSqlCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, importSqlCollectorsName); + ImportSqlCollectorResource importSqlCollector = client.GetImportSqlCollectorResource(importSqlCollectorResourceId); + + // invoke the operation + await importSqlCollector.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ImportSqlCollectorOperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/ImportSqlCollectorOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "ImportSqlCollector_Create" 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 ImportSqlCollectorResource created on azure + // for more information of creating ImportSqlCollectorResource, please refer to the document of ImportSqlCollectorResource + string subscriptionId = "C1DB66AE-BCF9-42FD-ADC2-390E0721C351"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string importSqlCollectorsName = "importCollector"; + ResourceIdentifier importSqlCollectorResourceId = ImportSqlCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, importSqlCollectorsName); + ImportSqlCollectorResource importSqlCollector = client.GetImportSqlCollectorResource(importSqlCollectorResourceId); + + // invoke the operation + ImportSqlCollectorData data = new ImportSqlCollectorData + { + Properties = new ImportSqlCollectorProperties + { + DiscoverySiteId = "/subscriptions/C1DB66AE-BCF9-42FD-ADC2-390E0721C351/resourceGroups/rgsqlAssessments/providers/Microsoft.OffAzure/MasterSites/testproject8566mastersite/SqlSites/testproject8566sqlsites", + }, + }; + ArmOperation lro = await importSqlCollector.UpdateAsync(WaitUntil.Completed, data); + ImportSqlCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImportSqlCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineAssessmentV2Collection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineAssessmentV2Collection.cs new file mode 100644 index 000000000000..e93275e0376f --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineAssessmentV2Collection.cs @@ -0,0 +1,248 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_MachineAssessmentV2Collection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_MachineAssessmentsV2OperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentsV2Operations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentV2_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineAssessmentV2Resource + string projectName = "contosoProject"; + MachineAssessmentV2Collection collection = resourceGroupResource.GetMachineAssessmentV2s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + MachineAssessmentV2Data data = new MachineAssessmentV2Data + { + Properties = new MachineAssessmentV2Properties + { + Scope = new Scope + { + ScopeType = ScopeType.ServerGroupId, + ServerGroupId = "f", + AzureResourceGraphQuery = "hfhwuqalmenpcttboxvo", + }, + Settings = new MachineAssessmentSettings + { + AzureLocation = "rsequlcso", + Currency = AzureCurrency.Unknown, + ScalingFactor = 9F, + DiscountPercentage = 5F, + SizingCriterion = AssessmentSizingCriterion.PerformanceBased, + PerformanceData = new PerformanceData + { + Percentile = new Percentile("Unknown"), + TimeRange = TimeRange.Day, + PerfDataStartOn = DateTimeOffset.Parse("2025-02-21T05:47:51.336Z"), + PerfDataEndOn = DateTimeOffset.Parse("2025-02-21T05:47:51.336Z"), + }, + SavingsSettings = new SavingsSettings + { + SavingsOptions = SavingsOption.None, + AzureOfferCode = AzureOffer.Unknown, + }, + BillingSettings = new BillingSettings + { + LicensingProgram = LicensingProgram.Retail, + SubscriptionId = "lee", + }, + EnvironmentType = EnvironmentType.Production, + AzureSecurityOfferingType = AzureSecurityOfferingType.NO, + AzureDiskTypes = { AzureDiskType.Unknown }, + AzurePricingTier = AzurePricingTier.Standard, + AzureStorageRedundancy = AzureStorageRedundancy.Unknown, + AzureHybridUseBenefit = AzureHybridUseBenefit.Unknown, + LinuxAzureHybridUseBenefit = AzureHybridUseBenefit.Unknown, + AzureVmFamilies = { AzureVmFamily.Unknown }, + VmUptime = new VmUptime + { + DaysPerMonth = 9, + HoursPerDay = 10, + }, + }, + Details = new AssessmentDetails(), + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, assessmentName, data); + MachineAssessmentV2Resource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineAssessmentV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_MachineAssessmentsV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentsV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentV2_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineAssessmentV2Resource + string projectName = "contosoProject"; + MachineAssessmentV2Collection collection = resourceGroupResource.GetMachineAssessmentV2s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + MachineAssessmentV2Resource result = await collection.GetAsync(assessmentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineAssessmentV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_MachineAssessmentsV2OperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentsV2Operations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentV2_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineAssessmentV2Resource + string projectName = "contosoProject"; + MachineAssessmentV2Collection collection = resourceGroupResource.GetMachineAssessmentV2s(projectName); + + // invoke the operation and iterate over the result + await foreach (MachineAssessmentV2Resource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineAssessmentV2Data resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_MachineAssessmentsV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentsV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentV2_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineAssessmentV2Resource + string projectName = "contosoProject"; + MachineAssessmentV2Collection collection = resourceGroupResource.GetMachineAssessmentV2s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + bool result = await collection.ExistsAsync(assessmentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_MachineAssessmentsV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentsV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentV2_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineAssessmentV2Resource + string projectName = "contosoProject"; + MachineAssessmentV2Collection collection = resourceGroupResource.GetMachineAssessmentV2s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + NullableResponse response = await collection.GetIfExistsAsync(assessmentName); + MachineAssessmentV2Resource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineAssessmentV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineAssessmentV2Resource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineAssessmentV2Resource.cs new file mode 100644 index 000000000000..93a730e77754 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineAssessmentV2Resource.cs @@ -0,0 +1,189 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_MachineAssessmentV2Resource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_MachineAssessmentsV2OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentsV2Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentV2_Get" 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 MachineAssessmentV2Resource created on azure + // for more information of creating MachineAssessmentV2Resource, please refer to the document of MachineAssessmentV2Resource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier machineAssessmentV2ResourceId = MachineAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + MachineAssessmentV2Resource machineAssessmentV2 = client.GetMachineAssessmentV2Resource(machineAssessmentV2ResourceId); + + // invoke the operation + MachineAssessmentV2Resource result = await machineAssessmentV2.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineAssessmentV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_MachineAssessmentsV2OperationsDeleteMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentsV2Operations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentV2_Delete" 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 MachineAssessmentV2Resource created on azure + // for more information of creating MachineAssessmentV2Resource, please refer to the document of MachineAssessmentV2Resource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier machineAssessmentV2ResourceId = MachineAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + MachineAssessmentV2Resource machineAssessmentV2 = client.GetMachineAssessmentV2Resource(machineAssessmentV2ResourceId); + + // invoke the operation + await machineAssessmentV2.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_MachineAssessmentsV2OperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentsV2Operations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentV2_Create" 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 MachineAssessmentV2Resource created on azure + // for more information of creating MachineAssessmentV2Resource, please refer to the document of MachineAssessmentV2Resource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier machineAssessmentV2ResourceId = MachineAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + MachineAssessmentV2Resource machineAssessmentV2 = client.GetMachineAssessmentV2Resource(machineAssessmentV2ResourceId); + + // invoke the operation + MachineAssessmentV2Data data = new MachineAssessmentV2Data + { + Properties = new MachineAssessmentV2Properties + { + Scope = new Scope + { + ScopeType = ScopeType.ServerGroupId, + ServerGroupId = "f", + AzureResourceGraphQuery = "hfhwuqalmenpcttboxvo", + }, + Settings = new MachineAssessmentSettings + { + AzureLocation = "rsequlcso", + Currency = AzureCurrency.Unknown, + ScalingFactor = 9F, + DiscountPercentage = 5F, + SizingCriterion = AssessmentSizingCriterion.PerformanceBased, + PerformanceData = new PerformanceData + { + Percentile = new Percentile("Unknown"), + TimeRange = TimeRange.Day, + PerfDataStartOn = DateTimeOffset.Parse("2025-02-21T05:47:51.336Z"), + PerfDataEndOn = DateTimeOffset.Parse("2025-02-21T05:47:51.336Z"), + }, + SavingsSettings = new SavingsSettings + { + SavingsOptions = SavingsOption.None, + AzureOfferCode = AzureOffer.Unknown, + }, + BillingSettings = new BillingSettings + { + LicensingProgram = LicensingProgram.Retail, + SubscriptionId = "lee", + }, + EnvironmentType = EnvironmentType.Production, + AzureSecurityOfferingType = AzureSecurityOfferingType.NO, + AzureDiskTypes = { AzureDiskType.Unknown }, + AzurePricingTier = AzurePricingTier.Standard, + AzureStorageRedundancy = AzureStorageRedundancy.Unknown, + AzureHybridUseBenefit = AzureHybridUseBenefit.Unknown, + LinuxAzureHybridUseBenefit = AzureHybridUseBenefit.Unknown, + AzureVmFamilies = { AzureVmFamily.Unknown }, + VmUptime = new VmUptime + { + DaysPerMonth = 9, + HoursPerDay = 10, + }, + }, + Details = new AssessmentDetails(), + }, + }; + ArmOperation lro = await machineAssessmentV2.UpdateAsync(WaitUntil.Completed, data); + MachineAssessmentV2Resource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineAssessmentV2Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DownloadUrl_GetDownloadURLForTheAssessmentReport() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentsV2Operations_DownloadUrl_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentsV2Operations_DownloadUrl" 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 MachineAssessmentV2Resource created on azure + // for more information of creating MachineAssessmentV2Resource, please refer to the document of MachineAssessmentV2Resource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier machineAssessmentV2ResourceId = MachineAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + MachineAssessmentV2Resource machineAssessmentV2 = client.GetMachineAssessmentV2Resource(machineAssessmentV2ResourceId); + + // invoke the operation + DownloadUrlContent content = new DownloadUrlContent(); + ArmOperation lro = await machineAssessmentV2.DownloadUrlAsync(WaitUntil.Completed, content); + DownloadUri result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineAssessmentV2SummaryCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineAssessmentV2SummaryCollection.cs new file mode 100644 index 000000000000..9d704d70c9dc --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineAssessmentV2SummaryCollection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_MachineAssessmentV2SummaryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_MachineAssessmentV2SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentV2SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentV2Summary_Get" 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 MachineAssessmentV2Resource created on azure + // for more information of creating MachineAssessmentV2Resource, please refer to the document of MachineAssessmentV2Resource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier machineAssessmentV2ResourceId = MachineAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + MachineAssessmentV2Resource machineAssessmentV2 = client.GetMachineAssessmentV2Resource(machineAssessmentV2ResourceId); + + // get the collection of this MachineAssessmentV2SummaryResource + MachineAssessmentV2SummaryCollection collection = machineAssessmentV2.GetMachineAssessmentV2Summaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + MachineAssessmentV2SummaryResource result = await collection.GetAsync(summaryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineAssessmentV2SummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_MachineAssessmentV2SummaryOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentV2SummaryOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentV2Summary_ListByParent" 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 MachineAssessmentV2Resource created on azure + // for more information of creating MachineAssessmentV2Resource, please refer to the document of MachineAssessmentV2Resource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier machineAssessmentV2ResourceId = MachineAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + MachineAssessmentV2Resource machineAssessmentV2 = client.GetMachineAssessmentV2Resource(machineAssessmentV2ResourceId); + + // get the collection of this MachineAssessmentV2SummaryResource + MachineAssessmentV2SummaryCollection collection = machineAssessmentV2.GetMachineAssessmentV2Summaries(); + + // invoke the operation and iterate over the result + await foreach (MachineAssessmentV2SummaryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineAssessmentV2SummaryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_MachineAssessmentV2SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentV2SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentV2Summary_Get" 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 MachineAssessmentV2Resource created on azure + // for more information of creating MachineAssessmentV2Resource, please refer to the document of MachineAssessmentV2Resource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier machineAssessmentV2ResourceId = MachineAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + MachineAssessmentV2Resource machineAssessmentV2 = client.GetMachineAssessmentV2Resource(machineAssessmentV2ResourceId); + + // get the collection of this MachineAssessmentV2SummaryResource + MachineAssessmentV2SummaryCollection collection = machineAssessmentV2.GetMachineAssessmentV2Summaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + bool result = await collection.ExistsAsync(summaryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_MachineAssessmentV2SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentV2SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentV2Summary_Get" 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 MachineAssessmentV2Resource created on azure + // for more information of creating MachineAssessmentV2Resource, please refer to the document of MachineAssessmentV2Resource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier machineAssessmentV2ResourceId = MachineAssessmentV2Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + MachineAssessmentV2Resource machineAssessmentV2 = client.GetMachineAssessmentV2Resource(machineAssessmentV2ResourceId); + + // get the collection of this MachineAssessmentV2SummaryResource + MachineAssessmentV2SummaryCollection collection = machineAssessmentV2.GetMachineAssessmentV2Summaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + NullableResponse response = await collection.GetIfExistsAsync(summaryName); + MachineAssessmentV2SummaryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineAssessmentV2SummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineAssessmentV2SummaryResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineAssessmentV2SummaryResource.cs new file mode 100644 index 000000000000..ddec47394136 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineAssessmentV2SummaryResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_MachineAssessmentV2SummaryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_MachineAssessmentV2SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineAssessmentV2SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "MachineAssessmentV2Summary_Get" 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 MachineAssessmentV2SummaryResource created on azure + // for more information of creating MachineAssessmentV2SummaryResource, please refer to the document of MachineAssessmentV2SummaryResource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + string summaryName = "PaaSPreferred"; + ResourceIdentifier machineAssessmentV2SummaryResourceId = MachineAssessmentV2SummaryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, summaryName); + MachineAssessmentV2SummaryResource machineAssessmentV2Summary = client.GetMachineAssessmentV2SummaryResource(machineAssessmentV2SummaryResourceId); + + // invoke the operation + MachineAssessmentV2SummaryResource result = await machineAssessmentV2Summary.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineAssessmentV2SummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineGraphAssessmentOptionCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineGraphAssessmentOptionCollection.cs new file mode 100644 index 000000000000..c5ac346d6d0e --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineGraphAssessmentOptionCollection.cs @@ -0,0 +1,158 @@ +// 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; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_MachineGraphAssessmentOptionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_MachineGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "MachineGraphAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineGraphAssessmentOptionResource + string projectName = "contosoProject"; + MachineGraphAssessmentOptionCollection collection = resourceGroupResource.GetMachineGraphAssessmentOptions(projectName); + + // invoke the operation + MachineGraphAssessmentOptionResource result = await collection.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineGraphAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_MachineGraphAssessmentOptionsOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineGraphAssessmentOptionsOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "MachineGraphAssessmentOptions_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineGraphAssessmentOptionResource + string projectName = "contosoProject"; + MachineGraphAssessmentOptionCollection collection = resourceGroupResource.GetMachineGraphAssessmentOptions(projectName); + + // invoke the operation and iterate over the result + await foreach (MachineGraphAssessmentOptionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineGraphAssessmentOptionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_MachineGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "MachineGraphAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineGraphAssessmentOptionResource + string projectName = "contosoProject"; + MachineGraphAssessmentOptionCollection collection = resourceGroupResource.GetMachineGraphAssessmentOptions(projectName); + + // invoke the operation + bool result = await collection.ExistsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_MachineGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "MachineGraphAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineGraphAssessmentOptionResource + string projectName = "contosoProject"; + MachineGraphAssessmentOptionCollection collection = resourceGroupResource.GetMachineGraphAssessmentOptions(projectName); + + // invoke the operation + NullableResponse response = await collection.GetIfExistsAsync(); + MachineGraphAssessmentOptionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineGraphAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineGraphAssessmentOptionResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineGraphAssessmentOptionResource.cs new file mode 100644 index 000000000000..9c1d9800b130 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MachineGraphAssessmentOptionResource.cs @@ -0,0 +1,48 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_MachineGraphAssessmentOptionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_MachineGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/MachineGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "MachineGraphAssessmentOptions_Get" 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 MachineGraphAssessmentOptionResource created on azure + // for more information of creating MachineGraphAssessmentOptionResource, please refer to the document of MachineGraphAssessmentOptionResource + string subscriptionId = "AEDD0824-BBE9-4E7C-8909-F46C68EA6BB9"; + string resourceGroupName = "rgmachineAssessments"; + string projectName = "contosoProject"; + ResourceIdentifier machineGraphAssessmentOptionResourceId = MachineGraphAssessmentOptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + MachineGraphAssessmentOptionResource machineGraphAssessmentOption = client.GetMachineGraphAssessmentOptionResource(machineGraphAssessmentOptionResourceId); + + // invoke the operation + MachineGraphAssessmentOptionResource result = await machineGraphAssessmentOption.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineGraphAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MigratePrivateEndpointConnectionCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MigratePrivateEndpointConnectionCollection.cs new file mode 100644 index 000000000000..1896cf67e173 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MigratePrivateEndpointConnectionCollection.cs @@ -0,0 +1,204 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_MigratePrivateEndpointConnectionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_PrivateEndpointConnectionOperationsUpdate() + { + // Generated from example definition: 2024-03-03-preview/PrivateEndpointConnectionOperations_Update_MaximumSet_Gen.json + // this example is just showing the usage of "PrivateEndpointConnection_Update" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // get the collection of this MigratePrivateEndpointConnectionResource + MigratePrivateEndpointConnectionCollection collection = assessmentProject.GetMigratePrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "sakanwar1204project1634pe.bf42f8a1-09f5-4ee4-aea6-a019cc60f9d7"; + MigratePrivateEndpointConnectionData data = new MigratePrivateEndpointConnectionData + { + Properties = new PrivateEndpointConnectionProperties(new MigratePrivateLinkServiceConnectionState + { + Status = MigratePrivateEndpointServiceConnectionStatus.Approved, + ActionsRequired = "", + }), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); + MigratePrivateEndpointConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MigratePrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_PrivateEndpointConnectionOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/PrivateEndpointConnectionOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "PrivateEndpointConnection_Get" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // get the collection of this MigratePrivateEndpointConnectionResource + MigratePrivateEndpointConnectionCollection collection = assessmentProject.GetMigratePrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "sakanwar1204project1634pe.bf42f8a1-09f5-4ee4-aea6-a019cc60f9d7"; + MigratePrivateEndpointConnectionResource result = await collection.GetAsync(privateEndpointConnectionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MigratePrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_PrivateEndpointConnectionOperationsListByParent() + { + // Generated from example definition: 2024-03-03-preview/PrivateEndpointConnectionOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "PrivateEndpointConnection_ListByParent" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // get the collection of this MigratePrivateEndpointConnectionResource + MigratePrivateEndpointConnectionCollection collection = assessmentProject.GetMigratePrivateEndpointConnections(); + + // invoke the operation and iterate over the result + await foreach (MigratePrivateEndpointConnectionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MigratePrivateEndpointConnectionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_PrivateEndpointConnectionOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/PrivateEndpointConnectionOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "PrivateEndpointConnection_Get" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // get the collection of this MigratePrivateEndpointConnectionResource + MigratePrivateEndpointConnectionCollection collection = assessmentProject.GetMigratePrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "sakanwar1204project1634pe.bf42f8a1-09f5-4ee4-aea6-a019cc60f9d7"; + bool result = await collection.ExistsAsync(privateEndpointConnectionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_PrivateEndpointConnectionOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/PrivateEndpointConnectionOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "PrivateEndpointConnection_Get" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // get the collection of this MigratePrivateEndpointConnectionResource + MigratePrivateEndpointConnectionCollection collection = assessmentProject.GetMigratePrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "sakanwar1204project1634pe.bf42f8a1-09f5-4ee4-aea6-a019cc60f9d7"; + NullableResponse response = await collection.GetIfExistsAsync(privateEndpointConnectionName); + MigratePrivateEndpointConnectionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MigratePrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MigratePrivateEndpointConnectionResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MigratePrivateEndpointConnectionResource.cs new file mode 100644 index 000000000000..f5d8185fafcf --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MigratePrivateEndpointConnectionResource.cs @@ -0,0 +1,117 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_MigratePrivateEndpointConnectionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_PrivateEndpointConnectionOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/PrivateEndpointConnectionOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "PrivateEndpointConnection_Get" 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 MigratePrivateEndpointConnectionResource created on azure + // for more information of creating MigratePrivateEndpointConnectionResource, please refer to the document of MigratePrivateEndpointConnectionResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + string privateEndpointConnectionName = "sakanwar1204project1634pe.bf42f8a1-09f5-4ee4-aea6-a019cc60f9d7"; + ResourceIdentifier migratePrivateEndpointConnectionResourceId = MigratePrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, privateEndpointConnectionName); + MigratePrivateEndpointConnectionResource migratePrivateEndpointConnection = client.GetMigratePrivateEndpointConnectionResource(migratePrivateEndpointConnectionResourceId); + + // invoke the operation + MigratePrivateEndpointConnectionResource result = await migratePrivateEndpointConnection.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MigratePrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_PrivateEndpointConnectionOperationsDelete() + { + // Generated from example definition: 2024-03-03-preview/PrivateEndpointConnectionOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "PrivateEndpointConnection_Delete" 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 MigratePrivateEndpointConnectionResource created on azure + // for more information of creating MigratePrivateEndpointConnectionResource, please refer to the document of MigratePrivateEndpointConnectionResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + string privateEndpointConnectionName = "sakanwar1204project1634pe.bf42f8a1-09f5-4ee4-aea6-a019cc60f9d7"; + ResourceIdentifier migratePrivateEndpointConnectionResourceId = MigratePrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, privateEndpointConnectionName); + MigratePrivateEndpointConnectionResource migratePrivateEndpointConnection = client.GetMigratePrivateEndpointConnectionResource(migratePrivateEndpointConnectionResourceId); + + // invoke the operation + await migratePrivateEndpointConnection.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_PrivateEndpointConnectionOperationsUpdate() + { + // Generated from example definition: 2024-03-03-preview/PrivateEndpointConnectionOperations_Update_MaximumSet_Gen.json + // this example is just showing the usage of "PrivateEndpointConnection_Update" 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 MigratePrivateEndpointConnectionResource created on azure + // for more information of creating MigratePrivateEndpointConnectionResource, please refer to the document of MigratePrivateEndpointConnectionResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + string privateEndpointConnectionName = "sakanwar1204project1634pe.bf42f8a1-09f5-4ee4-aea6-a019cc60f9d7"; + ResourceIdentifier migratePrivateEndpointConnectionResourceId = MigratePrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, privateEndpointConnectionName); + MigratePrivateEndpointConnectionResource migratePrivateEndpointConnection = client.GetMigratePrivateEndpointConnectionResource(migratePrivateEndpointConnectionResourceId); + + // invoke the operation + MigratePrivateEndpointConnectionData data = new MigratePrivateEndpointConnectionData + { + Properties = new PrivateEndpointConnectionProperties(new MigratePrivateLinkServiceConnectionState + { + Status = MigratePrivateEndpointServiceConnectionStatus.Approved, + ActionsRequired = "", + }), + }; + ArmOperation lro = await migratePrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); + MigratePrivateEndpointConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MigratePrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MigratePrivateLinkResourceDataCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MigratePrivateLinkResourceDataCollection.cs new file mode 100644 index 000000000000..f9f2b4e97472 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MigratePrivateLinkResourceDataCollection.cs @@ -0,0 +1,160 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_MigratePrivateLinkResourceDataCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_PrivateLinkResourceOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/PrivateLinkResourceOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "PrivateLinkResource_Get" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // get the collection of this MigratePrivateLinkResourceDataResource + MigratePrivateLinkResourceDataCollection collection = assessmentProject.GetAllMigratePrivateLinkResourceData(); + + // invoke the operation + string privateLinkResourceName = "Default"; + MigratePrivateLinkResourceDataResource result = await collection.GetAsync(privateLinkResourceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MigratePrivateLinkResourceDataData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_PrivateLinkResourceOperationsListByParent() + { + // Generated from example definition: 2024-03-03-preview/PrivateLinkResourceOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "PrivateLinkResource_ListByParent" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // get the collection of this MigratePrivateLinkResourceDataResource + MigratePrivateLinkResourceDataCollection collection = assessmentProject.GetAllMigratePrivateLinkResourceData(); + + // invoke the operation and iterate over the result + await foreach (MigratePrivateLinkResourceDataResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MigratePrivateLinkResourceDataData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_PrivateLinkResourceOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/PrivateLinkResourceOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "PrivateLinkResource_Get" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // get the collection of this MigratePrivateLinkResourceDataResource + MigratePrivateLinkResourceDataCollection collection = assessmentProject.GetAllMigratePrivateLinkResourceData(); + + // invoke the operation + string privateLinkResourceName = "Default"; + bool result = await collection.ExistsAsync(privateLinkResourceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_PrivateLinkResourceOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/PrivateLinkResourceOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "PrivateLinkResource_Get" 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 AssessmentProjectResource created on azure + // for more information of creating AssessmentProjectResource, please refer to the document of AssessmentProjectResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + ResourceIdentifier assessmentProjectResourceId = AssessmentProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + AssessmentProjectResource assessmentProject = client.GetAssessmentProjectResource(assessmentProjectResourceId); + + // get the collection of this MigratePrivateLinkResourceDataResource + MigratePrivateLinkResourceDataCollection collection = assessmentProject.GetAllMigratePrivateLinkResourceData(); + + // invoke the operation + string privateLinkResourceName = "Default"; + NullableResponse response = await collection.GetIfExistsAsync(privateLinkResourceName); + MigratePrivateLinkResourceDataResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MigratePrivateLinkResourceDataData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MigratePrivateLinkResourceDataResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MigratePrivateLinkResourceDataResource.cs new file mode 100644 index 000000000000..1df86a0dd65d --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_MigratePrivateLinkResourceDataResource.cs @@ -0,0 +1,49 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_MigratePrivateLinkResourceDataResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_PrivateLinkResourceOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/PrivateLinkResourceOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "PrivateLinkResource_Get" 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 MigratePrivateLinkResourceDataResource created on azure + // for more information of creating MigratePrivateLinkResourceDataResource, please refer to the document of MigratePrivateLinkResourceDataResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "sakanwar"; + string projectName = "sakanwar1204project"; + string privateLinkResourceName = "Default"; + ResourceIdentifier migratePrivateLinkResourceDataResourceId = MigratePrivateLinkResourceDataResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, privateLinkResourceName); + MigratePrivateLinkResourceDataResource migratePrivateLinkResourceData = client.GetMigratePrivateLinkResourceDataResource(migratePrivateLinkResourceDataResourceId); + + // invoke the operation + MigratePrivateLinkResourceDataResource result = await migratePrivateLinkResourceData.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MigratePrivateLinkResourceDataData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_OverviewSummaryCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_OverviewSummaryCollection.cs new file mode 100644 index 000000000000..b3bd231ff47f --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_OverviewSummaryCollection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_OverviewSummaryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BusinessCaseOverviewSummaryOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOverviewSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OverviewSummary_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this OverviewSummaryResource + OverviewSummaryCollection collection = businessCase.GetOverviewSummaries(); + + // invoke the operation + string overviewSummaryName = "MySummary"; + OverviewSummaryResource result = await collection.GetAsync(overviewSummaryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + OverviewSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_BusinessCaseOverviewSummaryOperationsListByParentMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOverviewSummaryOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "OverviewSummary_ListByParent" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this OverviewSummaryResource + OverviewSummaryCollection collection = businessCase.GetOverviewSummaries(); + + // invoke the operation and iterate over the result + await foreach (OverviewSummaryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + OverviewSummaryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_BusinessCaseOverviewSummaryOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOverviewSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OverviewSummary_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this OverviewSummaryResource + OverviewSummaryCollection collection = businessCase.GetOverviewSummaries(); + + // invoke the operation + string overviewSummaryName = "MySummary"; + bool result = await collection.ExistsAsync(overviewSummaryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_BusinessCaseOverviewSummaryOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOverviewSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OverviewSummary_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this OverviewSummaryResource + OverviewSummaryCollection collection = businessCase.GetOverviewSummaries(); + + // invoke the operation + string overviewSummaryName = "MySummary"; + NullableResponse response = await collection.GetIfExistsAsync(overviewSummaryName); + OverviewSummaryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + OverviewSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_OverviewSummaryResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_OverviewSummaryResource.cs new file mode 100644 index 000000000000..d68466a4639c --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_OverviewSummaryResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_OverviewSummaryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BusinessCaseOverviewSummaryOperationsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/BusinessCaseOverviewSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OverviewSummary_Get" 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 OverviewSummaryResource created on azure + // for more information of creating OverviewSummaryResource, please refer to the document of OverviewSummaryResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + string overviewSummaryName = "MySummary"; + ResourceIdentifier overviewSummaryResourceId = OverviewSummaryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName, overviewSummaryName); + OverviewSummaryResource overviewSummary = client.GetOverviewSummaryResource(overviewSummaryResourceId); + + // invoke the operation + OverviewSummaryResource result = await overviewSummary.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + OverviewSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_PaasSummaryCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_PaasSummaryCollection.cs new file mode 100644 index 000000000000..be326b3c0dea --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_PaasSummaryCollection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_PaasSummaryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BusinessCasePaasSummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCasePaasSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "PaasSummary_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this PaasSummaryResource + PaasSummaryCollection collection = businessCase.GetPaasSummaries(); + + // invoke the operation + string paasSummaryName = "MySummary"; + PaasSummaryResource result = await collection.GetAsync(paasSummaryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PaasSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_BusinessCasePaasSummaryOperationsListByParentMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-03-03-preview/BusinessCasePaasSummaryOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "PaasSummary_ListByParent" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this PaasSummaryResource + PaasSummaryCollection collection = businessCase.GetPaasSummaries(); + + // invoke the operation and iterate over the result + await foreach (PaasSummaryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PaasSummaryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_BusinessCasePaasSummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCasePaasSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "PaasSummary_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this PaasSummaryResource + PaasSummaryCollection collection = businessCase.GetPaasSummaries(); + + // invoke the operation + string paasSummaryName = "MySummary"; + bool result = await collection.ExistsAsync(paasSummaryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_BusinessCasePaasSummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCasePaasSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "PaasSummary_Get" 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 BusinessCaseResource created on azure + // for more information of creating BusinessCaseResource, please refer to the document of BusinessCaseResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + ResourceIdentifier businessCaseResourceId = BusinessCaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName); + BusinessCaseResource businessCase = client.GetBusinessCaseResource(businessCaseResourceId); + + // get the collection of this PaasSummaryResource + PaasSummaryCollection collection = businessCase.GetPaasSummaries(); + + // invoke the operation + string paasSummaryName = "MySummary"; + NullableResponse response = await collection.GetIfExistsAsync(paasSummaryName); + PaasSummaryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PaasSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_PaasSummaryResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_PaasSummaryResource.cs new file mode 100644 index 000000000000..ad0ec059bd3e --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_PaasSummaryResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_PaasSummaryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BusinessCasePaasSummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/BusinessCasePaasSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "PaasSummary_Get" 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 PaasSummaryResource created on azure + // for more information of creating PaasSummaryResource, please refer to the document of PaasSummaryResource + string subscriptionId = "ADC896AD-6A38-454E-9A62-AFC618F5F4BC"; + string resourceGroupName = "rgbusinessCases"; + string projectName = "MyMigrateProject"; + string businessCaseName = "MyBusinessCase"; + string paasSummaryName = "MySummary"; + ResourceIdentifier paasSummaryResourceId = PaasSummaryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, businessCaseName, paasSummaryName); + PaasSummaryResource paasSummary = client.GetPaasSummaryResource(paasSummaryResourceId); + + // invoke the operation + PaasSummaryResource result = await paasSummary.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PaasSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ServerCollectorCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ServerCollectorCollection.cs new file mode 100644 index 000000000000..46929e1e5b4b --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ServerCollectorCollection.cs @@ -0,0 +1,216 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_ServerCollectorCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ServerCollectorsOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/ServerCollectorsOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "ServerCollector_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ServerCollectorResource + string projectName = "app18700project"; + ServerCollectorCollection collection = resourceGroupResource.GetServerCollectors(projectName); + + // invoke the operation + string serverCollectorName = "walter389fcollector"; + ServerCollectorData data = new ServerCollectorData + { + Properties = new CollectorPropertiesBaseWithAgent + { + AgentProperties = new CollectorAgentPropertiesBase + { + Id = "498e4965-bbb1-47c2-8613-345baff9c509", + SpnDetails = new CollectorAgentSpnPropertiesBase + { + Authority = "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + ApplicationId = "65153d2f-9afb-44e8-b3ca-1369150b7354", + Audience = "65153d2f-9afb-44e8-b3ca-1369150b7354", + ObjectId = "ddde6f96-87c8-420b-9d4d-f16a5090519e", + TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47", + }, + }, + DiscoverySiteId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/ayagrawRG/providers/Microsoft.OffAzure/ServerSites/walter7155site", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serverCollectorName, data); + ServerCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ServerCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ServerCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/ServerCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ServerCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ServerCollectorResource + string projectName = "app18700project"; + ServerCollectorCollection collection = resourceGroupResource.GetServerCollectors(projectName); + + // invoke the operation + string serverCollectorName = "walter389fcollector"; + ServerCollectorResource result = await collection.GetAsync(serverCollectorName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ServerCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ServerCollectorsOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/ServerCollectorsOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "ServerCollector_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ServerCollectorResource + string projectName = "app18700project"; + ServerCollectorCollection collection = resourceGroupResource.GetServerCollectors(projectName); + + // invoke the operation and iterate over the result + await foreach (ServerCollectorResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ServerCollectorData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ServerCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/ServerCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ServerCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ServerCollectorResource + string projectName = "app18700project"; + ServerCollectorCollection collection = resourceGroupResource.GetServerCollectors(projectName); + + // invoke the operation + string serverCollectorName = "walter389fcollector"; + bool result = await collection.ExistsAsync(serverCollectorName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ServerCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/ServerCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ServerCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ServerCollectorResource + string projectName = "app18700project"; + ServerCollectorCollection collection = resourceGroupResource.GetServerCollectors(projectName); + + // invoke the operation + string serverCollectorName = "walter389fcollector"; + NullableResponse response = await collection.GetIfExistsAsync(serverCollectorName); + ServerCollectorResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ServerCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ServerCollectorResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ServerCollectorResource.cs new file mode 100644 index 000000000000..7ee487c647dd --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_ServerCollectorResource.cs @@ -0,0 +1,128 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_ServerCollectorResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ServerCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/ServerCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ServerCollector_Get" 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 ServerCollectorResource created on azure + // for more information of creating ServerCollectorResource, please refer to the document of ServerCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + string projectName = "app18700project"; + string serverCollectorName = "walter389fcollector"; + ResourceIdentifier serverCollectorResourceId = ServerCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, serverCollectorName); + ServerCollectorResource serverCollector = client.GetServerCollectorResource(serverCollectorResourceId); + + // invoke the operation + ServerCollectorResource result = await serverCollector.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ServerCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ServerCollectorsOperationsDelete() + { + // Generated from example definition: 2024-03-03-preview/ServerCollectorsOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "ServerCollector_Delete" 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 ServerCollectorResource created on azure + // for more information of creating ServerCollectorResource, please refer to the document of ServerCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + string projectName = "app18700project"; + string serverCollectorName = "walter389fcollector"; + ResourceIdentifier serverCollectorResourceId = ServerCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, serverCollectorName); + ServerCollectorResource serverCollector = client.GetServerCollectorResource(serverCollectorResourceId); + + // invoke the operation + await serverCollector.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ServerCollectorsOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/ServerCollectorsOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "ServerCollector_Create" 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 ServerCollectorResource created on azure + // for more information of creating ServerCollectorResource, please refer to the document of ServerCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + string projectName = "app18700project"; + string serverCollectorName = "walter389fcollector"; + ResourceIdentifier serverCollectorResourceId = ServerCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, serverCollectorName); + ServerCollectorResource serverCollector = client.GetServerCollectorResource(serverCollectorResourceId); + + // invoke the operation + ServerCollectorData data = new ServerCollectorData + { + Properties = new CollectorPropertiesBaseWithAgent + { + AgentProperties = new CollectorAgentPropertiesBase + { + Id = "498e4965-bbb1-47c2-8613-345baff9c509", + SpnDetails = new CollectorAgentSpnPropertiesBase + { + Authority = "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + ApplicationId = "65153d2f-9afb-44e8-b3ca-1369150b7354", + Audience = "65153d2f-9afb-44e8-b3ca-1369150b7354", + ObjectId = "ddde6f96-87c8-420b-9d4d-f16a5090519e", + TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47", + }, + }, + DiscoverySiteId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/ayagrawRG/providers/Microsoft.OffAzure/ServerSites/walter7155site", + }, + }; + ArmOperation lro = await serverCollector.UpdateAsync(WaitUntil.Completed, data); + ServerCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ServerCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlAssessmentV3Collection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlAssessmentV3Collection.cs new file mode 100644 index 000000000000..974d4666a0a8 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlAssessmentV3Collection.cs @@ -0,0 +1,264 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_SqlAssessmentV3Collection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SqlAssessmentV3OperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3Operations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlAssessmentV3Resource + string projectName = "contosoProject"; + SqlAssessmentV3Collection collection = resourceGroupResource.GetSqlAssessmentV3s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + SqlAssessmentV3Data data = new SqlAssessmentV3Data + { + Properties = new SqlAssessmentV3Properties + { + Scope = new Scope + { + ScopeType = ScopeType.ServerGroupId, + ServerGroupId = "ppxcjyrxfmpm", + AzureResourceGraphQuery = "ddqs", + }, + Settings = new SqlAssessmentSettings + { + AzureLocation = "vtpazagckatiezkiwol", + Currency = AzureCurrency.Unknown, + ScalingFactor = 27F, + DiscountPercentage = 8F, + SizingCriterion = AssessmentSizingCriterion.PerformanceBased, + PerformanceData = new PerformanceData + { + Percentile = new Percentile("Unknown"), + TimeRange = TimeRange.Day, + PerfDataStartOn = DateTimeOffset.Parse("2025-02-21T05:15:28.133Z"), + PerfDataEndOn = DateTimeOffset.Parse("2025-02-21T05:15:28.133Z"), + }, + SavingsSettings = new SavingsSettings + { + SavingsOptions = SavingsOption.None, + AzureOfferCode = AzureOffer.Unknown, + }, + BillingSettings = new BillingSettings + { + LicensingProgram = LicensingProgram.Retail, + SubscriptionId = "sp", + }, + EnvironmentType = EnvironmentType.Production, + OSLicense = OSLicense.Unknown, + EntityUptime = new EntityUptime + { + DaysPerMonth = 2, + HoursPerDay = 28, + }, + PreferredTargets = { AzureTarget.Unknown }, + AzureSqlManagedInstanceSettings = new SqlMiSettingsV3 + { + AzureSqlServiceTier = AzureSqlServiceTierV3.SqlServiceUnknown, + AzureSqlInstanceType = AzureSqlInstanceType.Unknown, + }, + AzureSqlDatabaseSettings = new SqlDbSettingsV3 + { + AzureSqlServiceTier = AzureSqlServiceTierV3.SqlServiceUnknown, + AzureSqlDataBaseType = AzureSqlDataBaseType.Unknown, + AzureSqlComputeTier = ComputeTier.Unknown, + AzureSqlPurchaseModel = AzureSqlPurchaseModel.Unknown, + }, + AzureSqlVmInstanceSeries = { AzureVmFamily.Unknown }, + MultiSubnetIntent = MultiSubnetIntent.None, + AsyncCommitModeIntent = AsyncCommitModeIntent.None, + IsInternetAccessAvailable = true, + DisasterRecoveryLocation = Models.AzureLocation.Unknown, + EnableHadrAssessment = true, + AzureSecurityOfferingType = AzureSecurityOfferingType.NO, + SqlServerLicense = SqlServerLicense.Unknown, + }, + Details = new AssessmentDetails(), + FallbackMachineAssessmentArmId = "jfwkifsuigza", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, assessmentName, data); + SqlAssessmentV3Resource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlAssessmentV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SqlAssessmentV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlAssessmentV3Resource + string projectName = "contosoProject"; + SqlAssessmentV3Collection collection = resourceGroupResource.GetSqlAssessmentV3s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + SqlAssessmentV3Resource result = await collection.GetAsync(assessmentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlAssessmentV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SqlAssessmentV3OperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3Operations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlAssessmentV3Resource + string projectName = "contosoProject"; + SqlAssessmentV3Collection collection = resourceGroupResource.GetSqlAssessmentV3s(projectName); + + // invoke the operation and iterate over the result + await foreach (SqlAssessmentV3Resource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlAssessmentV3Data resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SqlAssessmentV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlAssessmentV3Resource + string projectName = "contosoProject"; + SqlAssessmentV3Collection collection = resourceGroupResource.GetSqlAssessmentV3s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + bool result = await collection.ExistsAsync(assessmentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SqlAssessmentV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlAssessmentV3Resource + string projectName = "contosoProject"; + SqlAssessmentV3Collection collection = resourceGroupResource.GetSqlAssessmentV3s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + NullableResponse response = await collection.GetIfExistsAsync(assessmentName); + SqlAssessmentV3Resource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlAssessmentV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlAssessmentV3Resource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlAssessmentV3Resource.cs new file mode 100644 index 000000000000..d68c968d5264 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlAssessmentV3Resource.cs @@ -0,0 +1,205 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_SqlAssessmentV3Resource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SqlAssessmentV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3_Get" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // invoke the operation + SqlAssessmentV3Resource result = await sqlAssessmentV3.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlAssessmentV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SqlAssessmentV3OperationsDeleteMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3Operations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3_Delete" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // invoke the operation + await sqlAssessmentV3.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SqlAssessmentV3OperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3Operations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3_Create" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // invoke the operation + SqlAssessmentV3Data data = new SqlAssessmentV3Data + { + Properties = new SqlAssessmentV3Properties + { + Scope = new Scope + { + ScopeType = ScopeType.ServerGroupId, + ServerGroupId = "ppxcjyrxfmpm", + AzureResourceGraphQuery = "ddqs", + }, + Settings = new SqlAssessmentSettings + { + AzureLocation = "vtpazagckatiezkiwol", + Currency = AzureCurrency.Unknown, + ScalingFactor = 27F, + DiscountPercentage = 8F, + SizingCriterion = AssessmentSizingCriterion.PerformanceBased, + PerformanceData = new PerformanceData + { + Percentile = new Percentile("Unknown"), + TimeRange = TimeRange.Day, + PerfDataStartOn = DateTimeOffset.Parse("2025-02-21T05:15:28.133Z"), + PerfDataEndOn = DateTimeOffset.Parse("2025-02-21T05:15:28.133Z"), + }, + SavingsSettings = new SavingsSettings + { + SavingsOptions = SavingsOption.None, + AzureOfferCode = AzureOffer.Unknown, + }, + BillingSettings = new BillingSettings + { + LicensingProgram = LicensingProgram.Retail, + SubscriptionId = "sp", + }, + EnvironmentType = EnvironmentType.Production, + OSLicense = OSLicense.Unknown, + EntityUptime = new EntityUptime + { + DaysPerMonth = 2, + HoursPerDay = 28, + }, + PreferredTargets = { AzureTarget.Unknown }, + AzureSqlManagedInstanceSettings = new SqlMiSettingsV3 + { + AzureSqlServiceTier = AzureSqlServiceTierV3.SqlServiceUnknown, + AzureSqlInstanceType = AzureSqlInstanceType.Unknown, + }, + AzureSqlDatabaseSettings = new SqlDbSettingsV3 + { + AzureSqlServiceTier = AzureSqlServiceTierV3.SqlServiceUnknown, + AzureSqlDataBaseType = AzureSqlDataBaseType.Unknown, + AzureSqlComputeTier = ComputeTier.Unknown, + AzureSqlPurchaseModel = AzureSqlPurchaseModel.Unknown, + }, + AzureSqlVmInstanceSeries = { AzureVmFamily.Unknown }, + MultiSubnetIntent = MultiSubnetIntent.None, + AsyncCommitModeIntent = AsyncCommitModeIntent.None, + IsInternetAccessAvailable = true, + DisasterRecoveryLocation = Models.AzureLocation.Unknown, + EnableHadrAssessment = true, + AzureSecurityOfferingType = AzureSecurityOfferingType.NO, + SqlServerLicense = SqlServerLicense.Unknown, + }, + Details = new AssessmentDetails(), + FallbackMachineAssessmentArmId = "jfwkifsuigza", + }, + }; + ArmOperation lro = await sqlAssessmentV3.UpdateAsync(WaitUntil.Completed, data); + SqlAssessmentV3Resource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlAssessmentV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DownloadUrl_GetDownloadURLForTheAssessmentReport() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3Operations_DownloadUrl_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3Operations_DownloadUrl" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // invoke the operation + DownloadUrlContent content = new DownloadUrlContent(); + ArmOperation lro = await sqlAssessmentV3.DownloadUrlAsync(WaitUntil.Completed, content); + DownloadUri result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlAssessmentV3SummaryCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlAssessmentV3SummaryCollection.cs new file mode 100644 index 000000000000..9ecb94f3038a --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlAssessmentV3SummaryCollection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_SqlAssessmentV3SummaryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SqlAssessmentV3SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3Summary_Get" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this SqlAssessmentV3SummaryResource + SqlAssessmentV3SummaryCollection collection = sqlAssessmentV3.GetSqlAssessmentV3Summaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + SqlAssessmentV3SummaryResource result = await collection.GetAsync(summaryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlAssessmentV3SummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SqlAssessmentV3SummaryOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3SummaryOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3Summary_ListByParent" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this SqlAssessmentV3SummaryResource + SqlAssessmentV3SummaryCollection collection = sqlAssessmentV3.GetSqlAssessmentV3Summaries(); + + // invoke the operation and iterate over the result + await foreach (SqlAssessmentV3SummaryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlAssessmentV3SummaryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SqlAssessmentV3SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3Summary_Get" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this SqlAssessmentV3SummaryResource + SqlAssessmentV3SummaryCollection collection = sqlAssessmentV3.GetSqlAssessmentV3Summaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + bool result = await collection.ExistsAsync(summaryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SqlAssessmentV3SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3Summary_Get" 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 SqlAssessmentV3Resource created on azure + // for more information of creating SqlAssessmentV3Resource, please refer to the document of SqlAssessmentV3Resource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier sqlAssessmentV3ResourceId = SqlAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + SqlAssessmentV3Resource sqlAssessmentV3 = client.GetSqlAssessmentV3Resource(sqlAssessmentV3ResourceId); + + // get the collection of this SqlAssessmentV3SummaryResource + SqlAssessmentV3SummaryCollection collection = sqlAssessmentV3.GetSqlAssessmentV3Summaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + NullableResponse response = await collection.GetIfExistsAsync(summaryName); + SqlAssessmentV3SummaryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlAssessmentV3SummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlAssessmentV3SummaryResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlAssessmentV3SummaryResource.cs new file mode 100644 index 000000000000..0ef7810da944 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlAssessmentV3SummaryResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_SqlAssessmentV3SummaryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SqlAssessmentV3SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlAssessmentV3SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlAssessmentV3Summary_Get" 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 SqlAssessmentV3SummaryResource created on azure + // for more information of creating SqlAssessmentV3SummaryResource, please refer to the document of SqlAssessmentV3SummaryResource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + string summaryName = "PaaSPreferred"; + ResourceIdentifier sqlAssessmentV3SummaryResourceId = SqlAssessmentV3SummaryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, summaryName); + SqlAssessmentV3SummaryResource sqlAssessmentV3Summary = client.GetSqlAssessmentV3SummaryResource(sqlAssessmentV3SummaryResourceId); + + // invoke the operation + SqlAssessmentV3SummaryResource result = await sqlAssessmentV3Summary.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlAssessmentV3SummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlCollectorCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlCollectorCollection.cs new file mode 100644 index 000000000000..45c2d10926f4 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlCollectorCollection.cs @@ -0,0 +1,216 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_SqlCollectorCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SqlCollectorOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/SqlCollectorOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "SqlCollector_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "rgmigrate"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlCollectorResource + string projectName = "fci-test6904project"; + SqlCollectorCollection collection = resourceGroupResource.GetSqlCollectors(projectName); + + // invoke the operation + string collectorName = "fci-test0c1esqlsitecollector"; + SqlCollectorData data = new SqlCollectorData + { + Properties = new CollectorPropertiesBaseWithAgent + { + AgentProperties = new CollectorAgentPropertiesBase + { + Id = "630da710-4d44-41f7-a189-72fe3db5502b-agent", + SpnDetails = new CollectorAgentSpnPropertiesBase + { + Authority = "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + ApplicationId = "db9c4c3d-477c-4d5a-817b-318276713565", + Audience = "db9c4c3d-477c-4d5a-817b-318276713565", + ObjectId = "e50236ad-ad07-47d4-af71-ed7b52d200d5", + TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47", + }, + }, + DiscoverySiteId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/bansalankit-rg/providers/Microsoft.OffAzure/MasterSites/fci-ankit-test6065mastersite/SqlSites/fci-ankit-test6065sqlsites", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, collectorName, data); + SqlCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SqlCollectorOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/SqlCollectorOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "rgmigrate"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlCollectorResource + string projectName = "fci-test6904project"; + SqlCollectorCollection collection = resourceGroupResource.GetSqlCollectors(projectName); + + // invoke the operation + string collectorName = "fci-test0c1esqlsitecollector"; + SqlCollectorResource result = await collection.GetAsync(collectorName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SqlCollectorOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlCollectorOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "SqlCollector_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "rgmigrate"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlCollectorResource + string projectName = "fci-test6904project"; + SqlCollectorCollection collection = resourceGroupResource.GetSqlCollectors(projectName); + + // invoke the operation and iterate over the result + await foreach (SqlCollectorResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlCollectorData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SqlCollectorOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/SqlCollectorOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "rgmigrate"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlCollectorResource + string projectName = "fci-test6904project"; + SqlCollectorCollection collection = resourceGroupResource.GetSqlCollectors(projectName); + + // invoke the operation + string collectorName = "fci-test0c1esqlsitecollector"; + bool result = await collection.ExistsAsync(collectorName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SqlCollectorOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/SqlCollectorOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "rgmigrate"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlCollectorResource + string projectName = "fci-test6904project"; + SqlCollectorCollection collection = resourceGroupResource.GetSqlCollectors(projectName); + + // invoke the operation + string collectorName = "fci-test0c1esqlsitecollector"; + NullableResponse response = await collection.GetIfExistsAsync(collectorName); + SqlCollectorResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlCollectorResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlCollectorResource.cs new file mode 100644 index 000000000000..893c6163f868 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlCollectorResource.cs @@ -0,0 +1,128 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_SqlCollectorResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SqlCollectorOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/SqlCollectorOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlCollector_Get" 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 SqlCollectorResource created on azure + // for more information of creating SqlCollectorResource, please refer to the document of SqlCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "rgmigrate"; + string projectName = "fci-test6904project"; + string collectorName = "fci-test0c1esqlsitecollector"; + ResourceIdentifier sqlCollectorResourceId = SqlCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, collectorName); + SqlCollectorResource sqlCollector = client.GetSqlCollectorResource(sqlCollectorResourceId); + + // invoke the operation + SqlCollectorResource result = await sqlCollector.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SqlCollectorOperationsDelete() + { + // Generated from example definition: 2024-03-03-preview/SqlCollectorOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "SqlCollector_Delete" 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 SqlCollectorResource created on azure + // for more information of creating SqlCollectorResource, please refer to the document of SqlCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "rgmigrate"; + string projectName = "fci-test6904project"; + string collectorName = "fci-test0c1esqlsitecollector"; + ResourceIdentifier sqlCollectorResourceId = SqlCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, collectorName); + SqlCollectorResource sqlCollector = client.GetSqlCollectorResource(sqlCollectorResourceId); + + // invoke the operation + await sqlCollector.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SqlCollectorOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/SqlCollectorOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "SqlCollector_Create" 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 SqlCollectorResource created on azure + // for more information of creating SqlCollectorResource, please refer to the document of SqlCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "rgmigrate"; + string projectName = "fci-test6904project"; + string collectorName = "fci-test0c1esqlsitecollector"; + ResourceIdentifier sqlCollectorResourceId = SqlCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, collectorName); + SqlCollectorResource sqlCollector = client.GetSqlCollectorResource(sqlCollectorResourceId); + + // invoke the operation + SqlCollectorData data = new SqlCollectorData + { + Properties = new CollectorPropertiesBaseWithAgent + { + AgentProperties = new CollectorAgentPropertiesBase + { + Id = "630da710-4d44-41f7-a189-72fe3db5502b-agent", + SpnDetails = new CollectorAgentSpnPropertiesBase + { + Authority = "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + ApplicationId = "db9c4c3d-477c-4d5a-817b-318276713565", + Audience = "db9c4c3d-477c-4d5a-817b-318276713565", + ObjectId = "e50236ad-ad07-47d4-af71-ed7b52d200d5", + TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47", + }, + }, + DiscoverySiteId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/bansalankit-rg/providers/Microsoft.OffAzure/MasterSites/fci-ankit-test6065mastersite/SqlSites/fci-ankit-test6065sqlsites", + }, + }; + ArmOperation lro = await sqlCollector.UpdateAsync(WaitUntil.Completed, data); + SqlCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlGraphAssessmentOptionCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlGraphAssessmentOptionCollection.cs new file mode 100644 index 000000000000..f0ae6c5db983 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlGraphAssessmentOptionCollection.cs @@ -0,0 +1,158 @@ +// 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; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_SqlGraphAssessmentOptionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SqlGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlGraphAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlGraphAssessmentOptionResource + string projectName = "contosoProject"; + SqlGraphAssessmentOptionCollection collection = resourceGroupResource.GetSqlGraphAssessmentOptions(projectName); + + // invoke the operation + SqlGraphAssessmentOptionResource result = await collection.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlGraphAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SqlGraphAssessmentOptionsOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlGraphAssessmentOptionsOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "SqlGraphAssessmentOptions_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C1DB66AE-BCF9-42FD-ADC2-390E0721C351"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlGraphAssessmentOptionResource + string projectName = "contosoProject"; + SqlGraphAssessmentOptionCollection collection = resourceGroupResource.GetSqlGraphAssessmentOptions(projectName); + + // invoke the operation and iterate over the result + await foreach (SqlGraphAssessmentOptionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlGraphAssessmentOptionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SqlGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlGraphAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlGraphAssessmentOptionResource + string projectName = "contosoProject"; + SqlGraphAssessmentOptionCollection collection = resourceGroupResource.GetSqlGraphAssessmentOptions(projectName); + + // invoke the operation + bool result = await collection.ExistsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SqlGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlGraphAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlGraphAssessmentOptionResource + string projectName = "contosoProject"; + SqlGraphAssessmentOptionCollection collection = resourceGroupResource.GetSqlGraphAssessmentOptions(projectName); + + // invoke the operation + NullableResponse response = await collection.GetIfExistsAsync(); + SqlGraphAssessmentOptionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlGraphAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlGraphAssessmentOptionResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlGraphAssessmentOptionResource.cs new file mode 100644 index 000000000000..59cbf2f76266 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SqlGraphAssessmentOptionResource.cs @@ -0,0 +1,48 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_SqlGraphAssessmentOptionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SqlGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/SqlGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SqlGraphAssessmentOptions_Get" 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 SqlGraphAssessmentOptionResource created on azure + // for more information of creating SqlGraphAssessmentOptionResource, please refer to the document of SqlGraphAssessmentOptionResource + string subscriptionId = "C9266982-8528-4ED9-B481-C264A7164AB9"; + string resourceGroupName = "rgsqlAssessments"; + string projectName = "contosoProject"; + ResourceIdentifier sqlGraphAssessmentOptionResourceId = SqlGraphAssessmentOptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + SqlGraphAssessmentOptionResource sqlGraphAssessmentOption = client.GetSqlGraphAssessmentOptionResource(sqlGraphAssessmentOptionResourceId); + + // invoke the operation + SqlGraphAssessmentOptionResource result = await sqlGraphAssessmentOption.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlGraphAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..cfa3841977c8 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,50 @@ +// 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; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAssessmentProjects_AssessmentProjectsOperationsListBySubscription() + { + // Generated from example definition: 2024-03-03-preview/AssessmentProjectsOperations_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "AssessmentProject_ListBySubscription" 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 = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (AssessmentProjectResource item in subscriptionResource.GetAssessmentProjectsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AssessmentProjectData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_VmwareCollectorCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_VmwareCollectorCollection.cs new file mode 100644 index 000000000000..0067fccafd4c --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_VmwareCollectorCollection.cs @@ -0,0 +1,218 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_VmwareCollectorCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_VmwareCollectorsOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/VmwareCollectorsOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "VmwareCollector_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this VmwareCollectorResource + string projectName = "app18700project"; + VmwareCollectorCollection collection = resourceGroupResource.GetVmwareCollectors(projectName); + + // invoke the operation + string vmWareCollectorName = "Vmware2258collector"; + VmwareCollectorData data = new VmwareCollectorData + { + Properties = new CollectorPropertiesBaseWithAgent + { + AgentProperties = new CollectorAgentPropertiesBase + { + Id = "fe243486-3318-41fa-aaba-c48b5df75308", + Version = "1.0.8.383", + LastHeartbeatUtc = DateTimeOffset.Parse("2022-03-29T12:10:08.9167289Z"), + SpnDetails = new CollectorAgentSpnPropertiesBase + { + Authority = "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + ApplicationId = "82b3e452-c0e8-4662-8347-58282925ae84", + Audience = "82b3e452-c0e8-4662-8347-58282925ae84", + ObjectId = "3fc89111-1405-4938-9214-37aa4739401d", + TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47", + }, + }, + DiscoverySiteId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/ayagrawRG/providers/Microsoft.OffAzure/VMwareSites/Vmware2744site", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, vmWareCollectorName, data); + VmwareCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VmwareCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_VmwareCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/VmwareCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "VmwareCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this VmwareCollectorResource + string projectName = "app18700project"; + VmwareCollectorCollection collection = resourceGroupResource.GetVmwareCollectors(projectName); + + // invoke the operation + string vmWareCollectorName = "Vmware2258collector"; + VmwareCollectorResource result = await collection.GetAsync(vmWareCollectorName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VmwareCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_VmwareCollectorsOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/VmwareCollectorsOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "VmwareCollector_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this VmwareCollectorResource + string projectName = "app18700project"; + VmwareCollectorCollection collection = resourceGroupResource.GetVmwareCollectors(projectName); + + // invoke the operation and iterate over the result + await foreach (VmwareCollectorResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VmwareCollectorData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_VmwareCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/VmwareCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "VmwareCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this VmwareCollectorResource + string projectName = "app18700project"; + VmwareCollectorCollection collection = resourceGroupResource.GetVmwareCollectors(projectName); + + // invoke the operation + string vmWareCollectorName = "Vmware2258collector"; + bool result = await collection.ExistsAsync(vmWareCollectorName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_VmwareCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/VmwareCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "VmwareCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this VmwareCollectorResource + string projectName = "app18700project"; + VmwareCollectorCollection collection = resourceGroupResource.GetVmwareCollectors(projectName); + + // invoke the operation + string vmWareCollectorName = "Vmware2258collector"; + NullableResponse response = await collection.GetIfExistsAsync(vmWareCollectorName); + VmwareCollectorResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VmwareCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_VmwareCollectorResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_VmwareCollectorResource.cs new file mode 100644 index 000000000000..2047218e49f4 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_VmwareCollectorResource.cs @@ -0,0 +1,130 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_VmwareCollectorResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_VmwareCollectorsOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/VmwareCollectorsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "VmwareCollector_Get" 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 VmwareCollectorResource created on azure + // for more information of creating VmwareCollectorResource, please refer to the document of VmwareCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + string projectName = "app18700project"; + string vmWareCollectorName = "Vmware2258collector"; + ResourceIdentifier vmwareCollectorResourceId = VmwareCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, vmWareCollectorName); + VmwareCollectorResource vmwareCollector = client.GetVmwareCollectorResource(vmwareCollectorResourceId); + + // invoke the operation + VmwareCollectorResource result = await vmwareCollector.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VmwareCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_VmwareCollectorsOperationsDelete() + { + // Generated from example definition: 2024-03-03-preview/VmwareCollectorsOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "VmwareCollector_Delete" 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 VmwareCollectorResource created on azure + // for more information of creating VmwareCollectorResource, please refer to the document of VmwareCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + string projectName = "app18700project"; + string vmWareCollectorName = "Vmware2258collector"; + ResourceIdentifier vmwareCollectorResourceId = VmwareCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, vmWareCollectorName); + VmwareCollectorResource vmwareCollector = client.GetVmwareCollectorResource(vmwareCollectorResourceId); + + // invoke the operation + await vmwareCollector.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_VmwareCollectorsOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/VmwareCollectorsOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "VmwareCollector_Create" 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 VmwareCollectorResource created on azure + // for more information of creating VmwareCollectorResource, please refer to the document of VmwareCollectorResource + string subscriptionId = "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; + string resourceGroupName = "ayagrawRG"; + string projectName = "app18700project"; + string vmWareCollectorName = "Vmware2258collector"; + ResourceIdentifier vmwareCollectorResourceId = VmwareCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, vmWareCollectorName); + VmwareCollectorResource vmwareCollector = client.GetVmwareCollectorResource(vmwareCollectorResourceId); + + // invoke the operation + VmwareCollectorData data = new VmwareCollectorData + { + Properties = new CollectorPropertiesBaseWithAgent + { + AgentProperties = new CollectorAgentPropertiesBase + { + Id = "fe243486-3318-41fa-aaba-c48b5df75308", + Version = "1.0.8.383", + LastHeartbeatUtc = DateTimeOffset.Parse("2022-03-29T12:10:08.9167289Z"), + SpnDetails = new CollectorAgentSpnPropertiesBase + { + Authority = "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + ApplicationId = "82b3e452-c0e8-4662-8347-58282925ae84", + Audience = "82b3e452-c0e8-4662-8347-58282925ae84", + ObjectId = "3fc89111-1405-4938-9214-37aa4739401d", + TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47", + }, + }, + DiscoverySiteId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/ayagrawRG/providers/Microsoft.OffAzure/VMwareSites/Vmware2744site", + }, + }; + ArmOperation lro = await vmwareCollector.UpdateAsync(WaitUntil.Completed, data); + VmwareCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VmwareCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppAssessmentV3Collection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppAssessmentV3Collection.cs new file mode 100644 index 000000000000..e14f8f9cfd3c --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppAssessmentV3Collection.cs @@ -0,0 +1,237 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_WebAppAssessmentV3Collection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_WebAppAssessmentV3OperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3Operations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebAppAssessmentV3Resource + string projectName = "contosoProject"; + WebAppAssessmentV3Collection collection = resourceGroupResource.GetWebAppAssessmentV3s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + WebAppAssessmentV3Data data = new WebAppAssessmentV3Data + { + Properties = new WebAppAssessmentV3Properties + { + Scope = new Scope + { + ScopeType = ScopeType.ServerGroupId, + ServerGroupId = "sxwigkygd", + AzureResourceGraphQuery = "mjonozzzflcglhdb", + }, + Settings = new WebAppAssessmentSettings(new AppSvcNativeSettings(true), new AppSvcContainerSettings(true), AzureSecurityOfferingType.NO) + { + AzureLocation = "khzvggbrcnpkzrqdtvvyytc", + Currency = AzureCurrency.Unknown, + ScalingFactor = 6F, + DiscountPercentage = 12F, + SizingCriterion = AssessmentSizingCriterion.PerformanceBased, + PerformanceData = new PerformanceData + { + Percentile = new Percentile("Unknown"), + TimeRange = TimeRange.Day, + PerfDataStartOn = DateTimeOffset.Parse("2025-02-21T06:18:34.789Z"), + PerfDataEndOn = DateTimeOffset.Parse("2025-02-21T06:18:34.789Z"), + }, + SavingsSettings = new SavingsSettings + { + SavingsOptions = SavingsOption.None, + AzureOfferCode = AzureOffer.Unknown, + }, + BillingSettings = new BillingSettings + { + LicensingProgram = LicensingProgram.Retail, + SubscriptionId = "lakvxkjeqpajer", + }, + EnvironmentType = EnvironmentType.Production, + }, + Details = new AssessmentDetails(), + FallbackMachineAssessmentArmId = "gfjcubgnh", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, assessmentName, data); + WebAppAssessmentV3Resource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppAssessmentV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WebAppAssessmentV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebAppAssessmentV3Resource + string projectName = "contosoProject"; + WebAppAssessmentV3Collection collection = resourceGroupResource.GetWebAppAssessmentV3s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + WebAppAssessmentV3Resource result = await collection.GetAsync(assessmentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppAssessmentV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_WebAppAssessmentV3OperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3Operations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebAppAssessmentV3Resource + string projectName = "contosoProject"; + WebAppAssessmentV3Collection collection = resourceGroupResource.GetWebAppAssessmentV3s(projectName); + + // invoke the operation and iterate over the result + await foreach (WebAppAssessmentV3Resource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppAssessmentV3Data resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_WebAppAssessmentV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebAppAssessmentV3Resource + string projectName = "contosoProject"; + WebAppAssessmentV3Collection collection = resourceGroupResource.GetWebAppAssessmentV3s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + bool result = await collection.ExistsAsync(assessmentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_WebAppAssessmentV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebAppAssessmentV3Resource + string projectName = "contosoProject"; + WebAppAssessmentV3Collection collection = resourceGroupResource.GetWebAppAssessmentV3s(projectName); + + // invoke the operation + string assessmentName = "assessmentName"; + NullableResponse response = await collection.GetIfExistsAsync(assessmentName); + WebAppAssessmentV3Resource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppAssessmentV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppAssessmentV3Resource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppAssessmentV3Resource.cs new file mode 100644 index 000000000000..622ffc525fcc --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppAssessmentV3Resource.cs @@ -0,0 +1,178 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_WebAppAssessmentV3Resource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WebAppAssessmentV3OperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3Operations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3_Get" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // invoke the operation + WebAppAssessmentV3Resource result = await webAppAssessmentV3.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppAssessmentV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_WebAppAssessmentV3OperationsDeleteMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3Operations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3_Delete" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // invoke the operation + await webAppAssessmentV3.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_WebAppAssessmentV3OperationsCreateMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3Operations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3_Create" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // invoke the operation + WebAppAssessmentV3Data data = new WebAppAssessmentV3Data + { + Properties = new WebAppAssessmentV3Properties + { + Scope = new Scope + { + ScopeType = ScopeType.ServerGroupId, + ServerGroupId = "sxwigkygd", + AzureResourceGraphQuery = "mjonozzzflcglhdb", + }, + Settings = new WebAppAssessmentSettings(new AppSvcNativeSettings(true), new AppSvcContainerSettings(true), AzureSecurityOfferingType.NO) + { + AzureLocation = "khzvggbrcnpkzrqdtvvyytc", + Currency = AzureCurrency.Unknown, + ScalingFactor = 6F, + DiscountPercentage = 12F, + SizingCriterion = AssessmentSizingCriterion.PerformanceBased, + PerformanceData = new PerformanceData + { + Percentile = new Percentile("Unknown"), + TimeRange = TimeRange.Day, + PerfDataStartOn = DateTimeOffset.Parse("2025-02-21T06:18:34.789Z"), + PerfDataEndOn = DateTimeOffset.Parse("2025-02-21T06:18:34.789Z"), + }, + SavingsSettings = new SavingsSettings + { + SavingsOptions = SavingsOption.None, + AzureOfferCode = AzureOffer.Unknown, + }, + BillingSettings = new BillingSettings + { + LicensingProgram = LicensingProgram.Retail, + SubscriptionId = "lakvxkjeqpajer", + }, + EnvironmentType = EnvironmentType.Production, + }, + Details = new AssessmentDetails(), + FallbackMachineAssessmentArmId = "gfjcubgnh", + }, + }; + ArmOperation lro = await webAppAssessmentV3.UpdateAsync(WaitUntil.Completed, data); + WebAppAssessmentV3Resource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppAssessmentV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DownloadUrl_WebAppAssessmentV3OperationsDownloadUrlMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3Operations_DownloadUrl_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3Operations_DownloadUrl" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // invoke the operation + DownloadUrlContent content = new DownloadUrlContent(); + ArmOperation lro = await webAppAssessmentV3.DownloadUrlAsync(WaitUntil.Completed, content); + DownloadUri result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppAssessmentV3SummaryCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppAssessmentV3SummaryCollection.cs new file mode 100644 index 000000000000..698a93b886c1 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppAssessmentV3SummaryCollection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_WebAppAssessmentV3SummaryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WebAppAssessmentV3SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3Summary_Get" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // get the collection of this WebAppAssessmentV3SummaryResource + WebAppAssessmentV3SummaryCollection collection = webAppAssessmentV3.GetWebAppAssessmentV3Summaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + WebAppAssessmentV3SummaryResource result = await collection.GetAsync(summaryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppAssessmentV3SummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_WebAppAssessmentV3SummaryOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3SummaryOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3Summary_ListByParent" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // get the collection of this WebAppAssessmentV3SummaryResource + WebAppAssessmentV3SummaryCollection collection = webAppAssessmentV3.GetWebAppAssessmentV3Summaries(); + + // invoke the operation and iterate over the result + await foreach (WebAppAssessmentV3SummaryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppAssessmentV3SummaryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_WebAppAssessmentV3SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3Summary_Get" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // get the collection of this WebAppAssessmentV3SummaryResource + WebAppAssessmentV3SummaryCollection collection = webAppAssessmentV3.GetWebAppAssessmentV3Summaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + bool result = await collection.ExistsAsync(summaryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_WebAppAssessmentV3SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3Summary_Get" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // get the collection of this WebAppAssessmentV3SummaryResource + WebAppAssessmentV3SummaryCollection collection = webAppAssessmentV3.GetWebAppAssessmentV3Summaries(); + + // invoke the operation + string summaryName = "PaaSPreferred"; + NullableResponse response = await collection.GetIfExistsAsync(summaryName); + WebAppAssessmentV3SummaryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppAssessmentV3SummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppAssessmentV3SummaryResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppAssessmentV3SummaryResource.cs new file mode 100644 index 000000000000..27f4df03781f --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppAssessmentV3SummaryResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_WebAppAssessmentV3SummaryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WebAppAssessmentV3SummaryOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppAssessmentV3SummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppAssessmentV3Summary_Get" 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 WebAppAssessmentV3SummaryResource created on azure + // for more information of creating WebAppAssessmentV3SummaryResource, please refer to the document of WebAppAssessmentV3SummaryResource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + string summaryName = "PaaSPreferred"; + ResourceIdentifier webAppAssessmentV3SummaryResourceId = WebAppAssessmentV3SummaryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, summaryName); + WebAppAssessmentV3SummaryResource webAppAssessmentV3Summary = client.GetWebAppAssessmentV3SummaryResource(webAppAssessmentV3SummaryResourceId); + + // invoke the operation + WebAppAssessmentV3SummaryResource result = await webAppAssessmentV3Summary.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppAssessmentV3SummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppCollectorCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppCollectorCollection.cs new file mode 100644 index 000000000000..dca869db8d63 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppCollectorCollection.cs @@ -0,0 +1,217 @@ +// 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.Migrate.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_WebAppCollectorCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_WebAppCollectorOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/WebAppCollectorOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppCollector_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6D59B561-47B6-4AB8-84B5-39CF2B808C26"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebAppCollectorResource + string projectName = "sumukk-ccy-bcs4557project"; + WebAppCollectorCollection collection = resourceGroupResource.GetWebAppCollectors(projectName); + + // invoke the operation + string collectorName = "collector1"; + WebAppCollectorData data = new WebAppCollectorData + { + Properties = new CollectorPropertiesBaseWithAgent + { + AgentProperties = new CollectorAgentPropertiesBase + { + Id = "fed93df5-b787-4e3f-a764-e3d2b9101a59-agent", + LastHeartbeatUtc = DateTimeOffset.Parse("2023-11-03T05:43:02.078Z"), + SpnDetails = new CollectorAgentSpnPropertiesBase + { + Authority = "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47", + ApplicationId = "2f70d5e8-7adc-4c64-910a-7031079efc6e", + Audience = "2f70d5e8-7adc-4c64-910a-7031079efc6e", + ObjectId = "2f70d5e8-7adc-4c64-910a-7031079efc6e", + TenantId = "2f70d5e8-7adc-4c64-910a-7031079efc6e", + }, + }, + DiscoverySiteId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/sumukk-ccy-bcs/providers/Microsoft.OffAzure/MasterSites/sumukk-ccy-bcs9880mastersite/WebAppSites/sumukk-ccy-bcs9880webappsites", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, collectorName, data); + WebAppCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WebAppCollectorOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/WebAppCollectorOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6D59B561-47B6-4AB8-84B5-39CF2B808C26"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebAppCollectorResource + string projectName = "sumukk-ccy-bcs4557project"; + WebAppCollectorCollection collection = resourceGroupResource.GetWebAppCollectors(projectName); + + // invoke the operation + string collectorName = "collector1"; + WebAppCollectorResource result = await collection.GetAsync(collectorName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_WebAppCollectorOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppCollectorOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppCollector_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6D59B561-47B6-4AB8-84B5-39CF2B808C26"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebAppCollectorResource + string projectName = "sumukk-ccy-bcs4557project"; + WebAppCollectorCollection collection = resourceGroupResource.GetWebAppCollectors(projectName); + + // invoke the operation and iterate over the result + await foreach (WebAppCollectorResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppCollectorData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_WebAppCollectorOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/WebAppCollectorOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6D59B561-47B6-4AB8-84B5-39CF2B808C26"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebAppCollectorResource + string projectName = "sumukk-ccy-bcs4557project"; + WebAppCollectorCollection collection = resourceGroupResource.GetWebAppCollectors(projectName); + + // invoke the operation + string collectorName = "collector1"; + bool result = await collection.ExistsAsync(collectorName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_WebAppCollectorOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/WebAppCollectorOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppCollector_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6D59B561-47B6-4AB8-84B5-39CF2B808C26"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebAppCollectorResource + string projectName = "sumukk-ccy-bcs4557project"; + WebAppCollectorCollection collection = resourceGroupResource.GetWebAppCollectors(projectName); + + // invoke the operation + string collectorName = "collector1"; + NullableResponse response = await collection.GetIfExistsAsync(collectorName); + WebAppCollectorResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppCollectorResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppCollectorResource.cs new file mode 100644 index 000000000000..22ff21fc0e91 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppCollectorResource.cs @@ -0,0 +1,129 @@ +// 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.Migrate.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_WebAppCollectorResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WebAppCollectorOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/WebAppCollectorOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppCollector_Get" 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 WebAppCollectorResource created on azure + // for more information of creating WebAppCollectorResource, please refer to the document of WebAppCollectorResource + string subscriptionId = "6D59B561-47B6-4AB8-84B5-39CF2B808C26"; + string resourceGroupName = "rgopenapi"; + string projectName = "sumukk-ccy-bcs4557project"; + string collectorName = "collector1"; + ResourceIdentifier webAppCollectorResourceId = WebAppCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, collectorName); + WebAppCollectorResource webAppCollector = client.GetWebAppCollectorResource(webAppCollectorResourceId); + + // invoke the operation + WebAppCollectorResource result = await webAppCollector.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_WebAppCollectorOperationsDelete() + { + // Generated from example definition: 2024-03-03-preview/WebAppCollectorOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppCollector_Delete" 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 WebAppCollectorResource created on azure + // for more information of creating WebAppCollectorResource, please refer to the document of WebAppCollectorResource + string subscriptionId = "6D59B561-47B6-4AB8-84B5-39CF2B808C26"; + string resourceGroupName = "rgopenapi"; + string projectName = "sumukk-ccy-bcs4557project"; + string collectorName = "collector1"; + ResourceIdentifier webAppCollectorResourceId = WebAppCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, collectorName); + WebAppCollectorResource webAppCollector = client.GetWebAppCollectorResource(webAppCollectorResourceId); + + // invoke the operation + await webAppCollector.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_WebAppCollectorOperationsCreate() + { + // Generated from example definition: 2024-03-03-preview/WebAppCollectorOperations_Create_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppCollector_Create" 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 WebAppCollectorResource created on azure + // for more information of creating WebAppCollectorResource, please refer to the document of WebAppCollectorResource + string subscriptionId = "6D59B561-47B6-4AB8-84B5-39CF2B808C26"; + string resourceGroupName = "rgopenapi"; + string projectName = "sumukk-ccy-bcs4557project"; + string collectorName = "collector1"; + ResourceIdentifier webAppCollectorResourceId = WebAppCollectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, collectorName); + WebAppCollectorResource webAppCollector = client.GetWebAppCollectorResource(webAppCollectorResourceId); + + // invoke the operation + WebAppCollectorData data = new WebAppCollectorData + { + Properties = new CollectorPropertiesBaseWithAgent + { + AgentProperties = new CollectorAgentPropertiesBase + { + Id = "fed93df5-b787-4e3f-a764-e3d2b9101a59-agent", + LastHeartbeatUtc = DateTimeOffset.Parse("2023-11-03T05:43:02.078Z"), + SpnDetails = new CollectorAgentSpnPropertiesBase + { + Authority = "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47", + ApplicationId = "2f70d5e8-7adc-4c64-910a-7031079efc6e", + Audience = "2f70d5e8-7adc-4c64-910a-7031079efc6e", + ObjectId = "2f70d5e8-7adc-4c64-910a-7031079efc6e", + TenantId = "2f70d5e8-7adc-4c64-910a-7031079efc6e", + }, + }, + DiscoverySiteId = "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/sumukk-ccy-bcs/providers/Microsoft.OffAzure/MasterSites/sumukk-ccy-bcs9880mastersite/WebAppSites/sumukk-ccy-bcs9880webappsites", + }, + }; + ArmOperation lro = await webAppCollector.UpdateAsync(WaitUntil.Completed, data); + WebAppCollectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppCollectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppCompoundAssessmentSummaryCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppCompoundAssessmentSummaryCollection.cs new file mode 100644 index 000000000000..b25cb2846a00 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppCompoundAssessmentSummaryCollection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_WebAppCompoundAssessmentSummaryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_CompoundAssessmentSummaryOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppCompoundAssessmentSummary_Get" 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 CompoundAssessmentResource created on azure + // for more information of creating CompoundAssessmentResource, please refer to the document of CompoundAssessmentResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + string projectName = "contosoProject"; + string compoundAssessmentName = "assessmentName"; + ResourceIdentifier compoundAssessmentResourceId = CompoundAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + CompoundAssessmentResource compoundAssessment = client.GetCompoundAssessmentResource(compoundAssessmentResourceId); + + // get the collection of this WebAppCompoundAssessmentSummaryResource + WebAppCompoundAssessmentSummaryCollection collection = compoundAssessment.GetWebAppCompoundAssessmentSummaries(); + + // invoke the operation + string summaryName = "Modernize"; + WebAppCompoundAssessmentSummaryResource result = await collection.GetAsync(summaryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppCompoundAssessmentSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_CompoundAssessmentSummaryOperationsListByParent() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentSummaryOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppCompoundAssessmentSummary_ListByParent" 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 CompoundAssessmentResource created on azure + // for more information of creating CompoundAssessmentResource, please refer to the document of CompoundAssessmentResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + string projectName = "contosoProject"; + string compoundAssessmentName = "assessmentName"; + ResourceIdentifier compoundAssessmentResourceId = CompoundAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + CompoundAssessmentResource compoundAssessment = client.GetCompoundAssessmentResource(compoundAssessmentResourceId); + + // get the collection of this WebAppCompoundAssessmentSummaryResource + WebAppCompoundAssessmentSummaryCollection collection = compoundAssessment.GetWebAppCompoundAssessmentSummaries(); + + // invoke the operation and iterate over the result + await foreach (WebAppCompoundAssessmentSummaryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppCompoundAssessmentSummaryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_CompoundAssessmentSummaryOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppCompoundAssessmentSummary_Get" 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 CompoundAssessmentResource created on azure + // for more information of creating CompoundAssessmentResource, please refer to the document of CompoundAssessmentResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + string projectName = "contosoProject"; + string compoundAssessmentName = "assessmentName"; + ResourceIdentifier compoundAssessmentResourceId = CompoundAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + CompoundAssessmentResource compoundAssessment = client.GetCompoundAssessmentResource(compoundAssessmentResourceId); + + // get the collection of this WebAppCompoundAssessmentSummaryResource + WebAppCompoundAssessmentSummaryCollection collection = compoundAssessment.GetWebAppCompoundAssessmentSummaries(); + + // invoke the operation + string summaryName = "Modernize"; + bool result = await collection.ExistsAsync(summaryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_CompoundAssessmentSummaryOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppCompoundAssessmentSummary_Get" 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 CompoundAssessmentResource created on azure + // for more information of creating CompoundAssessmentResource, please refer to the document of CompoundAssessmentResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + string projectName = "contosoProject"; + string compoundAssessmentName = "assessmentName"; + ResourceIdentifier compoundAssessmentResourceId = CompoundAssessmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + CompoundAssessmentResource compoundAssessment = client.GetCompoundAssessmentResource(compoundAssessmentResourceId); + + // get the collection of this WebAppCompoundAssessmentSummaryResource + WebAppCompoundAssessmentSummaryCollection collection = compoundAssessment.GetWebAppCompoundAssessmentSummaries(); + + // invoke the operation + string summaryName = "Modernize"; + NullableResponse response = await collection.GetIfExistsAsync(summaryName); + WebAppCompoundAssessmentSummaryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppCompoundAssessmentSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppCompoundAssessmentSummaryResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppCompoundAssessmentSummaryResource.cs new file mode 100644 index 000000000000..de472c398784 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppCompoundAssessmentSummaryResource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_WebAppCompoundAssessmentSummaryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_CompoundAssessmentSummaryOperationsGet() + { + // Generated from example definition: 2024-03-03-preview/CompoundAssessmentSummaryOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppCompoundAssessmentSummary_Get" 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 WebAppCompoundAssessmentSummaryResource created on azure + // for more information of creating WebAppCompoundAssessmentSummaryResource, please refer to the document of WebAppCompoundAssessmentSummaryResource + string subscriptionId = "6898488D-BBF0-40FC-A5E3-3DF2C00C5F21"; + string resourceGroupName = "rgwebAppCompoundAssessments"; + string projectName = "contosoProject"; + string compoundAssessmentName = "assessmentName"; + string summaryName = "Modernize"; + ResourceIdentifier webAppCompoundAssessmentSummaryResourceId = WebAppCompoundAssessmentSummaryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, compoundAssessmentName, summaryName); + WebAppCompoundAssessmentSummaryResource webAppCompoundAssessmentSummary = client.GetWebAppCompoundAssessmentSummaryResource(webAppCompoundAssessmentSummaryResourceId); + + // invoke the operation + WebAppCompoundAssessmentSummaryResource result = await webAppCompoundAssessmentSummary.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppCompoundAssessmentSummaryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppServicePlanV3Collection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppServicePlanV3Collection.cs new file mode 100644 index 000000000000..4d43621182ca --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppServicePlanV3Collection.cs @@ -0,0 +1,164 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_WebAppServicePlanV3Collection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WebAppServicePlansOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppServicePlansOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppServicePlanV3_Get" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // get the collection of this WebAppServicePlanV3Resource + WebAppServicePlanV3Collection collection = webAppAssessmentV3.GetWebAppServicePlanV3s(); + + // invoke the operation + string servicePlanName = "sp1"; + WebAppServicePlanV3Resource result = await collection.GetAsync(servicePlanName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppServicePlanV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_WebAppServicePlansOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppServicePlansOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppServicePlanV3_ListByParent" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // get the collection of this WebAppServicePlanV3Resource + WebAppServicePlanV3Collection collection = webAppAssessmentV3.GetWebAppServicePlanV3s(); + + // invoke the operation and iterate over the result + await foreach (WebAppServicePlanV3Resource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppServicePlanV3Data resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_WebAppServicePlansOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppServicePlansOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppServicePlanV3_Get" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // get the collection of this WebAppServicePlanV3Resource + WebAppServicePlanV3Collection collection = webAppAssessmentV3.GetWebAppServicePlanV3s(); + + // invoke the operation + string servicePlanName = "sp1"; + bool result = await collection.ExistsAsync(servicePlanName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_WebAppServicePlansOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppServicePlansOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppServicePlanV3_Get" 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 WebAppAssessmentV3Resource created on azure + // for more information of creating WebAppAssessmentV3Resource, please refer to the document of WebAppAssessmentV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + ResourceIdentifier webAppAssessmentV3ResourceId = WebAppAssessmentV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName); + WebAppAssessmentV3Resource webAppAssessmentV3 = client.GetWebAppAssessmentV3Resource(webAppAssessmentV3ResourceId); + + // get the collection of this WebAppServicePlanV3Resource + WebAppServicePlanV3Collection collection = webAppAssessmentV3.GetWebAppServicePlanV3s(); + + // invoke the operation + string servicePlanName = "sp1"; + NullableResponse response = await collection.GetIfExistsAsync(servicePlanName); + WebAppServicePlanV3Resource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppServicePlanV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppServicePlanV3Resource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppServicePlanV3Resource.cs new file mode 100644 index 000000000000..43cf523407a9 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WebAppServicePlanV3Resource.cs @@ -0,0 +1,50 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_WebAppServicePlanV3Resource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WebAppServicePlansOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppServicePlansOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WebAppServicePlanV3_Get" 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 WebAppServicePlanV3Resource created on azure + // for more information of creating WebAppServicePlanV3Resource, please refer to the document of WebAppServicePlanV3Resource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + string assessmentName = "assessmentName"; + string servicePlanName = "sp1"; + ResourceIdentifier webAppServicePlanV3ResourceId = WebAppServicePlanV3Resource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, assessmentName, servicePlanName); + WebAppServicePlanV3Resource webAppServicePlanV3 = client.GetWebAppServicePlanV3Resource(webAppServicePlanV3ResourceId); + + // invoke the operation + WebAppServicePlanV3Resource result = await webAppServicePlanV3.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppServicePlanV3Data resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WepAppGraphAssessmentOptionCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WepAppGraphAssessmentOptionCollection.cs new file mode 100644 index 000000000000..98d421c46b37 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WepAppGraphAssessmentOptionCollection.cs @@ -0,0 +1,158 @@ +// 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; +using NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_WepAppGraphAssessmentOptionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WebAppGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WepAppGraphAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WepAppGraphAssessmentOptionResource + string projectName = "contosoProject"; + WepAppGraphAssessmentOptionCollection collection = resourceGroupResource.GetWepAppGraphAssessmentOptions(projectName); + + // invoke the operation + WepAppGraphAssessmentOptionResource result = await collection.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WepAppGraphAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_WebAppGraphAssessmentOptionsOperationsListByParentMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppGraphAssessmentOptionsOperations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "WepAppGraphAssessmentOptions_ListByParent" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WepAppGraphAssessmentOptionResource + string projectName = "contosoProject"; + WepAppGraphAssessmentOptionCollection collection = resourceGroupResource.GetWepAppGraphAssessmentOptions(projectName); + + // invoke the operation and iterate over the result + await foreach (WepAppGraphAssessmentOptionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WepAppGraphAssessmentOptionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_WebAppGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WepAppGraphAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WepAppGraphAssessmentOptionResource + string projectName = "contosoProject"; + WepAppGraphAssessmentOptionCollection collection = resourceGroupResource.GetWepAppGraphAssessmentOptions(projectName); + + // invoke the operation + bool result = await collection.ExistsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_WebAppGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WepAppGraphAssessmentOptions_Get" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WepAppGraphAssessmentOptionResource + string projectName = "contosoProject"; + WepAppGraphAssessmentOptionCollection collection = resourceGroupResource.GetWepAppGraphAssessmentOptions(projectName); + + // invoke the operation + NullableResponse response = await collection.GetIfExistsAsync(); + WepAppGraphAssessmentOptionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WepAppGraphAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WepAppGraphAssessmentOptionResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WepAppGraphAssessmentOptionResource.cs new file mode 100644 index 000000000000..2bd7aa063fca --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Generated/Samples/Sample_WepAppGraphAssessmentOptionResource.cs @@ -0,0 +1,48 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.Migrate.Samples +{ + public partial class Sample_WepAppGraphAssessmentOptionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WebAppGraphAssessmentOptionsOperationsGetMaximumSet() + { + // Generated from example definition: 2024-03-03-preview/WebAppGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WepAppGraphAssessmentOptions_Get" 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 WepAppGraphAssessmentOptionResource created on azure + // for more information of creating WepAppGraphAssessmentOptionResource, please refer to the document of WepAppGraphAssessmentOptionResource + string subscriptionId = "6FFBFE40-C0E1-4FEB-A649-3AC225AB98F0"; + string resourceGroupName = "rgwebAppAssessments"; + string projectName = "contosoProject"; + ResourceIdentifier wepAppGraphAssessmentOptionResourceId = WepAppGraphAssessmentOptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + WepAppGraphAssessmentOptionResource wepAppGraphAssessmentOption = client.GetWepAppGraphAssessmentOptionResource(wepAppGraphAssessmentOptionResourceId); + + // invoke the operation + WepAppGraphAssessmentOptionResource result = await wepAppGraphAssessmentOption.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WepAppGraphAssessmentOptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Azure.ResourceManager.Migrate.csproj b/sdk/migrate/Azure.ResourceManager.Migrate/src/Azure.ResourceManager.Migrate.csproj new file mode 100644 index 000000000000..1e9a2162550b --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Azure.ResourceManager.Migrate.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider Migrate. + 1.0.0-beta.1 + azure;management;arm;resource manager;migrate + Azure.ResourceManager.Migrate + + diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/ArmMigrateModelFactory.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/ArmMigrateModelFactory.cs new file mode 100644 index 000000000000..93461692d4ef --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/ArmMigrateModelFactory.cs @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Model factory for models. + public static partial class ArmMigrateModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static CompoundAssessmentData CompoundAssessmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CompoundAssessmentProperties properties = null) + { + return new CompoundAssessmentData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// ARM IDs of the target assessments. + /// Fallback machine assessment ARM ID. + /// Details of the compound assessment. + /// A new instance for mocking. + public static CompoundAssessmentProperties CompoundAssessmentProperties(ProvisioningState? provisioningState = null, TargetAssessmentArmIds targetAssessmentArmIds = null, string fallbackMachineAssessmentArmId = null, CompoundAssessmentDetails details = null) + { + return new CompoundAssessmentProperties(provisioningState, targetAssessmentArmIds, fallbackMachineAssessmentArmId, details, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Timestamp when the assessment was created. + /// Timestamp when the assessment was last updated. + /// Status of the assessment. + /// A new instance for mocking. + public static CompoundAssessmentDetails CompoundAssessmentDetails(DateTimeOffset? createdTimestamp = null, DateTimeOffset? updatedTimestamp = null, AssessmentStatus status = default) + { + return new CompoundAssessmentDetails(createdTimestamp, updatedTimestamp, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Hyperlink to download report. + /// Expiry date of download url. + /// A new instance for mocking. + public static DownloadUri DownloadUri(string assessmentReportUri = null, DateTimeOffset expireOn = default) + { + return new DownloadUri(assessmentReportUri, expireOn, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static WebAppCompoundAssessmentSummaryData WebAppCompoundAssessmentSummaryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WebAppCompoundAssessmentSummaryProperties properties = null) + { + return new WebAppCompoundAssessmentSummaryData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The summary type. + /// The summary name. + /// The source details list. + /// The target details list. + /// The target source mapping. + /// The cost components. + /// The cost components. + /// Name of the assessment. + /// Light summary of the compound assessment. + /// A new instance for mocking. + public static WebAppCompoundAssessmentSummaryProperties WebAppCompoundAssessmentSummaryProperties(SummaryType? summaryType = null, string summaryName = null, IEnumerable sources = null, IEnumerable targets = null, IEnumerable targetSourceMapping = null, IEnumerable costComponents = null, IEnumerable savingsComponents = null, string assessmentName = null, DiscoveredLightSummary discoveredLightSummary = null) + { + sources ??= new List(); + targets ??= new List(); + targetSourceMapping ??= new List(); + costComponents ??= new List(); + savingsComponents ??= new List(); + + return new WebAppCompoundAssessmentSummaryProperties( + summaryType, + summaryName, + sources?.ToList(), + targets?.ToList(), + targetSourceMapping?.ToList(), + costComponents?.ToList(), + savingsComponents?.ToList(), + assessmentName, + discoveredLightSummary, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The source name. + /// The source type. + /// The migration platform. + /// The count of a type of source. + /// A new instance for mocking. + public static SourceDetails SourceDetails(AssessmentSource? sourceName = null, MigrateWorkloadType? sourceType = null, MigrationPlatform? platform = null, int? count = null) + { + return new SourceDetails(sourceName, sourceType, platform, count, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The target name. + /// The target type. + /// The migration platform. + /// The count of a type of source. + /// A new instance for mocking. + public static TargetDetails TargetDetails(AzureTarget? targetName = null, MigrateWorkloadType? targetType = null, MigrationPlatform? platform = null, int? count = null) + { + return new TargetDetails(targetName, targetType, platform, count, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The source name. + /// The target name. + /// The count of a type of source. + /// The count of a type of target. + /// The migration details. + /// The management details. + /// The cost details. + /// The savings details. + /// The confidence score. + /// A new instance for mocking. + public static TargetSourcePair TargetSourcePair(AssessmentSource? sourceRef = null, AzureTarget? targetRef = null, int? sourceCount = null, int? targetCount = null, MigrationDetails migrationDetails = null, IEnumerable managementDetails = null, IEnumerable costDetails = null, IEnumerable savingsDetails = null, double? confidenceScore = null) + { + managementDetails ??= new List(); + costDetails ??= new List(); + savingsDetails ??= new List(); + + return new TargetSourcePair( + sourceRef, + targetRef, + sourceCount, + targetCount, + migrationDetails, + managementDetails?.ToList(), + costDetails?.ToList(), + savingsDetails?.ToList(), + confidenceScore, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The readiness summary. + /// The migration type. + /// A new instance for mocking. + public static MigrationDetails MigrationDetails(IEnumerable readinessSummary = null, MigrationType? migrationType = null) + { + readinessSummary ??= new List(); + + return new MigrationDetails(readinessSummary?.ToList(), migrationType, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name. + /// The value. + /// A new instance for mocking. + public static NameValuePairCloudSuitabilityCommon NameValuePairCloudSuitabilityCommon(CloudSuitabilityCommon? name = null, int? value = null) + { + return new NameValuePairCloudSuitabilityCommon(name, value, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The management summary name. + /// The management suitability summary. + /// A new instance for mocking. + public static ManagementDetails ManagementDetails(AzureManagementOfferingType? name = null, IEnumerable readinessSummary = null) + { + readinessSummary ??= new List(); + + return new ManagementDetails(name, readinessSummary?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The savings options. + /// The sku cost details per azure offer type. + /// A new instance for mocking. + public static CostDetailsCommon CostDetailsCommon(SavingsOption? savingOptions = null, IEnumerable costDetail = null) + { + costDetail ??= new List(); + + return new CostDetailsCommon(savingOptions, costDetail?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name. + /// The value. + /// A new instance for mocking. + public static NameValuePairCostType NameValuePairCostType(CostType? name = null, float? value = null) + { + return new NameValuePairCostType(name, value, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The savings options. + /// The sku cost details per azure offer type. + /// A new instance for mocking. + public static SavingsDetailsCommon SavingsDetailsCommon(SavingsOption? savingOptions = null, IEnumerable savingsDetail = null) + { + savingsDetail ??= new List(); + + return new SavingsDetailsCommon(savingOptions, savingsDetail?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name. + /// The value. + /// A new instance for mocking. + public static NameValuePairSavingsType NameValuePairSavingsType(SavingsType? name = null, float? value = null) + { + return new NameValuePairSavingsType(name, value, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Number of web apps. + /// Number of web apps per type. + /// Number of web servers per type. + /// Number of web servers. + /// Number of servers. + /// A new instance for mocking. + public static DiscoveredLightSummary DiscoveredLightSummary(int numberOfWebApps = default, IEnumerable numberOfWebAppsPerType = null, IEnumerable numberOfWebServersPerType = null, int numberOfWebServers = default, int numberOfServers = default) + { + numberOfWebAppsPerType ??= new List(); + numberOfWebServersPerType ??= new List(); + + return new DiscoveredLightSummary( + numberOfWebApps, + numberOfWebAppsPerType?.ToList(), + numberOfWebServersPerType?.ToList(), + numberOfWebServers, + numberOfServers, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Name of the web app type. + /// Count of the web app type. + /// A new instance for mocking. + public static WebAppsPerType WebAppsPerType(WebAppType webAppType = default, int count = default) + { + return new WebAppsPerType(webAppType, count, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Name of the web app type. + /// Count of the web app type. + /// A new instance for mocking. + public static WebServersPerType WebServersPerType(WebServerType webServerType = default, int count = default) + { + return new WebServersPerType(webServerType, count, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentCollection.cs new file mode 100644 index 000000000000..db2e8f0942f5 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentCollection.cs @@ -0,0 +1,499 @@ +// 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.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Migrate +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetCompoundAssessments method from an instance of . + /// + public partial class CompoundAssessmentCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics; + private readonly CompoundAssessmentRestOperations _compoundAssessmentCompoundAssessmentOperationsRestClient; + private readonly string _projectName; + + /// Initializes a new instance of the class for mocking. + protected CompoundAssessmentCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// Assessment Project Name. + /// is null. + /// is an empty string, and was expected to be non-empty. + internal CompoundAssessmentCollection(ArmClient client, ResourceIdentifier id, string projectName) : base(client, id) + { + _projectName = projectName; + _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Migrate", CompoundAssessmentResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(CompoundAssessmentResource.ResourceType, out string compoundAssessmentCompoundAssessmentOperationsApiVersion); + _compoundAssessmentCompoundAssessmentOperationsRestClient = new CompoundAssessmentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, compoundAssessmentCompoundAssessmentOperationsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Create + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Compound Assessment ARM name. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string compoundAssessmentName, CompoundAssessmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, _projectName, compoundAssessmentName, data, cancellationToken).ConfigureAwait(false); + var operation = new MigrateArmOperation(new CompoundAssessmentOperationSource(Client), _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics, Pipeline, _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, _projectName, compoundAssessmentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Create + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Compound Assessment ARM name. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string compoundAssessmentName, CompoundAssessmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _compoundAssessmentCompoundAssessmentOperationsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, _projectName, compoundAssessmentName, data, cancellationToken); + var operation = new MigrateArmOperation(new CompoundAssessmentOperationSource(Client), _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics, Pipeline, _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, _projectName, compoundAssessmentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentCollection.Get"); + scope.Start(); + try + { + var response = await _compoundAssessmentCompoundAssessmentOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, _projectName, compoundAssessmentName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CompoundAssessmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentCollection.Get"); + scope.Start(); + try + { + var response = _compoundAssessmentCompoundAssessmentOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, _projectName, compoundAssessmentName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CompoundAssessmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List CompoundAssessment resources by AssessmentProject + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments + /// + /// + /// Operation Id + /// CompoundAssessment_ListByParent + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, _projectName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, _projectName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CompoundAssessmentResource(Client, CompoundAssessmentData.DeserializeCompoundAssessmentData(e)), _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics, Pipeline, "CompoundAssessmentCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List CompoundAssessment resources by AssessmentProject + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments + /// + /// + /// Operation Id + /// CompoundAssessment_ListByParent + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, _projectName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, _projectName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CompoundAssessmentResource(Client, CompoundAssessmentData.DeserializeCompoundAssessmentData(e)), _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics, Pipeline, "CompoundAssessmentCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentCollection.Exists"); + scope.Start(); + try + { + var response = await _compoundAssessmentCompoundAssessmentOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, _projectName, compoundAssessmentName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentCollection.Exists"); + scope.Start(); + try + { + var response = _compoundAssessmentCompoundAssessmentOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, _projectName, compoundAssessmentName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _compoundAssessmentCompoundAssessmentOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, _projectName, compoundAssessmentName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new CompoundAssessmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentCollection.GetIfExists"); + scope.Start(); + try + { + var response = _compoundAssessmentCompoundAssessmentOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, _projectName, compoundAssessmentName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new CompoundAssessmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentData.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentData.Serialization.cs new file mode 100644 index 000000000000..5bdf90d848a3 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Migrate.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Migrate +{ + public partial class CompoundAssessmentData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CompoundAssessmentData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + CompoundAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CompoundAssessmentData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCompoundAssessmentData(document.RootElement, options); + } + + internal static CompoundAssessmentData DeserializeCompoundAssessmentData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CompoundAssessmentProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = CompoundAssessmentProperties.DeserializeCompoundAssessmentProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CompoundAssessmentData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CompoundAssessmentData)} does not support writing '{options.Format}' format."); + } + } + + CompoundAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCompoundAssessmentData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CompoundAssessmentData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentData.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentData.cs new file mode 100644 index 000000000000..a5cafd77c013 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Migrate.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Migrate +{ + /// + /// A class representing the CompoundAssessment data model. + /// Compound assessment resource. + /// + public partial class CompoundAssessmentData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CompoundAssessmentData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal CompoundAssessmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CompoundAssessmentProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public CompoundAssessmentProperties Properties { get; set; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentResource.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentResource.Serialization.cs new file mode 100644 index 000000000000..82dbb6cb9f09 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.Migrate +{ + public partial class CompoundAssessmentResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + CompoundAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + CompoundAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentResource.cs new file mode 100644 index 000000000000..6200fb0e173a --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/CompoundAssessmentResource.cs @@ -0,0 +1,514 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Migrate.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Migrate +{ + /// + /// A Class representing a CompoundAssessment along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetCompoundAssessmentResource method. + /// Otherwise you can get one from its parent resource using the GetCompoundAssessment method. + /// + public partial class CompoundAssessmentResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The projectName. + /// The compoundAssessmentName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics; + private readonly CompoundAssessmentRestOperations _compoundAssessmentCompoundAssessmentOperationsRestClient; + private readonly CompoundAssessmentData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Migrate/assessmentProjects/webAppCompoundAssessments"; + + /// Initializes a new instance of the class for mocking. + protected CompoundAssessmentResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal CompoundAssessmentResource(ArmClient client, CompoundAssessmentData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// 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 CompoundAssessmentResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Migrate", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string compoundAssessmentCompoundAssessmentOperationsApiVersion); + _compoundAssessmentCompoundAssessmentOperationsRestClient = new CompoundAssessmentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, compoundAssessmentCompoundAssessmentOperationsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual CompoundAssessmentData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of WebAppCompoundAssessmentSummaryResources in the CompoundAssessment. + /// An object representing collection of WebAppCompoundAssessmentSummaryResources and their operations over a WebAppCompoundAssessmentSummaryResource. + public virtual WebAppCompoundAssessmentSummaryCollection GetWebAppCompoundAssessmentSummaries() + { + return GetCachedClient(client => new WebAppCompoundAssessmentSummaryCollection(client, Id)); + } + + /// + /// Get a WebAppCompoundAssessmentSummary + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/summaries/{summaryName} + /// + /// + /// Operation Id + /// WebAppCompoundAssessmentSummary_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Gets the Name of the WebApp compound assessment summary. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWebAppCompoundAssessmentSummaryAsync(string summaryName, CancellationToken cancellationToken = default) + { + return await GetWebAppCompoundAssessmentSummaries().GetAsync(summaryName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a WebAppCompoundAssessmentSummary + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/summaries/{summaryName} + /// + /// + /// Operation Id + /// WebAppCompoundAssessmentSummary_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Gets the Name of the WebApp compound assessment summary. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWebAppCompoundAssessmentSummary(string summaryName, CancellationToken cancellationToken = default) + { + return GetWebAppCompoundAssessmentSummaries().Get(summaryName, cancellationToken); + } + + /// + /// Get a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentResource.Get"); + scope.Start(); + try + { + var response = await _compoundAssessmentCompoundAssessmentOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CompoundAssessmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentResource.Get"); + scope.Start(); + try + { + var response = _compoundAssessmentCompoundAssessmentOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CompoundAssessmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Delete + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentResource.Delete"); + scope.Start(); + try + { + var response = await _compoundAssessmentCompoundAssessmentOperationsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new MigrateArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Delete + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentResource.Delete"); + scope.Start(); + try + { + var response = _compoundAssessmentCompoundAssessmentOperationsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new MigrateArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Create + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, CompoundAssessmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentResource.Update"); + scope.Start(); + try + { + var response = await _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MigrateArmOperation(new CompoundAssessmentOperationSource(Client), _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics, Pipeline, _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Create + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, CompoundAssessmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentResource.Update"); + scope.Start(); + try + { + var response = _compoundAssessmentCompoundAssessmentOperationsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MigrateArmOperation(new CompoundAssessmentOperationSource(Client), _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics, Pipeline, _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A long-running resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/downloadUrl + /// + /// + /// Operation Id + /// CompoundAssessmentOperations_DownloadUrl + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> DownloadUrlAsync(WaitUntil waitUntil, DownloadUrlContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentResource.DownloadUrl"); + scope.Start(); + try + { + var response = await _compoundAssessmentCompoundAssessmentOperationsRestClient.DownloadUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new MigrateArmOperation(new DownloadUriOperationSource(), _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics, Pipeline, _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateDownloadUrlRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A long-running resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/downloadUrl + /// + /// + /// Operation Id + /// CompoundAssessmentOperations_DownloadUrl + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation DownloadUrl(WaitUntil waitUntil, DownloadUrlContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics.CreateScope("CompoundAssessmentResource.DownloadUrl"); + scope.Start(); + try + { + var response = _compoundAssessmentCompoundAssessmentOperationsRestClient.DownloadUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new MigrateArmOperation(new DownloadUriOperationSource(), _compoundAssessmentCompoundAssessmentOperationsClientDiagnostics, Pipeline, _compoundAssessmentCompoundAssessmentOperationsRestClient.CreateDownloadUrlRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Extensions/MigrateExtensions.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Extensions/MigrateExtensions.cs new file mode 100644 index 000000000000..40abf36fc2e0 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Extensions/MigrateExtensions.cs @@ -0,0 +1,165 @@ +// 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.ResourceManager.Migrate.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Migrate +{ + /// A class to add extension methods to Azure.ResourceManager.Migrate. + public static partial class MigrateExtensions + { + private static MockableMigrateArmClient GetMockableMigrateArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableMigrateArmClient(client0)); + } + + private static MockableMigrateResourceGroupResource GetMockableMigrateResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableMigrateResourceGroupResource(client, resource.Id)); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static CompoundAssessmentResource GetCompoundAssessmentResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMigrateArmClient(client).GetCompoundAssessmentResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WebAppCompoundAssessmentSummaryResource GetWebAppCompoundAssessmentSummaryResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMigrateArmClient(client).GetWebAppCompoundAssessmentSummaryResource(id); + } + + /// + /// Gets a collection of CompoundAssessmentResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Assessment Project Name. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// An object representing collection of CompoundAssessmentResources and their operations over a CompoundAssessmentResource. + public static CompoundAssessmentCollection GetCompoundAssessments(this ResourceGroupResource resourceGroupResource, string projectName) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableMigrateResourceGroupResource(resourceGroupResource).GetCompoundAssessments(projectName); + } + + /// + /// Get a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetCompoundAssessmentAsync(this ResourceGroupResource resourceGroupResource, string projectName, string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableMigrateResourceGroupResource(resourceGroupResource).GetCompoundAssessmentAsync(projectName, compoundAssessmentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetCompoundAssessment(this ResourceGroupResource resourceGroupResource, string projectName, string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableMigrateResourceGroupResource(resourceGroupResource).GetCompoundAssessment(projectName, compoundAssessmentName, cancellationToken); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Extensions/MockableMigrateArmClient.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Extensions/MockableMigrateArmClient.cs new file mode 100644 index 000000000000..73a774a7c7bf --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Extensions/MockableMigrateArmClient.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableMigrateArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableMigrateArmClient() + { + } + + /// 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 MockableMigrateArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableMigrateArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual CompoundAssessmentResource GetCompoundAssessmentResource(ResourceIdentifier id) + { + CompoundAssessmentResource.ValidateResourceId(id); + return new CompoundAssessmentResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WebAppCompoundAssessmentSummaryResource GetWebAppCompoundAssessmentSummaryResource(ResourceIdentifier id) + { + WebAppCompoundAssessmentSummaryResource.ValidateResourceId(id); + return new WebAppCompoundAssessmentSummaryResource(Client, id); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Extensions/MockableMigrateResourceGroupResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Extensions/MockableMigrateResourceGroupResource.cs new file mode 100644 index 000000000000..7ac4ba06ad60 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Extensions/MockableMigrateResourceGroupResource.cs @@ -0,0 +1,110 @@ +// 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; + +namespace Azure.ResourceManager.Migrate.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableMigrateResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableMigrateResourceGroupResource() + { + } + + /// 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 MockableMigrateResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of CompoundAssessmentResources in the ResourceGroupResource. + /// Assessment Project Name. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// An object representing collection of CompoundAssessmentResources and their operations over a CompoundAssessmentResource. + public virtual CompoundAssessmentCollection GetCompoundAssessments(string projectName) + { + return new CompoundAssessmentCollection(Client, Id, projectName); + } + + /// + /// Get a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetCompoundAssessmentAsync(string projectName, string compoundAssessmentName, CancellationToken cancellationToken = default) + { + return await GetCompoundAssessments(projectName).GetAsync(compoundAssessmentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName} + /// + /// + /// Operation Id + /// CompoundAssessment_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetCompoundAssessment(string projectName, string compoundAssessmentName, CancellationToken cancellationToken = default) + { + return GetCompoundAssessments(projectName).Get(compoundAssessmentName, cancellationToken); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/Argument.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..0182a5196211 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/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.Migrate +{ + 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/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..a66f9d42e55e --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/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.Migrate +{ + 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/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/ChangeTrackingList.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..47489526e8bf --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/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.Migrate +{ + 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/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..8f874b8eacb2 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,399 @@ +// 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.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + 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(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/Optional.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..e41b97ffe4ae --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.ResourceManager.Migrate +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..6922a99f93ea --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/LongRunningOperation/CompoundAssessmentOperationSource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/LongRunningOperation/CompoundAssessmentOperationSource.cs new file mode 100644 index 000000000000..0cd25d377f34 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/LongRunningOperation/CompoundAssessmentOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate +{ + internal class CompoundAssessmentOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal CompoundAssessmentOperationSource(ArmClient client) + { + _client = client; + } + + CompoundAssessmentResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new CompoundAssessmentResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new CompoundAssessmentResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/LongRunningOperation/DownloadUriOperationSource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/LongRunningOperation/DownloadUriOperationSource.cs new file mode 100644 index 000000000000..0386533eec64 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/LongRunningOperation/DownloadUriOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.Migrate.Models; + +namespace Azure.ResourceManager.Migrate +{ + internal class DownloadUriOperationSource : IOperationSource + { + DownloadUri IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return DownloadUri.DeserializeDownloadUri(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return DownloadUri.DeserializeDownloadUri(document.RootElement); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/LongRunningOperation/MigrateArmOperation.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/LongRunningOperation/MigrateArmOperation.cs new file mode 100644 index 000000000000..74c14408f3f1 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/LongRunningOperation/MigrateArmOperation.cs @@ -0,0 +1,94 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Migrate +{ +#pragma warning disable SA1649 // File name should match first type name + internal class MigrateArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of MigrateArmOperation for mocking. + protected MigrateArmOperation() + { + } + + internal MigrateArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal MigrateArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "MigrateArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/LongRunningOperation/MigrateArmOperationOfT.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/LongRunningOperation/MigrateArmOperationOfT.cs new file mode 100644 index 000000000000..c7dc7329573a --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/LongRunningOperation/MigrateArmOperationOfT.cs @@ -0,0 +1,100 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Migrate +{ +#pragma warning disable SA1649 // File name should match first type name + internal class MigrateArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of MigrateArmOperation for mocking. + protected MigrateArmOperation() + { + } + + internal MigrateArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal MigrateArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "MigrateArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override T Value => _operation.Value; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); + + /// + public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/AssessmentSource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/AssessmentSource.cs new file mode 100644 index 000000000000..b43395708522 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/AssessmentSource.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Assessment Source. + public readonly partial struct AssessmentSource : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AssessmentSource(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string MachineValue = "Machine"; + private const string IISValue = "IIS"; + private const string TomCatValue = "TomCat"; + private const string OracleServerValue = "OracleServer"; + private const string OracleDatabaseValue = "OracleDatabase"; + private const string SAPInstanceValue = "SAPInstance"; + private const string SpringbootApplicationValue = "SpringbootApplication"; + private const string MySQLServerValue = "MySQLServer"; + private const string SqlInstanceValue = "SqlInstance"; + private const string SqlDatabaseValue = "SqlDatabase"; + private const string WebAppsValue = "WebApps"; + + /// Unknown - Assessment Source. + public static AssessmentSource Unknown { get; } = new AssessmentSource(UnknownValue); + /// Machine - Assessment Source. + public static AssessmentSource Machine { get; } = new AssessmentSource(MachineValue); + /// IIS - Assessment Source. + public static AssessmentSource IIS { get; } = new AssessmentSource(IISValue); + /// TomCat - Assessment Source. + public static AssessmentSource TomCat { get; } = new AssessmentSource(TomCatValue); + /// OracleServer - Assessment Source. + public static AssessmentSource OracleServer { get; } = new AssessmentSource(OracleServerValue); + /// OracleDatabase - Assessment Source. + public static AssessmentSource OracleDatabase { get; } = new AssessmentSource(OracleDatabaseValue); + /// SAPInstance - Assessment Source. + public static AssessmentSource SAPInstance { get; } = new AssessmentSource(SAPInstanceValue); + /// SpringbootApplication - Assessment Source. + public static AssessmentSource SpringbootApplication { get; } = new AssessmentSource(SpringbootApplicationValue); + /// MySQLServer - Assessment Source. + public static AssessmentSource MySQLServer { get; } = new AssessmentSource(MySQLServerValue); + /// SqlInstance - Assessment Source. + public static AssessmentSource SqlInstance { get; } = new AssessmentSource(SqlInstanceValue); + /// SqlDatabase - Assessment Source. + public static AssessmentSource SqlDatabase { get; } = new AssessmentSource(SqlDatabaseValue); + /// WebApps - Assessment Source. + public static AssessmentSource WebApps { get; } = new AssessmentSource(WebAppsValue); + /// Determines if two values are the same. + public static bool operator ==(AssessmentSource left, AssessmentSource right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AssessmentSource left, AssessmentSource right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AssessmentSource(string value) => new AssessmentSource(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AssessmentSource other && Equals(other); + /// + public bool Equals(AssessmentSource other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/AssessmentStatus.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/AssessmentStatus.cs new file mode 100644 index 000000000000..d9730d5c1d38 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/AssessmentStatus.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Assessment Status. + public readonly partial struct AssessmentStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AssessmentStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatedValue = "Created"; + private const string UpdatedValue = "Updated"; + private const string RunningValue = "Running"; + private const string CompletedValue = "Completed"; + private const string InvalidValue = "Invalid"; + private const string OutOfSyncValue = "OutOfSync"; + private const string OutDatedValue = "OutDated"; + private const string DeletedValue = "Deleted"; + private const string FailedValue = "Failed"; + + /// Assessment is Created. + public static AssessmentStatus Created { get; } = new AssessmentStatus(CreatedValue); + /// Assessment is Updated. + public static AssessmentStatus Updated { get; } = new AssessmentStatus(UpdatedValue); + /// Assessment is currently running. + public static AssessmentStatus Running { get; } = new AssessmentStatus(RunningValue); + /// Assessment is Completed or Ready. + public static AssessmentStatus Completed { get; } = new AssessmentStatus(CompletedValue); + /// Assessment is Failed i.e. it is now invalid. + public static AssessmentStatus Invalid { get; } = new AssessmentStatus(InvalidValue); + /// Assessment is Out of Sync. + public static AssessmentStatus OutOfSync { get; } = new AssessmentStatus(OutOfSyncValue); + /// Assessment is Out Dated. + public static AssessmentStatus OutDated { get; } = new AssessmentStatus(OutDatedValue); + /// Assessment is Deleted. + public static AssessmentStatus Deleted { get; } = new AssessmentStatus(DeletedValue); + /// Assessment has Failed. + public static AssessmentStatus Failed { get; } = new AssessmentStatus(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(AssessmentStatus left, AssessmentStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AssessmentStatus left, AssessmentStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AssessmentStatus(string value) => new AssessmentStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AssessmentStatus other && Equals(other); + /// + public bool Equals(AssessmentStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/AzureManagementOfferingType.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/AzureManagementOfferingType.cs new file mode 100644 index 000000000000..9051809d1ebd --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/AzureManagementOfferingType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Azure management Offering type. + public readonly partial struct AzureManagementOfferingType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AzureManagementOfferingType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoValue = "No"; + private const string SCOMMIValue = "SCOMMI"; + private const string AzMonValue = "AzMon"; + private const string AUMValue = "AUM"; + private const string AzureBackupValue = "AzureBackup"; + + /// No - Azure management Offering type. + public static AzureManagementOfferingType No { get; } = new AzureManagementOfferingType(NoValue); + /// SCOMMI - Azure management Offering type. + public static AzureManagementOfferingType SCOMMI { get; } = new AzureManagementOfferingType(SCOMMIValue); + /// AzMon - Azure management Offering type. + public static AzureManagementOfferingType AzMon { get; } = new AzureManagementOfferingType(AzMonValue); + /// AUM - Azure management Offering type. + public static AzureManagementOfferingType AUM { get; } = new AzureManagementOfferingType(AUMValue); + /// AzureBackup - Azure management Offering type. + public static AzureManagementOfferingType AzureBackup { get; } = new AzureManagementOfferingType(AzureBackupValue); + /// Determines if two values are the same. + public static bool operator ==(AzureManagementOfferingType left, AzureManagementOfferingType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AzureManagementOfferingType left, AzureManagementOfferingType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AzureManagementOfferingType(string value) => new AzureManagementOfferingType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AzureManagementOfferingType other && Equals(other); + /// + public bool Equals(AzureManagementOfferingType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/AzureTarget.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/AzureTarget.cs new file mode 100644 index 000000000000..88dd6282ff39 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/AzureTarget.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Azure Target. + public readonly partial struct AzureTarget : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AzureTarget(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string SqlDatabaseValue = "SqlDatabase"; + private const string SqlMIValue = "SqlMI"; + private const string FlexServerPGValue = "FlexServerPG"; + private const string OracleIaasVmValue = "OracleIaasVM"; + private const string AzureSpringAppsValue = "AzureSpringApps"; + private const string SAPAzureInstanceValue = "SAPAzureInstance"; + private const string AKSValue = "AKS"; + private const string MySQLAzureFlexServerValue = "MySQLAzureFlexServer"; + private const string AzureSQLVMValue = "AzureSQLVM"; + private const string AzureVmValue = "AzureVM"; + private const string AzureAppServiceValue = "AzureAppService"; + private const string AzureAppServiceContainerValue = "AzureAppServiceContainer"; + private const string AvsValue = "Avs"; + + /// Unknown - Azure Target. + public static AzureTarget Unknown { get; } = new AzureTarget(UnknownValue); + /// SqlDatabase - Azure Target. + public static AzureTarget SqlDatabase { get; } = new AzureTarget(SqlDatabaseValue); + /// SqlMI - Azure Target. + public static AzureTarget SqlMI { get; } = new AzureTarget(SqlMIValue); + /// FlexServerPG - Azure Target. + public static AzureTarget FlexServerPG { get; } = new AzureTarget(FlexServerPGValue); + /// OracleIaasVM - Azure Target. + public static AzureTarget OracleIaasVm { get; } = new AzureTarget(OracleIaasVmValue); + /// AzureSpringApps - Azure Target. + public static AzureTarget AzureSpringApps { get; } = new AzureTarget(AzureSpringAppsValue); + /// SAPAzureInstance - Azure Target. + public static AzureTarget SAPAzureInstance { get; } = new AzureTarget(SAPAzureInstanceValue); + /// AKS - Azure Target. + public static AzureTarget AKS { get; } = new AzureTarget(AKSValue); + /// MySQLAzureFlexServer - Azure Target. + public static AzureTarget MySQLAzureFlexServer { get; } = new AzureTarget(MySQLAzureFlexServerValue); + /// AzureSQLVM - Azure Target. + public static AzureTarget AzureSQLVM { get; } = new AzureTarget(AzureSQLVMValue); + /// AzureVM - Azure Target. + public static AzureTarget AzureVm { get; } = new AzureTarget(AzureVmValue); + /// AzureAppService - Azure Target. + public static AzureTarget AzureAppService { get; } = new AzureTarget(AzureAppServiceValue); + /// AzureAppServiceContainer - Azure Target. + public static AzureTarget AzureAppServiceContainer { get; } = new AzureTarget(AzureAppServiceContainerValue); + /// Avs - Azure Target. + public static AzureTarget Avs { get; } = new AzureTarget(AvsValue); + /// Determines if two values are the same. + public static bool operator ==(AzureTarget left, AzureTarget right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AzureTarget left, AzureTarget right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AzureTarget(string value) => new AzureTarget(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AzureTarget other && Equals(other); + /// + public bool Equals(AzureTarget other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CloudSuitabilityCommon.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CloudSuitabilityCommon.cs new file mode 100644 index 000000000000..f5e2e8468e2d --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CloudSuitabilityCommon.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Cloud Suitability Common. + public readonly partial struct CloudSuitabilityCommon : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CloudSuitabilityCommon(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string NotSuitableValue = "NotSuitable"; + private const string SuitableValue = "Suitable"; + private const string ConditionallySuitableValue = "ConditionallySuitable"; + private const string ReadinessUnknownValue = "ReadinessUnknown"; + private const string SuitableWithWarningsValue = "SuitableWithWarnings"; + + /// Unknown - Cloud Suitability Common. + public static CloudSuitabilityCommon Unknown { get; } = new CloudSuitabilityCommon(UnknownValue); + /// NotSuitable - Cloud Suitability Common. + public static CloudSuitabilityCommon NotSuitable { get; } = new CloudSuitabilityCommon(NotSuitableValue); + /// Suitable - Cloud Suitability Common. + public static CloudSuitabilityCommon Suitable { get; } = new CloudSuitabilityCommon(SuitableValue); + /// ConditionallySuitable - Cloud Suitability Common. + public static CloudSuitabilityCommon ConditionallySuitable { get; } = new CloudSuitabilityCommon(ConditionallySuitableValue); + /// ReadinessUnknown - Cloud Suitability Common. + public static CloudSuitabilityCommon ReadinessUnknown { get; } = new CloudSuitabilityCommon(ReadinessUnknownValue); + /// SuitableWithWarnings - Cloud Suitability Common. + public static CloudSuitabilityCommon SuitableWithWarnings { get; } = new CloudSuitabilityCommon(SuitableWithWarningsValue); + /// Determines if two values are the same. + public static bool operator ==(CloudSuitabilityCommon left, CloudSuitabilityCommon right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CloudSuitabilityCommon left, CloudSuitabilityCommon right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CloudSuitabilityCommon(string value) => new CloudSuitabilityCommon(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CloudSuitabilityCommon other && Equals(other); + /// + public bool Equals(CloudSuitabilityCommon other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentDetails.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentDetails.Serialization.cs new file mode 100644 index 000000000000..d48ce192085a --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentDetails.Serialization.cs @@ -0,0 +1,156 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class CompoundAssessmentDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CompoundAssessmentDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(CreatedTimestamp)) + { + writer.WritePropertyName("createdTimestamp"u8); + writer.WriteStringValue(CreatedTimestamp.Value, "O"); + } + if (Optional.IsDefined(UpdatedTimestamp)) + { + writer.WritePropertyName("updatedTimestamp"u8); + writer.WriteStringValue(UpdatedTimestamp.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CompoundAssessmentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CompoundAssessmentDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCompoundAssessmentDetails(document.RootElement, options); + } + + internal static CompoundAssessmentDetails DeserializeCompoundAssessmentDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? createdTimestamp = default; + DateTimeOffset? updatedTimestamp = default; + AssessmentStatus status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("createdTimestamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdTimestamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("updatedTimestamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updatedTimestamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new AssessmentStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CompoundAssessmentDetails(createdTimestamp, updatedTimestamp, status, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CompoundAssessmentDetails)} does not support writing '{options.Format}' format."); + } + } + + CompoundAssessmentDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCompoundAssessmentDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CompoundAssessmentDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentDetails.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentDetails.cs new file mode 100644 index 000000000000..e6208bffb04a --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentDetails.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Details of the compound assessment. + public partial class CompoundAssessmentDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Status of the assessment. + internal CompoundAssessmentDetails(AssessmentStatus status) + { + Status = status; + } + + /// Initializes a new instance of . + /// Timestamp when the assessment was created. + /// Timestamp when the assessment was last updated. + /// Status of the assessment. + /// Keeps track of any properties unknown to the library. + internal CompoundAssessmentDetails(DateTimeOffset? createdTimestamp, DateTimeOffset? updatedTimestamp, AssessmentStatus status, IDictionary serializedAdditionalRawData) + { + CreatedTimestamp = createdTimestamp; + UpdatedTimestamp = updatedTimestamp; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CompoundAssessmentDetails() + { + } + + /// Timestamp when the assessment was created. + public DateTimeOffset? CreatedTimestamp { get; } + /// Timestamp when the assessment was last updated. + public DateTimeOffset? UpdatedTimestamp { get; } + /// Status of the assessment. + public AssessmentStatus Status { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentListResult.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentListResult.Serialization.cs new file mode 100644 index 000000000000..bc739e98c801 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + internal partial class CompoundAssessmentListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CompoundAssessmentListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CompoundAssessmentListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CompoundAssessmentListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCompoundAssessmentListResult(document.RootElement, options); + } + + internal static CompoundAssessmentListResult DeserializeCompoundAssessmentListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CompoundAssessmentData.DeserializeCompoundAssessmentData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CompoundAssessmentListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CompoundAssessmentListResult)} does not support writing '{options.Format}' format."); + } + } + + CompoundAssessmentListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCompoundAssessmentListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CompoundAssessmentListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentListResult.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentListResult.cs new file mode 100644 index 000000000000..10b06ede3a6b --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentListResult.cs @@ -0,0 +1,80 @@ +// 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.Migrate.Models +{ + /// The response of a CompoundAssessment list operation. + internal partial class CompoundAssessmentListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The CompoundAssessment items on this page. + /// is null. + internal CompoundAssessmentListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The CompoundAssessment items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal CompoundAssessmentListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CompoundAssessmentListResult() + { + } + + /// The CompoundAssessment items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentProperties.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentProperties.Serialization.cs new file mode 100644 index 000000000000..1dcee4848fb7 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentProperties.Serialization.cs @@ -0,0 +1,167 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class CompoundAssessmentProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CompoundAssessmentProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WritePropertyName("targetAssessmentArmIds"u8); + writer.WriteObjectValue(TargetAssessmentArmIds, options); + if (Optional.IsDefined(FallbackMachineAssessmentArmId)) + { + writer.WritePropertyName("fallbackMachineAssessmentArmId"u8); + writer.WriteStringValue(FallbackMachineAssessmentArmId); + } + if (options.Format != "W" && Optional.IsDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteObjectValue(Details, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CompoundAssessmentProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CompoundAssessmentProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCompoundAssessmentProperties(document.RootElement, options); + } + + internal static CompoundAssessmentProperties DeserializeCompoundAssessmentProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + TargetAssessmentArmIds targetAssessmentArmIds = default; + string fallbackMachineAssessmentArmId = default; + CompoundAssessmentDetails details = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetAssessmentArmIds"u8)) + { + targetAssessmentArmIds = TargetAssessmentArmIds.DeserializeTargetAssessmentArmIds(property.Value, options); + continue; + } + if (property.NameEquals("fallbackMachineAssessmentArmId"u8)) + { + fallbackMachineAssessmentArmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + details = CompoundAssessmentDetails.DeserializeCompoundAssessmentDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CompoundAssessmentProperties(provisioningState, targetAssessmentArmIds, fallbackMachineAssessmentArmId, details, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CompoundAssessmentProperties)} does not support writing '{options.Format}' format."); + } + } + + CompoundAssessmentProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCompoundAssessmentProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CompoundAssessmentProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentProperties.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentProperties.cs new file mode 100644 index 000000000000..303861f005f6 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CompoundAssessmentProperties.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; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Properties of a compound assessment. + public partial class CompoundAssessmentProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// ARM IDs of the target assessments. + /// is null. + public CompoundAssessmentProperties(TargetAssessmentArmIds targetAssessmentArmIds) + { + Argument.AssertNotNull(targetAssessmentArmIds, nameof(targetAssessmentArmIds)); + + TargetAssessmentArmIds = targetAssessmentArmIds; + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// ARM IDs of the target assessments. + /// Fallback machine assessment ARM ID. + /// Details of the compound assessment. + /// Keeps track of any properties unknown to the library. + internal CompoundAssessmentProperties(ProvisioningState? provisioningState, TargetAssessmentArmIds targetAssessmentArmIds, string fallbackMachineAssessmentArmId, CompoundAssessmentDetails details, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + TargetAssessmentArmIds = targetAssessmentArmIds; + FallbackMachineAssessmentArmId = fallbackMachineAssessmentArmId; + Details = details; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CompoundAssessmentProperties() + { + } + + /// The status of the last operation. + public ProvisioningState? ProvisioningState { get; } + /// ARM IDs of the target assessments. + public TargetAssessmentArmIds TargetAssessmentArmIds { get; set; } + /// Fallback machine assessment ARM ID. + public string FallbackMachineAssessmentArmId { get; set; } + /// Details of the compound assessment. + public CompoundAssessmentDetails Details { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CostDetailsCommon.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CostDetailsCommon.Serialization.cs new file mode 100644 index 000000000000..a7b6e54aeecb --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CostDetailsCommon.Serialization.cs @@ -0,0 +1,158 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class CostDetailsCommon : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CostDetailsCommon)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(SavingOptions)) + { + writer.WritePropertyName("savingOptions"u8); + writer.WriteStringValue(SavingOptions.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(CostDetail)) + { + writer.WritePropertyName("costDetail"u8); + writer.WriteStartArray(); + foreach (var item in CostDetail) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CostDetailsCommon IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CostDetailsCommon)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCostDetailsCommon(document.RootElement, options); + } + + internal static CostDetailsCommon DeserializeCostDetailsCommon(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SavingsOption? savingOptions = default; + IReadOnlyList costDetail = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("savingOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + savingOptions = new SavingsOption(property.Value.GetString()); + continue; + } + if (property.NameEquals("costDetail"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NameValuePairCostType.DeserializeNameValuePairCostType(item, options)); + } + costDetail = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CostDetailsCommon(savingOptions, costDetail ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CostDetailsCommon)} does not support writing '{options.Format}' format."); + } + } + + CostDetailsCommon IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCostDetailsCommon(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CostDetailsCommon)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CostDetailsCommon.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CostDetailsCommon.cs new file mode 100644 index 000000000000..d3622f49c7b9 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CostDetailsCommon.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// The cost details. + public partial class CostDetailsCommon + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CostDetailsCommon() + { + CostDetail = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The savings options. + /// The sku cost details per azure offer type. + /// Keeps track of any properties unknown to the library. + internal CostDetailsCommon(SavingsOption? savingOptions, IReadOnlyList costDetail, IDictionary serializedAdditionalRawData) + { + SavingOptions = savingOptions; + CostDetail = costDetail; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The savings options. + public SavingsOption? SavingOptions { get; } + /// The sku cost details per azure offer type. + public IReadOnlyList CostDetail { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CostType.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CostType.cs new file mode 100644 index 000000000000..5dd1094db057 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/CostType.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Cost type. + public readonly partial struct CostType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CostType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MonthlyStorageCostValue = "MonthlyStorageCost"; + private const string MonthlyComputeCostValue = "MonthlyComputeCost"; + private const string MonthlyLicensingCostValue = "MonthlyLicensingCost"; + private const string MonthlySecurityCostValue = "MonthlySecurityCost"; + private const string MonthlyManagementCostValue = "MonthlyManagementCost"; + private const string MonitoringServiceValue = "MonitoringService"; + private const string DataProtectionServiceValue = "DataProtectionService"; + private const string PatchingServiceValue = "PatchingService"; + private const string MonthlyAzureHybridCostValue = "MonthlyAzureHybridCost"; + private const string MonthlyPremiumV2StorageCostValue = "MonthlyPremiumV2StorageCost"; + private const string MonthlyLinuxAzureHybridCostValue = "MonthlyLinuxAzureHybridCost"; + private const string MonthlyUltraStorageCostValue = "MonthlyUltraStorageCost"; + private const string MonthlyStandardSsdStorageCostValue = "MonthlyStandardSsdStorageCost"; + private const string MonthlyBandwidthCostValue = "MonthlyBandwidthCost"; + private const string MonthlyPremiumStorageCostValue = "MonthlyPremiumStorageCost"; + private const string MonthlyUltraDiskCostValue = "MonthlyUltraDiskCost"; + private const string MonthlyStandardHddStorageCostValue = "MonthlyStandardHddStorageCost"; + private const string MonthlyAvsExternalStorageCostValue = "MonthlyAvsExternalStorageCost"; + private const string MonthlyAvsNetworkCostValue = "MonthlyAvsNetworkCost"; + private const string MonthlyAvsNodeCostValue = "MonthlyAvsNodeCost"; + private const string TotalMonthlyCostValue = "TotalMonthlyCost"; + + /// MonthlyStorageCost - Cost type. + public static CostType MonthlyStorageCost { get; } = new CostType(MonthlyStorageCostValue); + /// MonthlyComputeCost - Cost type. + public static CostType MonthlyComputeCost { get; } = new CostType(MonthlyComputeCostValue); + /// MonthlyLicensingCost - Cost type. + public static CostType MonthlyLicensingCost { get; } = new CostType(MonthlyLicensingCostValue); + /// MonthlySecurityCost - Cost type. + public static CostType MonthlySecurityCost { get; } = new CostType(MonthlySecurityCostValue); + /// MonthlyManagementCost - Cost type. + public static CostType MonthlyManagementCost { get; } = new CostType(MonthlyManagementCostValue); + /// MonitoringService - Cost type. + public static CostType MonitoringService { get; } = new CostType(MonitoringServiceValue); + /// DataProtectionService - Cost type. + public static CostType DataProtectionService { get; } = new CostType(DataProtectionServiceValue); + /// PatchingService - Cost type. + public static CostType PatchingService { get; } = new CostType(PatchingServiceValue); + /// MonthlyAzureHybridCost - Cost type. + public static CostType MonthlyAzureHybridCost { get; } = new CostType(MonthlyAzureHybridCostValue); + /// MonthlyPremiumV2StorageCost - Cost type. + public static CostType MonthlyPremiumV2StorageCost { get; } = new CostType(MonthlyPremiumV2StorageCostValue); + /// MonthlyLinuxAzureHybridCost - Cost type. + public static CostType MonthlyLinuxAzureHybridCost { get; } = new CostType(MonthlyLinuxAzureHybridCostValue); + /// MonthlyUltraStorageCost - Cost type. + public static CostType MonthlyUltraStorageCost { get; } = new CostType(MonthlyUltraStorageCostValue); + /// MonthlyStandardSsdStorageCost - Cost type. + public static CostType MonthlyStandardSsdStorageCost { get; } = new CostType(MonthlyStandardSsdStorageCostValue); + /// MonthlyBandwidthCost - Cost type. + public static CostType MonthlyBandwidthCost { get; } = new CostType(MonthlyBandwidthCostValue); + /// MonthlyPremiumStorageCost - Cost type. + public static CostType MonthlyPremiumStorageCost { get; } = new CostType(MonthlyPremiumStorageCostValue); + /// MonthlyUltraDiskCost - Cost type. + public static CostType MonthlyUltraDiskCost { get; } = new CostType(MonthlyUltraDiskCostValue); + /// MonthlyStandardHddStorageCost - Cost type. + public static CostType MonthlyStandardHddStorageCost { get; } = new CostType(MonthlyStandardHddStorageCostValue); + /// MonthlyAvsExternalStorageCost - Cost type. + public static CostType MonthlyAvsExternalStorageCost { get; } = new CostType(MonthlyAvsExternalStorageCostValue); + /// MonthlyAvsNetworkCost - Cost type. + public static CostType MonthlyAvsNetworkCost { get; } = new CostType(MonthlyAvsNetworkCostValue); + /// MonthlyAvsNodeCost - Cost type. + public static CostType MonthlyAvsNodeCost { get; } = new CostType(MonthlyAvsNodeCostValue); + /// TotalMonthlyCost - Cost type. + public static CostType TotalMonthlyCost { get; } = new CostType(TotalMonthlyCostValue); + /// Determines if two values are the same. + public static bool operator ==(CostType left, CostType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CostType left, CostType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CostType(string value) => new CostType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CostType other && Equals(other); + /// + public bool Equals(CostType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DiscoveredLightSummary.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DiscoveredLightSummary.Serialization.cs new file mode 100644 index 000000000000..3fcd9c3cebfc --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DiscoveredLightSummary.Serialization.cs @@ -0,0 +1,198 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class DiscoveredLightSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoveredLightSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("numberOfWebApps"u8); + writer.WriteNumberValue(NumberOfWebApps); + if (Optional.IsCollectionDefined(NumberOfWebAppsPerType)) + { + writer.WritePropertyName("numberOfWebAppsPerType"u8); + writer.WriteStartArray(); + foreach (var item in NumberOfWebAppsPerType) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(NumberOfWebServersPerType)) + { + writer.WritePropertyName("numberOfWebServersPerType"u8); + writer.WriteStartArray(); + foreach (var item in NumberOfWebServersPerType) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("numberOfWebServers"u8); + writer.WriteNumberValue(NumberOfWebServers); + writer.WritePropertyName("numberOfServers"u8); + writer.WriteNumberValue(NumberOfServers); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiscoveredLightSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoveredLightSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiscoveredLightSummary(document.RootElement, options); + } + + internal static DiscoveredLightSummary DeserializeDiscoveredLightSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int numberOfWebApps = default; + IReadOnlyList numberOfWebAppsPerType = default; + IReadOnlyList numberOfWebServersPerType = default; + int numberOfWebServers = default; + int numberOfServers = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("numberOfWebApps"u8)) + { + numberOfWebApps = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("numberOfWebAppsPerType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WebAppsPerType.DeserializeWebAppsPerType(item, options)); + } + numberOfWebAppsPerType = array; + continue; + } + if (property.NameEquals("numberOfWebServersPerType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WebServersPerType.DeserializeWebServersPerType(item, options)); + } + numberOfWebServersPerType = array; + continue; + } + if (property.NameEquals("numberOfWebServers"u8)) + { + numberOfWebServers = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("numberOfServers"u8)) + { + numberOfServers = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiscoveredLightSummary( + numberOfWebApps, + numberOfWebAppsPerType ?? new ChangeTrackingList(), + numberOfWebServersPerType ?? new ChangeTrackingList(), + numberOfWebServers, + numberOfServers, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiscoveredLightSummary)} does not support writing '{options.Format}' format."); + } + } + + DiscoveredLightSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiscoveredLightSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiscoveredLightSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DiscoveredLightSummary.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DiscoveredLightSummary.cs new file mode 100644 index 000000000000..3580e422fec8 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DiscoveredLightSummary.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Summary of the compound assessment. + public partial class DiscoveredLightSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Number of web apps. + /// Number of web servers. + /// Number of servers. + internal DiscoveredLightSummary(int numberOfWebApps, int numberOfWebServers, int numberOfServers) + { + NumberOfWebApps = numberOfWebApps; + NumberOfWebAppsPerType = new ChangeTrackingList(); + NumberOfWebServersPerType = new ChangeTrackingList(); + NumberOfWebServers = numberOfWebServers; + NumberOfServers = numberOfServers; + } + + /// Initializes a new instance of . + /// Number of web apps. + /// Number of web apps per type. + /// Number of web servers per type. + /// Number of web servers. + /// Number of servers. + /// Keeps track of any properties unknown to the library. + internal DiscoveredLightSummary(int numberOfWebApps, IReadOnlyList numberOfWebAppsPerType, IReadOnlyList numberOfWebServersPerType, int numberOfWebServers, int numberOfServers, IDictionary serializedAdditionalRawData) + { + NumberOfWebApps = numberOfWebApps; + NumberOfWebAppsPerType = numberOfWebAppsPerType; + NumberOfWebServersPerType = numberOfWebServersPerType; + NumberOfWebServers = numberOfWebServers; + NumberOfServers = numberOfServers; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DiscoveredLightSummary() + { + } + + /// Number of web apps. + public int NumberOfWebApps { get; } + /// Number of web apps per type. + public IReadOnlyList NumberOfWebAppsPerType { get; } + /// Number of web servers per type. + public IReadOnlyList NumberOfWebServersPerType { get; } + /// Number of web servers. + public int NumberOfWebServers { get; } + /// Number of servers. + public int NumberOfServers { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DownloadUri.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DownloadUri.Serialization.cs new file mode 100644 index 000000000000..03ba25513355 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DownloadUri.Serialization.cs @@ -0,0 +1,140 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class DownloadUri : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DownloadUri)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("assessmentReportUrl"u8); + writer.WriteStringValue(AssessmentReportUri); + } + if (options.Format != "W") + { + writer.WritePropertyName("expirationTime"u8); + writer.WriteStringValue(ExpireOn, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DownloadUri IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DownloadUri)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDownloadUri(document.RootElement, options); + } + + internal static DownloadUri DeserializeDownloadUri(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string assessmentReportUrl = default; + DateTimeOffset expirationTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assessmentReportUrl"u8)) + { + assessmentReportUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("expirationTime"u8)) + { + expirationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DownloadUri(assessmentReportUrl, expirationTime, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DownloadUri)} does not support writing '{options.Format}' format."); + } + } + + DownloadUri IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDownloadUri(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DownloadUri)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DownloadUri.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DownloadUri.cs new file mode 100644 index 000000000000..0c9097700df3 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DownloadUri.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Data model of Download URL for assessment report. + public partial class DownloadUri + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Hyperlink to download report. + /// Expiry date of download url. + internal DownloadUri(string assessmentReportUri, DateTimeOffset expireOn) + { + AssessmentReportUri = assessmentReportUri; + ExpireOn = expireOn; + } + + /// Initializes a new instance of . + /// Hyperlink to download report. + /// Expiry date of download url. + /// Keeps track of any properties unknown to the library. + internal DownloadUri(string assessmentReportUri, DateTimeOffset expireOn, IDictionary serializedAdditionalRawData) + { + AssessmentReportUri = assessmentReportUri; + ExpireOn = expireOn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DownloadUri() + { + } + + /// Hyperlink to download report. + public string AssessmentReportUri { get; } + /// Expiry date of download url. + public DateTimeOffset ExpireOn { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DownloadUrlContent.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DownloadUrlContent.Serialization.cs new file mode 100644 index 000000000000..566a552c5f00 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DownloadUrlContent.Serialization.cs @@ -0,0 +1,118 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class DownloadUrlContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DownloadUrlContent)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DownloadUrlContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DownloadUrlContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDownloadUrlContent(document.RootElement, options); + } + + internal static DownloadUrlContent DeserializeDownloadUrlContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DownloadUrlContent(serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DownloadUrlContent)} does not support writing '{options.Format}' format."); + } + } + + DownloadUrlContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDownloadUrlContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DownloadUrlContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DownloadUrlContent.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DownloadUrlContent.cs new file mode 100644 index 000000000000..3462a4b54d91 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/DownloadUrlContent.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// The DownloadUrlContent. + public partial class DownloadUrlContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DownloadUrlContent() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal DownloadUrlContent(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/ManagementDetails.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/ManagementDetails.Serialization.cs new file mode 100644 index 000000000000..64bcfe75e83e --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/ManagementDetails.Serialization.cs @@ -0,0 +1,158 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class ManagementDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagementDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ReadinessSummary)) + { + writer.WritePropertyName("readinessSummary"u8); + writer.WriteStartArray(); + foreach (var item in ReadinessSummary) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ManagementDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagementDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManagementDetails(document.RootElement, options); + } + + internal static ManagementDetails DeserializeManagementDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureManagementOfferingType? name = default; + IReadOnlyList readinessSummary = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new AzureManagementOfferingType(property.Value.GetString()); + continue; + } + if (property.NameEquals("readinessSummary"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NameValuePairCloudSuitabilityCommon.DeserializeNameValuePairCloudSuitabilityCommon(item, options)); + } + readinessSummary = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ManagementDetails(name, readinessSummary ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ManagementDetails)} does not support writing '{options.Format}' format."); + } + } + + ManagementDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeManagementDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManagementDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/ManagementDetails.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/ManagementDetails.cs new file mode 100644 index 000000000000..9bc65418c800 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/ManagementDetails.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Management details. + public partial class ManagementDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ManagementDetails() + { + ReadinessSummary = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The management summary name. + /// The management suitability summary. + /// Keeps track of any properties unknown to the library. + internal ManagementDetails(AzureManagementOfferingType? name, IReadOnlyList readinessSummary, IDictionary serializedAdditionalRawData) + { + Name = name; + ReadinessSummary = readinessSummary; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The management summary name. + public AzureManagementOfferingType? Name { get; } + /// The management suitability summary. + public IReadOnlyList ReadinessSummary { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrateWorkloadType.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrateWorkloadType.cs new file mode 100644 index 000000000000..641ca43c6a0f --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrateWorkloadType.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Migration Workload type. + public readonly partial struct MigrateWorkloadType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MigrateWorkloadType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string MachineValue = "Machine"; + private const string ServerValue = "Server"; + private const string InstanceValue = "Instance"; + private const string WebServerValue = "WebServer"; + private const string WebApplicationValue = "WebApplication"; + private const string DatabaseValue = "Database"; + private const string HostValue = "Host"; + private const string ManagementServerValue = "ManagementServer"; + + /// Unknown - Migration Workload type. + public static MigrateWorkloadType Unknown { get; } = new MigrateWorkloadType(UnknownValue); + /// Machine - Migration Workload type. + public static MigrateWorkloadType Machine { get; } = new MigrateWorkloadType(MachineValue); + /// Server - Migration Workload type. + public static MigrateWorkloadType Server { get; } = new MigrateWorkloadType(ServerValue); + /// Instance - Migration Workload type. + public static MigrateWorkloadType Instance { get; } = new MigrateWorkloadType(InstanceValue); + /// WebServer - Migration Workload type. + public static MigrateWorkloadType WebServer { get; } = new MigrateWorkloadType(WebServerValue); + /// WebApplication - Migration Workload type. + public static MigrateWorkloadType WebApplication { get; } = new MigrateWorkloadType(WebApplicationValue); + /// Database - Migration Workload type. + public static MigrateWorkloadType Database { get; } = new MigrateWorkloadType(DatabaseValue); + /// Host - Migration Workload type. + public static MigrateWorkloadType Host { get; } = new MigrateWorkloadType(HostValue); + /// ManagementServer - Migration Workload type. + public static MigrateWorkloadType ManagementServer { get; } = new MigrateWorkloadType(ManagementServerValue); + /// Determines if two values are the same. + public static bool operator ==(MigrateWorkloadType left, MigrateWorkloadType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MigrateWorkloadType left, MigrateWorkloadType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MigrateWorkloadType(string value) => new MigrateWorkloadType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MigrateWorkloadType other && Equals(other); + /// + public bool Equals(MigrateWorkloadType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrationDetails.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrationDetails.Serialization.cs new file mode 100644 index 000000000000..3833a2532a1b --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrationDetails.Serialization.cs @@ -0,0 +1,158 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class MigrationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MigrationDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsCollectionDefined(ReadinessSummary)) + { + writer.WritePropertyName("readinessSummary"u8); + writer.WriteStartArray(); + foreach (var item in ReadinessSummary) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(MigrationType)) + { + writer.WritePropertyName("migrationType"u8); + writer.WriteStringValue(MigrationType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MigrationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MigrationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMigrationDetails(document.RootElement, options); + } + + internal static MigrationDetails DeserializeMigrationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList readinessSummary = default; + MigrationType? migrationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("readinessSummary"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NameValuePairCloudSuitabilityCommon.DeserializeNameValuePairCloudSuitabilityCommon(item, options)); + } + readinessSummary = array; + continue; + } + if (property.NameEquals("migrationType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + migrationType = new MigrationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MigrationDetails(readinessSummary ?? new ChangeTrackingList(), migrationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MigrationDetails)} does not support writing '{options.Format}' format."); + } + } + + MigrationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMigrationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MigrationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrationDetails.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrationDetails.cs new file mode 100644 index 000000000000..e7d8527d8404 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrationDetails.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Migration details. + public partial class MigrationDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal MigrationDetails() + { + ReadinessSummary = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The readiness summary. + /// The migration type. + /// Keeps track of any properties unknown to the library. + internal MigrationDetails(IReadOnlyList readinessSummary, MigrationType? migrationType, IDictionary serializedAdditionalRawData) + { + ReadinessSummary = readinessSummary; + MigrationType = migrationType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The readiness summary. + public IReadOnlyList ReadinessSummary { get; } + /// The migration type. + public MigrationType? MigrationType { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrationPlatform.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrationPlatform.cs new file mode 100644 index 000000000000..23c1c59296d0 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrationPlatform.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Migration Platform. + public readonly partial struct MigrationPlatform : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MigrationPlatform(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string PaaSValue = "PaaS"; + private const string IaaSValue = "IaaS"; + private const string SaaSValue = "SaaS"; + + /// Unknown - Migration Platform. + public static MigrationPlatform Unknown { get; } = new MigrationPlatform(UnknownValue); + /// PaaS - Migration Platform. + public static MigrationPlatform PaaS { get; } = new MigrationPlatform(PaaSValue); + /// IaaS - Migration Platform. + public static MigrationPlatform IaaS { get; } = new MigrationPlatform(IaaSValue); + /// SaaS - Migration Platform. + public static MigrationPlatform SaaS { get; } = new MigrationPlatform(SaaSValue); + /// Determines if two values are the same. + public static bool operator ==(MigrationPlatform left, MigrationPlatform right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MigrationPlatform left, MigrationPlatform right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MigrationPlatform(string value) => new MigrationPlatform(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MigrationPlatform other && Equals(other); + /// + public bool Equals(MigrationPlatform other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrationType.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrationType.cs new file mode 100644 index 000000000000..29cc281ea563 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/MigrationType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Migration Type. + public readonly partial struct MigrationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MigrationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string ReplatformValue = "Replatform"; + private const string RehostValue = "Rehost"; + private const string RetainValue = "Retain"; + private const string RearchitectValue = "Rearchitect"; + + /// Unknown - Migration Type. + public static MigrationType Unknown { get; } = new MigrationType(UnknownValue); + /// Replatform - Migration Type. + public static MigrationType Replatform { get; } = new MigrationType(ReplatformValue); + /// Rehost - Migration Type. + public static MigrationType Rehost { get; } = new MigrationType(RehostValue); + /// Retain - Migration Type. + public static MigrationType Retain { get; } = new MigrationType(RetainValue); + /// Rearchitect - Migration Type. + public static MigrationType Rearchitect { get; } = new MigrationType(RearchitectValue); + /// Determines if two values are the same. + public static bool operator ==(MigrationType left, MigrationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MigrationType left, MigrationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MigrationType(string value) => new MigrationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MigrationType other && Equals(other); + /// + public bool Equals(MigrationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairCloudSuitabilityCommon.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairCloudSuitabilityCommon.Serialization.cs new file mode 100644 index 000000000000..be6ac047c213 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairCloudSuitabilityCommon.Serialization.cs @@ -0,0 +1,148 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class NameValuePairCloudSuitabilityCommon : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NameValuePairCloudSuitabilityCommon)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteNumberValue(Value.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NameValuePairCloudSuitabilityCommon IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NameValuePairCloudSuitabilityCommon)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNameValuePairCloudSuitabilityCommon(document.RootElement, options); + } + + internal static NameValuePairCloudSuitabilityCommon DeserializeNameValuePairCloudSuitabilityCommon(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CloudSuitabilityCommon? name = default; + int? value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new CloudSuitabilityCommon(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NameValuePairCloudSuitabilityCommon(name, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NameValuePairCloudSuitabilityCommon)} does not support writing '{options.Format}' format."); + } + } + + NameValuePairCloudSuitabilityCommon IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNameValuePairCloudSuitabilityCommon(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NameValuePairCloudSuitabilityCommon)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairCloudSuitabilityCommon.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairCloudSuitabilityCommon.cs new file mode 100644 index 000000000000..f784ba115d0c --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairCloudSuitabilityCommon.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// The generic name value pair. + public partial class NameValuePairCloudSuitabilityCommon + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NameValuePairCloudSuitabilityCommon() + { + } + + /// Initializes a new instance of . + /// The name. + /// The value. + /// Keeps track of any properties unknown to the library. + internal NameValuePairCloudSuitabilityCommon(CloudSuitabilityCommon? name, int? value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name. + public CloudSuitabilityCommon? Name { get; } + /// The value. + public int? Value { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairCostType.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairCostType.Serialization.cs new file mode 100644 index 000000000000..52cb3d12a2a4 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairCostType.Serialization.cs @@ -0,0 +1,148 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class NameValuePairCostType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NameValuePairCostType)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteNumberValue(Value.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NameValuePairCostType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NameValuePairCostType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNameValuePairCostType(document.RootElement, options); + } + + internal static NameValuePairCostType DeserializeNameValuePairCostType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CostType? name = default; + float? value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new CostType(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NameValuePairCostType(name, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NameValuePairCostType)} does not support writing '{options.Format}' format."); + } + } + + NameValuePairCostType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNameValuePairCostType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NameValuePairCostType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairCostType.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairCostType.cs new file mode 100644 index 000000000000..7bd605067c22 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairCostType.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// The generic name value pair. + public partial class NameValuePairCostType + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NameValuePairCostType() + { + } + + /// Initializes a new instance of . + /// The name. + /// The value. + /// Keeps track of any properties unknown to the library. + internal NameValuePairCostType(CostType? name, float? value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name. + public CostType? Name { get; } + /// The value. + public float? Value { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairSavingsType.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairSavingsType.Serialization.cs new file mode 100644 index 000000000000..bdc3cab36011 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairSavingsType.Serialization.cs @@ -0,0 +1,148 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class NameValuePairSavingsType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NameValuePairSavingsType)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteNumberValue(Value.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NameValuePairSavingsType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NameValuePairSavingsType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNameValuePairSavingsType(document.RootElement, options); + } + + internal static NameValuePairSavingsType DeserializeNameValuePairSavingsType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SavingsType? name = default; + float? value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new SavingsType(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NameValuePairSavingsType(name, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NameValuePairSavingsType)} does not support writing '{options.Format}' format."); + } + } + + NameValuePairSavingsType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNameValuePairSavingsType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NameValuePairSavingsType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairSavingsType.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairSavingsType.cs new file mode 100644 index 000000000000..44fc6408906f --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/NameValuePairSavingsType.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// The generic name value pair. + public partial class NameValuePairSavingsType + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NameValuePairSavingsType() + { + } + + /// Initializes a new instance of . + /// The name. + /// The value. + /// Keeps track of any properties unknown to the library. + internal NameValuePairSavingsType(SavingsType? name, float? value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name. + public SavingsType? Name { get; } + /// The value. + public float? Value { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/ProvisioningState.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..d0511295ed34 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/ProvisioningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// The status of the current operation. + public readonly partial struct ProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string ProvisioningValue = "Provisioning"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string AcceptedValue = "Accepted"; + + /// Resource provisioning Successful. + public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Resource provisioning Failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Resource provisioning Canceled. + public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); + /// Resource is being Provisioned. + public static ProvisioningState Provisioning { get; } = new ProvisioningState(ProvisioningValue); + /// Resource is being Updated. + public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); + /// Resource is being Deleted. + public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); + /// Resource is being Accepted. + public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); + /// Determines if two values are the same. + public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); + /// + public bool Equals(ProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SavingsDetailsCommon.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SavingsDetailsCommon.Serialization.cs new file mode 100644 index 000000000000..7e1f080240c7 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SavingsDetailsCommon.Serialization.cs @@ -0,0 +1,158 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class SavingsDetailsCommon : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SavingsDetailsCommon)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(SavingOptions)) + { + writer.WritePropertyName("savingOptions"u8); + writer.WriteStringValue(SavingOptions.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(SavingsDetail)) + { + writer.WritePropertyName("savingsDetail"u8); + writer.WriteStartArray(); + foreach (var item in SavingsDetail) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SavingsDetailsCommon IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SavingsDetailsCommon)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSavingsDetailsCommon(document.RootElement, options); + } + + internal static SavingsDetailsCommon DeserializeSavingsDetailsCommon(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SavingsOption? savingOptions = default; + IReadOnlyList savingsDetail = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("savingOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + savingOptions = new SavingsOption(property.Value.GetString()); + continue; + } + if (property.NameEquals("savingsDetail"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NameValuePairSavingsType.DeserializeNameValuePairSavingsType(item, options)); + } + savingsDetail = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SavingsDetailsCommon(savingOptions, savingsDetail ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SavingsDetailsCommon)} does not support writing '{options.Format}' format."); + } + } + + SavingsDetailsCommon IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSavingsDetailsCommon(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SavingsDetailsCommon)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SavingsDetailsCommon.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SavingsDetailsCommon.cs new file mode 100644 index 000000000000..ae06d672509a --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SavingsDetailsCommon.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// The savings details. + public partial class SavingsDetailsCommon + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SavingsDetailsCommon() + { + SavingsDetail = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The savings options. + /// The sku cost details per azure offer type. + /// Keeps track of any properties unknown to the library. + internal SavingsDetailsCommon(SavingsOption? savingOptions, IReadOnlyList savingsDetail, IDictionary serializedAdditionalRawData) + { + SavingOptions = savingOptions; + SavingsDetail = savingsDetail; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The savings options. + public SavingsOption? SavingOptions { get; } + /// The sku cost details per azure offer type. + public IReadOnlyList SavingsDetail { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SavingsOption.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SavingsOption.cs new file mode 100644 index 000000000000..1e590848ca6d --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SavingsOption.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// The savings options. + public readonly partial struct SavingsOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SavingsOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string RI1YearValue = "RI1Year"; + private const string RI3YearValue = "RI3Year"; + private const string SavingsPlan1YearValue = "SavingsPlan1Year"; + private const string SavingsPlan3YearValue = "SavingsPlan3Year"; + private const string CustomAzureOfferCodeValue = "CustomAzureOfferCode"; + + /// No savings options. + public static SavingsOption None { get; } = new SavingsOption(NoneValue); + /// Reserved Instance for 1 year. + public static SavingsOption RI1Year { get; } = new SavingsOption(RI1YearValue); + /// Reserved Instance for 3 years. + public static SavingsOption RI3Year { get; } = new SavingsOption(RI3YearValue); + /// The savings plan for 1 year. + public static SavingsOption SavingsPlan1Year { get; } = new SavingsOption(SavingsPlan1YearValue); + /// The savings plan for 3 years. + public static SavingsOption SavingsPlan3Year { get; } = new SavingsOption(SavingsPlan3YearValue); + /// Custom azure offer code. + public static SavingsOption CustomAzureOfferCode { get; } = new SavingsOption(CustomAzureOfferCodeValue); + /// Determines if two values are the same. + public static bool operator ==(SavingsOption left, SavingsOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SavingsOption left, SavingsOption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SavingsOption(string value) => new SavingsOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SavingsOption other && Equals(other); + /// + public bool Equals(SavingsOption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SavingsType.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SavingsType.cs new file mode 100644 index 000000000000..87aa1949e515 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SavingsType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Savings type. + public readonly partial struct SavingsType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SavingsType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MonthlyAzureHybridCostSavingsValue = "MonthlyAzureHybridCostSavings"; + private const string MonthlyLinuxAzureHybridCostSavingsValue = "MonthlyLinuxAzureHybridCostSavings"; + private const string MonthlyAhubSqlCostSavingsValue = "MonthlyAhubSqlCostSavings"; + private const string MonthlyVcfByolCostDifferenceValue = "MonthlyVcfByolCostDifference"; + + /// MonthlyAzureHybridCostSavings - Savings type. + public static SavingsType MonthlyAzureHybridCostSavings { get; } = new SavingsType(MonthlyAzureHybridCostSavingsValue); + /// MonthlyLinuxAzureHybridCostSavings - Savings type. + public static SavingsType MonthlyLinuxAzureHybridCostSavings { get; } = new SavingsType(MonthlyLinuxAzureHybridCostSavingsValue); + /// MonthlyAhubSqlCostSavings - Savings type. + public static SavingsType MonthlyAhubSqlCostSavings { get; } = new SavingsType(MonthlyAhubSqlCostSavingsValue); + /// MonthlyVcfByolCostDifference - Savings type. + public static SavingsType MonthlyVcfByolCostDifference { get; } = new SavingsType(MonthlyVcfByolCostDifferenceValue); + /// Determines if two values are the same. + public static bool operator ==(SavingsType left, SavingsType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SavingsType left, SavingsType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SavingsType(string value) => new SavingsType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SavingsType other && Equals(other); + /// + public bool Equals(SavingsType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SourceDetails.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SourceDetails.Serialization.cs new file mode 100644 index 000000000000..a7825e38c300 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SourceDetails.Serialization.cs @@ -0,0 +1,178 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class SourceDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SourceDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(SourceName)) + { + writer.WritePropertyName("sourceName"u8); + writer.WriteStringValue(SourceName.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(SourceType)) + { + writer.WritePropertyName("sourceType"u8); + writer.WriteStringValue(SourceType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Platform)) + { + writer.WritePropertyName("platform"u8); + writer.WriteStringValue(Platform.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SourceDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSourceDetails(document.RootElement, options); + } + + internal static SourceDetails DeserializeSourceDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AssessmentSource? sourceName = default; + MigrateWorkloadType? sourceType = default; + MigrationPlatform? platform = default; + int? count = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sourceName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceName = new AssessmentSource(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceType = new MigrateWorkloadType(property.Value.GetString()); + continue; + } + if (property.NameEquals("platform"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + platform = new MigrationPlatform(property.Value.GetString()); + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SourceDetails(sourceName, sourceType, platform, count, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SourceDetails)} does not support writing '{options.Format}' format."); + } + } + + SourceDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSourceDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SourceDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SourceDetails.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SourceDetails.cs new file mode 100644 index 000000000000..26f61c43f6e9 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SourceDetails.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Source details. + public partial class SourceDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SourceDetails() + { + } + + /// Initializes a new instance of . + /// The source name. + /// The source type. + /// The migration platform. + /// The count of a type of source. + /// Keeps track of any properties unknown to the library. + internal SourceDetails(AssessmentSource? sourceName, MigrateWorkloadType? sourceType, MigrationPlatform? platform, int? count, IDictionary serializedAdditionalRawData) + { + SourceName = sourceName; + SourceType = sourceType; + Platform = platform; + Count = count; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The source name. + public AssessmentSource? SourceName { get; } + /// The source type. + public MigrateWorkloadType? SourceType { get; } + /// The migration platform. + public MigrationPlatform? Platform { get; } + /// The count of a type of source. + public int? Count { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SummaryType.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SummaryType.cs new file mode 100644 index 000000000000..e166c682086e --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/SummaryType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Summary Type. + public readonly partial struct SummaryType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SummaryType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string StrategyValue = "Strategy"; + private const string TargetValue = "Target"; + + /// Unknown - Summary Type. + public static SummaryType Unknown { get; } = new SummaryType(UnknownValue); + /// Strategy - Summary Type. + public static SummaryType Strategy { get; } = new SummaryType(StrategyValue); + /// Target - Summary Type. + public static SummaryType Target { get; } = new SummaryType(TargetValue); + /// Determines if two values are the same. + public static bool operator ==(SummaryType left, SummaryType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SummaryType left, SummaryType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SummaryType(string value) => new SummaryType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SummaryType other && Equals(other); + /// + public bool Equals(SummaryType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetAssessmentArmIds.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetAssessmentArmIds.Serialization.cs new file mode 100644 index 000000000000..ccaf70ecacf9 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetAssessmentArmIds.Serialization.cs @@ -0,0 +1,151 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class TargetAssessmentArmIds : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetAssessmentArmIds)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Aks)) + { + writer.WritePropertyName("aks"u8); + writer.WriteStringValue(Aks); + } + if (Optional.IsDefined(AzureAppService)) + { + writer.WritePropertyName("azureAppService"u8); + writer.WriteStringValue(AzureAppService); + } + if (Optional.IsDefined(AzureAppServiceContainer)) + { + writer.WritePropertyName("azureAppServiceContainer"u8); + writer.WriteStringValue(AzureAppServiceContainer); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TargetAssessmentArmIds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetAssessmentArmIds)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTargetAssessmentArmIds(document.RootElement, options); + } + + internal static TargetAssessmentArmIds DeserializeTargetAssessmentArmIds(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string aks = default; + string azureAppService = default; + string azureAppServiceContainer = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("aks"u8)) + { + aks = property.Value.GetString(); + continue; + } + if (property.NameEquals("azureAppService"u8)) + { + azureAppService = property.Value.GetString(); + continue; + } + if (property.NameEquals("azureAppServiceContainer"u8)) + { + azureAppServiceContainer = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TargetAssessmentArmIds(aks, azureAppService, azureAppServiceContainer, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TargetAssessmentArmIds)} does not support writing '{options.Format}' format."); + } + } + + TargetAssessmentArmIds IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTargetAssessmentArmIds(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TargetAssessmentArmIds)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetAssessmentArmIds.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetAssessmentArmIds.cs new file mode 100644 index 000000000000..d9515c762f96 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetAssessmentArmIds.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// ARM IDs of the target assessments. + public partial class TargetAssessmentArmIds + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TargetAssessmentArmIds() + { + } + + /// Initializes a new instance of . + /// ARM ID for Azure Kubernetes Service assessment. + /// ARM ID for Azure App Service assessment. + /// ARM ID for Azure App Service Container assessment. + /// Keeps track of any properties unknown to the library. + internal TargetAssessmentArmIds(string aks, string azureAppService, string azureAppServiceContainer, IDictionary serializedAdditionalRawData) + { + Aks = aks; + AzureAppService = azureAppService; + AzureAppServiceContainer = azureAppServiceContainer; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// ARM ID for Azure Kubernetes Service assessment. + public string Aks { get; set; } + /// ARM ID for Azure App Service assessment. + public string AzureAppService { get; set; } + /// ARM ID for Azure App Service Container assessment. + public string AzureAppServiceContainer { get; set; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetDetails.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetDetails.Serialization.cs new file mode 100644 index 000000000000..3bf097404317 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetDetails.Serialization.cs @@ -0,0 +1,178 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class TargetDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(TargetName)) + { + writer.WritePropertyName("targetName"u8); + writer.WriteStringValue(TargetName.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(TargetType)) + { + writer.WritePropertyName("targetType"u8); + writer.WriteStringValue(TargetType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Platform)) + { + writer.WritePropertyName("platform"u8); + writer.WriteStringValue(Platform.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TargetDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTargetDetails(document.RootElement, options); + } + + internal static TargetDetails DeserializeTargetDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureTarget? targetName = default; + MigrateWorkloadType? targetType = default; + MigrationPlatform? platform = default; + int? count = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetName = new AzureTarget(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetType = new MigrateWorkloadType(property.Value.GetString()); + continue; + } + if (property.NameEquals("platform"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + platform = new MigrationPlatform(property.Value.GetString()); + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TargetDetails(targetName, targetType, platform, count, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TargetDetails)} does not support writing '{options.Format}' format."); + } + } + + TargetDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTargetDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TargetDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetDetails.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetDetails.cs new file mode 100644 index 000000000000..5d18623d77c5 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetDetails.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Target details. + public partial class TargetDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal TargetDetails() + { + } + + /// Initializes a new instance of . + /// The target name. + /// The target type. + /// The migration platform. + /// The count of a type of source. + /// Keeps track of any properties unknown to the library. + internal TargetDetails(AzureTarget? targetName, MigrateWorkloadType? targetType, MigrationPlatform? platform, int? count, IDictionary serializedAdditionalRawData) + { + TargetName = targetName; + TargetType = targetType; + Platform = platform; + Count = count; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The target name. + public AzureTarget? TargetName { get; } + /// The target type. + public MigrateWorkloadType? TargetType { get; } + /// The migration platform. + public MigrationPlatform? Platform { get; } + /// The count of a type of source. + public int? Count { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetSourcePair.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetSourcePair.Serialization.cs new file mode 100644 index 000000000000..a7ee215dc5cb --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetSourcePair.Serialization.cs @@ -0,0 +1,293 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class TargetSourcePair : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetSourcePair)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(SourceRef)) + { + writer.WritePropertyName("sourceRef"u8); + writer.WriteStringValue(SourceRef.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(TargetRef)) + { + writer.WritePropertyName("targetRef"u8); + writer.WriteStringValue(TargetRef.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(SourceCount)) + { + writer.WritePropertyName("sourceCount"u8); + writer.WriteNumberValue(SourceCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(TargetCount)) + { + writer.WritePropertyName("targetCount"u8); + writer.WriteNumberValue(TargetCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(MigrationDetails)) + { + writer.WritePropertyName("migrationDetails"u8); + writer.WriteObjectValue(MigrationDetails, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ManagementDetails)) + { + writer.WritePropertyName("managementDetails"u8); + writer.WriteStartArray(); + foreach (var item in ManagementDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(CostDetails)) + { + writer.WritePropertyName("costDetails"u8); + writer.WriteStartArray(); + foreach (var item in CostDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(SavingsDetails)) + { + writer.WritePropertyName("savingsDetails"u8); + writer.WriteStartArray(); + foreach (var item in SavingsDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ConfidenceScore)) + { + writer.WritePropertyName("confidenceScore"u8); + writer.WriteNumberValue(ConfidenceScore.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TargetSourcePair IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetSourcePair)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTargetSourcePair(document.RootElement, options); + } + + internal static TargetSourcePair DeserializeTargetSourcePair(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AssessmentSource? sourceRef = default; + AzureTarget? targetRef = default; + int? sourceCount = default; + int? targetCount = default; + MigrationDetails migrationDetails = default; + IReadOnlyList managementDetails = default; + IReadOnlyList costDetails = default; + IReadOnlyList savingsDetails = default; + double? confidenceScore = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sourceRef"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceRef = new AssessmentSource(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetRef"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetRef = new AzureTarget(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("targetCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("migrationDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + migrationDetails = MigrationDetails.DeserializeMigrationDetails(property.Value, options); + continue; + } + if (property.NameEquals("managementDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.ManagementDetails.DeserializeManagementDetails(item, options)); + } + managementDetails = array; + continue; + } + if (property.NameEquals("costDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CostDetailsCommon.DeserializeCostDetailsCommon(item, options)); + } + costDetails = array; + continue; + } + if (property.NameEquals("savingsDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SavingsDetailsCommon.DeserializeSavingsDetailsCommon(item, options)); + } + savingsDetails = array; + continue; + } + if (property.NameEquals("confidenceScore"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + confidenceScore = property.Value.GetDouble(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TargetSourcePair( + sourceRef, + targetRef, + sourceCount, + targetCount, + migrationDetails, + managementDetails ?? new ChangeTrackingList(), + costDetails ?? new ChangeTrackingList(), + savingsDetails ?? new ChangeTrackingList(), + confidenceScore, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TargetSourcePair)} does not support writing '{options.Format}' format."); + } + } + + TargetSourcePair IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTargetSourcePair(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TargetSourcePair)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetSourcePair.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetSourcePair.cs new file mode 100644 index 000000000000..55fd8e305a01 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/TargetSourcePair.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Target source pair. + public partial class TargetSourcePair + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal TargetSourcePair() + { + ManagementDetails = new ChangeTrackingList(); + CostDetails = new ChangeTrackingList(); + SavingsDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The source name. + /// The target name. + /// The count of a type of source. + /// The count of a type of target. + /// The migration details. + /// The management details. + /// The cost details. + /// The savings details. + /// The confidence score. + /// Keeps track of any properties unknown to the library. + internal TargetSourcePair(AssessmentSource? sourceRef, AzureTarget? targetRef, int? sourceCount, int? targetCount, MigrationDetails migrationDetails, IReadOnlyList managementDetails, IReadOnlyList costDetails, IReadOnlyList savingsDetails, double? confidenceScore, IDictionary serializedAdditionalRawData) + { + SourceRef = sourceRef; + TargetRef = targetRef; + SourceCount = sourceCount; + TargetCount = targetCount; + MigrationDetails = migrationDetails; + ManagementDetails = managementDetails; + CostDetails = costDetails; + SavingsDetails = savingsDetails; + ConfidenceScore = confidenceScore; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The source name. + public AssessmentSource? SourceRef { get; } + /// The target name. + public AzureTarget? TargetRef { get; } + /// The count of a type of source. + public int? SourceCount { get; } + /// The count of a type of target. + public int? TargetCount { get; } + /// The migration details. + public MigrationDetails MigrationDetails { get; } + /// The management details. + public IReadOnlyList ManagementDetails { get; } + /// The cost details. + public IReadOnlyList CostDetails { get; } + /// The savings details. + public IReadOnlyList SavingsDetails { get; } + /// The confidence score. + public double? ConfidenceScore { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppCompoundAssessmentSummaryListResult.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppCompoundAssessmentSummaryListResult.Serialization.cs new file mode 100644 index 000000000000..941591926a91 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppCompoundAssessmentSummaryListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + internal partial class WebAppCompoundAssessmentSummaryListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppCompoundAssessmentSummaryListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WebAppCompoundAssessmentSummaryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppCompoundAssessmentSummaryListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppCompoundAssessmentSummaryListResult(document.RootElement, options); + } + + internal static WebAppCompoundAssessmentSummaryListResult DeserializeWebAppCompoundAssessmentSummaryListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WebAppCompoundAssessmentSummaryData.DeserializeWebAppCompoundAssessmentSummaryData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppCompoundAssessmentSummaryListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WebAppCompoundAssessmentSummaryListResult)} does not support writing '{options.Format}' format."); + } + } + + WebAppCompoundAssessmentSummaryListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWebAppCompoundAssessmentSummaryListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppCompoundAssessmentSummaryListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppCompoundAssessmentSummaryListResult.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppCompoundAssessmentSummaryListResult.cs new file mode 100644 index 000000000000..b4fc81d66b0c --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppCompoundAssessmentSummaryListResult.cs @@ -0,0 +1,80 @@ +// 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.Migrate.Models +{ + /// The response of a WebAppCompoundAssessmentSummary list operation. + internal partial class WebAppCompoundAssessmentSummaryListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The WebAppCompoundAssessmentSummary items on this page. + /// is null. + internal WebAppCompoundAssessmentSummaryListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The WebAppCompoundAssessmentSummary items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal WebAppCompoundAssessmentSummaryListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WebAppCompoundAssessmentSummaryListResult() + { + } + + /// The WebAppCompoundAssessmentSummary items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppCompoundAssessmentSummaryProperties.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppCompoundAssessmentSummaryProperties.Serialization.cs new file mode 100644 index 000000000000..bfa67fd587f0 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppCompoundAssessmentSummaryProperties.Serialization.cs @@ -0,0 +1,305 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class WebAppCompoundAssessmentSummaryProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppCompoundAssessmentSummaryProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(SummaryType)) + { + writer.WritePropertyName("summaryType"u8); + writer.WriteStringValue(SummaryType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(SummaryName)) + { + writer.WritePropertyName("summaryName"u8); + writer.WriteStringValue(SummaryName); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Sources)) + { + writer.WritePropertyName("sources"u8); + writer.WriteStartArray(); + foreach (var item in Sources) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Targets)) + { + writer.WritePropertyName("targets"u8); + writer.WriteStartArray(); + foreach (var item in Targets) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(TargetSourceMapping)) + { + writer.WritePropertyName("targetSourceMapping"u8); + writer.WriteStartArray(); + foreach (var item in TargetSourceMapping) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(CostComponents)) + { + writer.WritePropertyName("costComponents"u8); + writer.WriteStartArray(); + foreach (var item in CostComponents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(SavingsComponents)) + { + writer.WritePropertyName("savingsComponents"u8); + writer.WriteStartArray(); + foreach (var item in SavingsComponents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AssessmentName)) + { + writer.WritePropertyName("assessmentName"u8); + writer.WriteStringValue(AssessmentName); + } + if (Optional.IsDefined(DiscoveredLightSummary)) + { + writer.WritePropertyName("discoveredLightSummary"u8); + writer.WriteObjectValue(DiscoveredLightSummary, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WebAppCompoundAssessmentSummaryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppCompoundAssessmentSummaryProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppCompoundAssessmentSummaryProperties(document.RootElement, options); + } + + internal static WebAppCompoundAssessmentSummaryProperties DeserializeWebAppCompoundAssessmentSummaryProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SummaryType? summaryType = default; + string summaryName = default; + IReadOnlyList sources = default; + IReadOnlyList targets = default; + IReadOnlyList targetSourceMapping = default; + IReadOnlyList costComponents = default; + IReadOnlyList savingsComponents = default; + string assessmentName = default; + DiscoveredLightSummary discoveredLightSummary = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("summaryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + summaryType = new SummaryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("summaryName"u8)) + { + summaryName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SourceDetails.DeserializeSourceDetails(item, options)); + } + sources = array; + continue; + } + if (property.NameEquals("targets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TargetDetails.DeserializeTargetDetails(item, options)); + } + targets = array; + continue; + } + if (property.NameEquals("targetSourceMapping"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TargetSourcePair.DeserializeTargetSourcePair(item, options)); + } + targetSourceMapping = array; + continue; + } + if (property.NameEquals("costComponents"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CostDetailsCommon.DeserializeCostDetailsCommon(item, options)); + } + costComponents = array; + continue; + } + if (property.NameEquals("savingsComponents"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SavingsDetailsCommon.DeserializeSavingsDetailsCommon(item, options)); + } + savingsComponents = array; + continue; + } + if (property.NameEquals("assessmentName"u8)) + { + assessmentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("discoveredLightSummary"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + discoveredLightSummary = DiscoveredLightSummary.DeserializeDiscoveredLightSummary(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppCompoundAssessmentSummaryProperties( + summaryType, + summaryName, + sources ?? new ChangeTrackingList(), + targets ?? new ChangeTrackingList(), + targetSourceMapping ?? new ChangeTrackingList(), + costComponents ?? new ChangeTrackingList(), + savingsComponents ?? new ChangeTrackingList(), + assessmentName, + discoveredLightSummary, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WebAppCompoundAssessmentSummaryProperties)} does not support writing '{options.Format}' format."); + } + } + + WebAppCompoundAssessmentSummaryProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWebAppCompoundAssessmentSummaryProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppCompoundAssessmentSummaryProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppCompoundAssessmentSummaryProperties.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppCompoundAssessmentSummaryProperties.cs new file mode 100644 index 000000000000..cc46cc30d005 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppCompoundAssessmentSummaryProperties.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// WebApp compound assessment summary properties class. + public partial class WebAppCompoundAssessmentSummaryProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WebAppCompoundAssessmentSummaryProperties() + { + Sources = new ChangeTrackingList(); + Targets = new ChangeTrackingList(); + TargetSourceMapping = new ChangeTrackingList(); + CostComponents = new ChangeTrackingList(); + SavingsComponents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The summary type. + /// The summary name. + /// The source details list. + /// The target details list. + /// The target source mapping. + /// The cost components. + /// The cost components. + /// Name of the assessment. + /// Light summary of the compound assessment. + /// Keeps track of any properties unknown to the library. + internal WebAppCompoundAssessmentSummaryProperties(SummaryType? summaryType, string summaryName, IReadOnlyList sources, IReadOnlyList targets, IReadOnlyList targetSourceMapping, IReadOnlyList costComponents, IReadOnlyList savingsComponents, string assessmentName, DiscoveredLightSummary discoveredLightSummary, IDictionary serializedAdditionalRawData) + { + SummaryType = summaryType; + SummaryName = summaryName; + Sources = sources; + Targets = targets; + TargetSourceMapping = targetSourceMapping; + CostComponents = costComponents; + SavingsComponents = savingsComponents; + AssessmentName = assessmentName; + DiscoveredLightSummary = discoveredLightSummary; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The summary type. + public SummaryType? SummaryType { get; } + /// The summary name. + public string SummaryName { get; } + /// The source details list. + public IReadOnlyList Sources { get; } + /// The target details list. + public IReadOnlyList Targets { get; } + /// The target source mapping. + public IReadOnlyList TargetSourceMapping { get; } + /// The cost components. + public IReadOnlyList CostComponents { get; } + /// The cost components. + public IReadOnlyList SavingsComponents { get; } + /// Name of the assessment. + public string AssessmentName { get; } + /// Light summary of the compound assessment. + public DiscoveredLightSummary DiscoveredLightSummary { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppType.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppType.cs new file mode 100644 index 000000000000..7f1943c00e03 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Web App Type. + public readonly partial struct WebAppType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WebAppType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string ASPNETValue = "ASP.Net"; + private const string JavaValue = "Java"; + + /// Unknown. Indicates Missing Data. + public static WebAppType Unknown { get; } = new WebAppType(UnknownValue); + /// ASP.NET Web App. + public static WebAppType ASPNET { get; } = new WebAppType(ASPNETValue); + /// Java Web App. + public static WebAppType Java { get; } = new WebAppType(JavaValue); + /// Determines if two values are the same. + public static bool operator ==(WebAppType left, WebAppType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WebAppType left, WebAppType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WebAppType(string value) => new WebAppType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WebAppType other && Equals(other); + /// + public bool Equals(WebAppType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppsPerType.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppsPerType.Serialization.cs new file mode 100644 index 000000000000..94cd6a2b2892 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppsPerType.Serialization.cs @@ -0,0 +1,134 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class WebAppsPerType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppsPerType)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("webAppType"u8); + writer.WriteStringValue(WebAppType.ToString()); + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WebAppsPerType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppsPerType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppsPerType(document.RootElement, options); + } + + internal static WebAppsPerType DeserializeWebAppsPerType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WebAppType webAppType = default; + int count = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("webAppType"u8)) + { + webAppType = new WebAppType(property.Value.GetString()); + continue; + } + if (property.NameEquals("count"u8)) + { + count = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppsPerType(webAppType, count, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WebAppsPerType)} does not support writing '{options.Format}' format."); + } + } + + WebAppsPerType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWebAppsPerType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppsPerType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppsPerType.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppsPerType.cs new file mode 100644 index 000000000000..034c06a195de --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebAppsPerType.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Number of web apps per type. + public partial class WebAppsPerType + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the web app type. + /// Count of the web app type. + internal WebAppsPerType(WebAppType webAppType, int count) + { + WebAppType = webAppType; + Count = count; + } + + /// Initializes a new instance of . + /// Name of the web app type. + /// Count of the web app type. + /// Keeps track of any properties unknown to the library. + internal WebAppsPerType(WebAppType webAppType, int count, IDictionary serializedAdditionalRawData) + { + WebAppType = webAppType; + Count = count; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WebAppsPerType() + { + } + + /// Name of the web app type. + public WebAppType WebAppType { get; } + /// Count of the web app type. + public int Count { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebServerType.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebServerType.cs new file mode 100644 index 000000000000..97e2a3c39605 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebServerType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Web Server Type. + public readonly partial struct WebServerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WebServerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string IISValue = "IIS"; + private const string TomcatValue = "Tomcat"; + + /// Unknown. Indicates Missing Data. + public static WebServerType Unknown { get; } = new WebServerType(UnknownValue); + /// ASP.NET Web App. + public static WebServerType IIS { get; } = new WebServerType(IISValue); + /// Java Web App. + public static WebServerType Tomcat { get; } = new WebServerType(TomcatValue); + /// Determines if two values are the same. + public static bool operator ==(WebServerType left, WebServerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WebServerType left, WebServerType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WebServerType(string value) => new WebServerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WebServerType other && Equals(other); + /// + public bool Equals(WebServerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebServersPerType.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebServersPerType.Serialization.cs new file mode 100644 index 000000000000..c0c98541af66 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebServersPerType.Serialization.cs @@ -0,0 +1,134 @@ +// 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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Migrate.Models +{ + public partial class WebServersPerType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebServersPerType)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("webServerType"u8); + writer.WriteStringValue(WebServerType.ToString()); + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WebServersPerType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebServersPerType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebServersPerType(document.RootElement, options); + } + + internal static WebServersPerType DeserializeWebServersPerType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WebServerType webServerType = default; + int count = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("webServerType"u8)) + { + webServerType = new WebServerType(property.Value.GetString()); + continue; + } + if (property.NameEquals("count"u8)) + { + count = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebServersPerType(webServerType, count, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WebServersPerType)} does not support writing '{options.Format}' format."); + } + } + + WebServersPerType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWebServersPerType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebServersPerType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebServersPerType.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebServersPerType.cs new file mode 100644 index 000000000000..b087cd20b119 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/Models/WebServersPerType.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Migrate.Models +{ + /// Number of web servers per type. + public partial class WebServersPerType + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the web app type. + /// Count of the web app type. + internal WebServersPerType(WebServerType webServerType, int count) + { + WebServerType = webServerType; + Count = count; + } + + /// Initializes a new instance of . + /// Name of the web app type. + /// Count of the web app type. + /// Keeps track of any properties unknown to the library. + internal WebServersPerType(WebServerType webServerType, int count, IDictionary serializedAdditionalRawData) + { + WebServerType = webServerType; + Count = count; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WebServersPerType() + { + } + + /// Name of the web app type. + public WebServerType WebServerType { get; } + /// Count of the web app type. + public int Count { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/ProviderConstants.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..276ea5df2712 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/ProviderConstants.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Migrate +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/RestOperations/CompoundAssessmentRestOperations.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/RestOperations/CompoundAssessmentRestOperations.cs new file mode 100644 index 000000000000..336ba5bf1b03 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/RestOperations/CompoundAssessmentRestOperations.cs @@ -0,0 +1,615 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Migrate.Models; + +namespace Azure.ResourceManager.Migrate +{ + internal partial class CompoundAssessmentRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of CompoundAssessmentRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public CompoundAssessmentRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-03-03-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName) + { + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments/", false); + uri.AppendPath(compoundAssessmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName) + { + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments/", false); + uri.AppendPath(compoundAssessmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a CompoundAssessment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CompoundAssessmentData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CompoundAssessmentData.DeserializeCompoundAssessmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CompoundAssessmentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a CompoundAssessment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CompoundAssessmentData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CompoundAssessmentData.DeserializeCompoundAssessmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CompoundAssessmentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string projectName) + { + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string projectName) + { + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List CompoundAssessment resources by AssessmentProject. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CompoundAssessmentListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CompoundAssessmentListResult.DeserializeCompoundAssessmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List CompoundAssessment resources by AssessmentProject. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CompoundAssessmentListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CompoundAssessmentListResult.DeserializeCompoundAssessmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, CompoundAssessmentData data) + { + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments/", false); + uri.AppendPath(compoundAssessmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, CompoundAssessmentData data) + { + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments/", false); + uri.AppendPath(compoundAssessmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a CompoundAssessment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, CompoundAssessmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, projectName, compoundAssessmentName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a CompoundAssessment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, CompoundAssessmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, projectName, compoundAssessmentName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName) + { + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments/", false); + uri.AppendPath(compoundAssessmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName) + { + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments/", false); + uri.AppendPath(compoundAssessmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a CompoundAssessment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a CompoundAssessment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDownloadUrlRequestUri(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, DownloadUrlContent content) + { + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments/", false); + uri.AppendPath(compoundAssessmentName, true); + uri.AppendPath("/downloadUrl", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDownloadUrlRequest(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, DownloadUrlContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments/", false); + uri.AppendPath(compoundAssessmentName, true); + uri.AppendPath("/downloadUrl", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// A long-running resource action. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The content of the action request. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DownloadUrlAsync(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, DownloadUrlContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDownloadUrlRequest(subscriptionId, resourceGroupName, projectName, compoundAssessmentName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// A long-running resource action. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The content of the action request. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DownloadUrl(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, DownloadUrlContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDownloadUrlRequest(subscriptionId, resourceGroupName, projectName, compoundAssessmentName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string projectName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string projectName) + { + 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; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List CompoundAssessment resources by AssessmentProject. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CompoundAssessmentListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CompoundAssessmentListResult.DeserializeCompoundAssessmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List CompoundAssessment resources by AssessmentProject. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CompoundAssessmentListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CompoundAssessmentListResult.DeserializeCompoundAssessmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/RestOperations/CompoundAssessmentSummaryRestOperations.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/RestOperations/CompoundAssessmentSummaryRestOperations.cs new file mode 100644 index 000000000000..7b5fb8ad9f92 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/RestOperations/CompoundAssessmentSummaryRestOperations.cs @@ -0,0 +1,341 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Migrate.Models; + +namespace Azure.ResourceManager.Migrate +{ + internal partial class CompoundAssessmentSummaryRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of CompoundAssessmentSummaryRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public CompoundAssessmentSummaryRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-03-03-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, string summaryName) + { + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments/", false); + uri.AppendPath(compoundAssessmentName, true); + uri.AppendPath("/summaries/", false); + uri.AppendPath(summaryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, string summaryName) + { + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments/", false); + uri.AppendPath(compoundAssessmentName, true); + uri.AppendPath("/summaries/", false); + uri.AppendPath(summaryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a WebAppCompoundAssessmentSummary. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// Gets the Name of the WebApp compound assessment summary. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, string summaryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + Argument.AssertNotNullOrEmpty(summaryName, nameof(summaryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, projectName, compoundAssessmentName, summaryName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WebAppCompoundAssessmentSummaryData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WebAppCompoundAssessmentSummaryData.DeserializeWebAppCompoundAssessmentSummaryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WebAppCompoundAssessmentSummaryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a WebAppCompoundAssessmentSummary. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// Gets the Name of the WebApp compound assessment summary. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, string summaryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + Argument.AssertNotNullOrEmpty(summaryName, nameof(summaryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, projectName, compoundAssessmentName, summaryName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WebAppCompoundAssessmentSummaryData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WebAppCompoundAssessmentSummaryData.DeserializeWebAppCompoundAssessmentSummaryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WebAppCompoundAssessmentSummaryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName) + { + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments/", false); + uri.AppendPath(compoundAssessmentName, true); + uri.AppendPath("/summaries", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName) + { + 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.Migrate/assessmentProjects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/webAppCompoundAssessments/", false); + uri.AppendPath(compoundAssessmentName, true); + uri.AppendPath("/summaries", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List WebAppCompoundAssessmentSummary resources by CompoundAssessment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WebAppCompoundAssessmentSummaryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WebAppCompoundAssessmentSummaryListResult.DeserializeWebAppCompoundAssessmentSummaryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List WebAppCompoundAssessmentSummary resources by CompoundAssessment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WebAppCompoundAssessmentSummaryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WebAppCompoundAssessmentSummaryListResult.DeserializeWebAppCompoundAssessmentSummaryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName) + { + 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; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List WebAppCompoundAssessmentSummary resources by CompoundAssessment. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WebAppCompoundAssessmentSummaryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WebAppCompoundAssessmentSummaryListResult.DeserializeWebAppCompoundAssessmentSummaryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List WebAppCompoundAssessmentSummary resources by CompoundAssessment. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Assessment Project Name. + /// Compound Assessment ARM name. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(compoundAssessmentName, nameof(compoundAssessmentName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, compoundAssessmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WebAppCompoundAssessmentSummaryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WebAppCompoundAssessmentSummaryListResult.DeserializeWebAppCompoundAssessmentSummaryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryCollection.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryCollection.cs new file mode 100644 index 000000000000..133051600d11 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryCollection.cs @@ -0,0 +1,395 @@ +// 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.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Migrate +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWebAppCompoundAssessmentSummaries method from an instance of . + /// + public partial class WebAppCompoundAssessmentSummaryCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics; + private readonly CompoundAssessmentSummaryRestOperations _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient; + + /// Initializes a new instance of the class for mocking. + protected WebAppCompoundAssessmentSummaryCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal WebAppCompoundAssessmentSummaryCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Migrate", WebAppCompoundAssessmentSummaryResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WebAppCompoundAssessmentSummaryResource.ResourceType, out string webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsApiVersion); + _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient = new CompoundAssessmentSummaryRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != CompoundAssessmentResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, CompoundAssessmentResource.ResourceType), nameof(id)); + } + + /// + /// Get a WebAppCompoundAssessmentSummary + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/summaries/{summaryName} + /// + /// + /// Operation Id + /// WebAppCompoundAssessmentSummary_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Gets the Name of the WebApp compound assessment summary. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string summaryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(summaryName, nameof(summaryName)); + + using var scope = _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics.CreateScope("WebAppCompoundAssessmentSummaryCollection.Get"); + scope.Start(); + try + { + var response = await _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, summaryName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WebAppCompoundAssessmentSummaryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a WebAppCompoundAssessmentSummary + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/summaries/{summaryName} + /// + /// + /// Operation Id + /// WebAppCompoundAssessmentSummary_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Gets the Name of the WebApp compound assessment summary. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string summaryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(summaryName, nameof(summaryName)); + + using var scope = _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics.CreateScope("WebAppCompoundAssessmentSummaryCollection.Get"); + scope.Start(); + try + { + var response = _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, summaryName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WebAppCompoundAssessmentSummaryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List WebAppCompoundAssessmentSummary resources by CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/summaries + /// + /// + /// Operation Id + /// WebAppCompoundAssessmentSummary_ListByParent + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WebAppCompoundAssessmentSummaryResource(Client, WebAppCompoundAssessmentSummaryData.DeserializeWebAppCompoundAssessmentSummaryData(e)), _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics, Pipeline, "WebAppCompoundAssessmentSummaryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List WebAppCompoundAssessmentSummary resources by CompoundAssessment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/summaries + /// + /// + /// Operation Id + /// WebAppCompoundAssessmentSummary_ListByParent + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WebAppCompoundAssessmentSummaryResource(Client, WebAppCompoundAssessmentSummaryData.DeserializeWebAppCompoundAssessmentSummaryData(e)), _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics, Pipeline, "WebAppCompoundAssessmentSummaryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/summaries/{summaryName} + /// + /// + /// Operation Id + /// WebAppCompoundAssessmentSummary_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Gets the Name of the WebApp compound assessment summary. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string summaryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(summaryName, nameof(summaryName)); + + using var scope = _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics.CreateScope("WebAppCompoundAssessmentSummaryCollection.Exists"); + scope.Start(); + try + { + var response = await _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, summaryName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/summaries/{summaryName} + /// + /// + /// Operation Id + /// WebAppCompoundAssessmentSummary_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Gets the Name of the WebApp compound assessment summary. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string summaryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(summaryName, nameof(summaryName)); + + using var scope = _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics.CreateScope("WebAppCompoundAssessmentSummaryCollection.Exists"); + scope.Start(); + try + { + var response = _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, summaryName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/summaries/{summaryName} + /// + /// + /// Operation Id + /// WebAppCompoundAssessmentSummary_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Gets the Name of the WebApp compound assessment summary. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string summaryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(summaryName, nameof(summaryName)); + + using var scope = _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics.CreateScope("WebAppCompoundAssessmentSummaryCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, summaryName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WebAppCompoundAssessmentSummaryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/summaries/{summaryName} + /// + /// + /// Operation Id + /// WebAppCompoundAssessmentSummary_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Gets the Name of the WebApp compound assessment summary. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string summaryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(summaryName, nameof(summaryName)); + + using var scope = _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics.CreateScope("WebAppCompoundAssessmentSummaryCollection.GetIfExists"); + scope.Start(); + try + { + var response = _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, summaryName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WebAppCompoundAssessmentSummaryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryData.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryData.Serialization.cs new file mode 100644 index 000000000000..d83cfe5c4031 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Migrate.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Migrate +{ + public partial class WebAppCompoundAssessmentSummaryData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppCompoundAssessmentSummaryData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + WebAppCompoundAssessmentSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppCompoundAssessmentSummaryData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppCompoundAssessmentSummaryData(document.RootElement, options); + } + + internal static WebAppCompoundAssessmentSummaryData DeserializeWebAppCompoundAssessmentSummaryData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WebAppCompoundAssessmentSummaryProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = WebAppCompoundAssessmentSummaryProperties.DeserializeWebAppCompoundAssessmentSummaryProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppCompoundAssessmentSummaryData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WebAppCompoundAssessmentSummaryData)} does not support writing '{options.Format}' format."); + } + } + + WebAppCompoundAssessmentSummaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWebAppCompoundAssessmentSummaryData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppCompoundAssessmentSummaryData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryData.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryData.cs new file mode 100644 index 000000000000..c1b9d84f7d5c --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Migrate.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Migrate +{ + /// + /// A class representing the WebAppCompoundAssessmentSummary data model. + /// WebApp compound assessment summary resource. + /// + public partial class WebAppCompoundAssessmentSummaryData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WebAppCompoundAssessmentSummaryData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal WebAppCompoundAssessmentSummaryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WebAppCompoundAssessmentSummaryProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public WebAppCompoundAssessmentSummaryProperties Properties { get; } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryResource.Serialization.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryResource.Serialization.cs new file mode 100644 index 000000000000..36b704e7606f --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.Migrate +{ + public partial class WebAppCompoundAssessmentSummaryResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WebAppCompoundAssessmentSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WebAppCompoundAssessmentSummaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryResource.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryResource.cs new file mode 100644 index 000000000000..207f351c180d --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Generated/WebAppCompoundAssessmentSummaryResource.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Migrate +{ + /// + /// A Class representing a WebAppCompoundAssessmentSummary along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWebAppCompoundAssessmentSummaryResource method. + /// Otherwise you can get one from its parent resource using the GetWebAppCompoundAssessmentSummary method. + /// + public partial class WebAppCompoundAssessmentSummaryResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The projectName. + /// The compoundAssessmentName. + /// The summaryName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string compoundAssessmentName, string summaryName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/summaries/{summaryName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics; + private readonly CompoundAssessmentSummaryRestOperations _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient; + private readonly WebAppCompoundAssessmentSummaryData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Migrate/assessmentProjects/webAppCompoundAssessments/summaries"; + + /// Initializes a new instance of the class for mocking. + protected WebAppCompoundAssessmentSummaryResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WebAppCompoundAssessmentSummaryResource(ArmClient client, WebAppCompoundAssessmentSummaryData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// 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 WebAppCompoundAssessmentSummaryResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Migrate", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsApiVersion); + _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient = new CompoundAssessmentSummaryRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WebAppCompoundAssessmentSummaryData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a WebAppCompoundAssessmentSummary + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/summaries/{summaryName} + /// + /// + /// Operation Id + /// WebAppCompoundAssessmentSummary_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics.CreateScope("WebAppCompoundAssessmentSummaryResource.Get"); + scope.Start(); + try + { + var response = await _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WebAppCompoundAssessmentSummaryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a WebAppCompoundAssessmentSummary + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/webAppCompoundAssessments/{compoundAssessmentName}/summaries/{summaryName} + /// + /// + /// Operation Id + /// WebAppCompoundAssessmentSummary_Get + /// + /// + /// Default Api Version + /// 2024-03-03-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsClientDiagnostics.CreateScope("WebAppCompoundAssessmentSummaryResource.Get"); + scope.Start(); + try + { + var response = _webAppCompoundAssessmentSummaryCompoundAssessmentSummaryOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WebAppCompoundAssessmentSummaryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Properties/AssemblyInfo.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..8c9a14318269 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.Migrate.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("Migrate")] diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/tests/Azure.ResourceManager.Migrate.Tests.csproj b/sdk/migrate/Azure.ResourceManager.Migrate/tests/Azure.ResourceManager.Migrate.Tests.csproj new file mode 100644 index 000000000000..21d451125a20 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/tests/Azure.ResourceManager.Migrate.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/tests/MigrateManagementTestBase.cs b/sdk/migrate/Azure.ResourceManager.Migrate/tests/MigrateManagementTestBase.cs new file mode 100644 index 000000000000..e3e8cef00b7d --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/tests/MigrateManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.Migrate.Tests +{ + public class MigrateManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected MigrateManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected MigrateManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/tests/MigrateManagementTestEnvironment.cs b/sdk/migrate/Azure.ResourceManager.Migrate/tests/MigrateManagementTestEnvironment.cs new file mode 100644 index 000000000000..251feeecd081 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/tests/MigrateManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.Migrate.Tests +{ + public class MigrateManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/tsp-location.yaml b/sdk/migrate/Azure.ResourceManager.Migrate/tsp-location.yaml new file mode 100644 index 000000000000..553b4cbab8f0 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/tsp-location.yaml @@ -0,0 +1,5 @@ +directory: specification/migrate/AssessmentProjects.Management/WebAppCompoundAssessments.Management +commit: 7a71098ded360a72a7ddd2c76acab9b00b499b68 +repo: Azure/azure-rest-api-specs +additionalDirectories: +- specification/migrate/AssessmentProjects.Management/Common diff --git a/sdk/migrate/ci.mgmt.yml b/sdk/migrate/ci.mgmt.yml new file mode 100644 index 000000000000..2984f984e1ac --- /dev/null +++ b/sdk/migrate/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/migrate /ci.mgmt.yml + - sdk/migrate /Azure.ResourceManager.Migrate / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: migrate + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.Migrate + safeName: AzureResourceManagerMigrate diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 4e3c032f60a4..7743b3ead244 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -68,6 +68,7 @@ trigger: - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup - sdk/datashare/Azure.ResourceManager.DataShare - sdk/defendereasm/Azure.ResourceManager.DefenderEasm + - sdk/dependencymap/Azure.ResourceManager.DependencyMap - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization - sdk/devcenter/Azure.ResourceManager.DevCenter - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices @@ -128,6 +129,7 @@ trigger: - sdk/marketplace/Azure.ResourceManager.Marketplace - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering - sdk/mediaservices/Azure.ResourceManager.Media + - sdk/migrate/Azure.ResourceManager.Migrate - sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment - sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap - sdk/mixedreality/Azure.ResourceManager.MixedReality @@ -277,6 +279,7 @@ pr: - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup - sdk/datashare/Azure.ResourceManager.DataShare - sdk/defendereasm/Azure.ResourceManager.DefenderEasm + - sdk/dependencymap/Azure.ResourceManager.DependencyMap - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization - sdk/devcenter/Azure.ResourceManager.DevCenter - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices @@ -337,6 +340,7 @@ pr: - sdk/marketplace/Azure.ResourceManager.Marketplace - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering - sdk/mediaservices/Azure.ResourceManager.Media + - sdk/migrate/Azure.ResourceManager.Migrate - sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment - sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap - sdk/mixedreality/Azure.ResourceManager.MixedReality diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/Configuration.json b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/Configuration.json new file mode 100644 index 000000000000..a3ae3280efb2 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/Configuration.json @@ -0,0 +1,13 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "library-name": "Azure.ResourceManager.ServiceFabricManagedClusters", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "model-namespace": false, + "azure-arm": true +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md deleted file mode 100644 index 4daae1dff57b..000000000000 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md +++ /dev/null @@ -1,232 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml - -azure-arm: true -csharp: true -library-name: ServiceFabricManagedClusters -namespace: Azure.ResourceManager.ServiceFabricManagedClusters -require: https://github.com/Azure/azure-rest-api-specs/blob/f17b769690a46d858134ee68ef0d89635083b560/specification/servicefabricmanagedclusters/resource-manager/readme.md -#tag: package-2024-09-preview -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../samples/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true - -#mgmt-debug: -# show-serialized-names: true - -request-path-is-non-resource: -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion} -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - -models-to-treat-empty-string-as-null: - - ManagedClusterSubnet - - NodeTypeFrontendConfiguration - - ServiceFabricManagedClusterData - - ServiceFabricManagedClusterVersion - - ServiceFabricManagedNodeTypeData - - VmManagedIdentity - -acronym-mapping: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - Vmos: VmOS - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - Etag: ETag|etag - LRS: Lrs - SSD: Ssd - -override-operation-name: - managedAzResiliencyStatus_get: GetManagedAzResiliencyStatus - NodeTypeSkus_List: GetAvailableSkus - managedUnsupportedVMSizes_Get: GetManagedUnsupportedVmSize - managedUnsupportedVMSizes_List: GetManagedUnsupportedVmSizes - ManagedClusterVersion_GetByEnvironment: GetManagedClusterVersionByEnvironment - managedAzResiliencyStatus_Get: GetManagedAzResiliencyStatus - -rename-mapping: - ApplicationResource: ServiceFabricManagedApplication - ApplicationTypeResource: ServiceFabricManagedApplicationType - ApplicationTypeVersionResource: ServiceFabricManagedApplicationTypeVersion - ApplicationUserAssignedIdentity: ApplicationUserAssignedIdentityInfo - ManagedClusterCodeVersionResult: ServiceFabricManagedClusterVersion - ManagedClusterCodeVersionResult.properties.supportExpiryUtc: VersionSupportExpireOn - OsType: ServiceFabricManagedClusterOSType - ManagedCluster: ServiceFabricManagedCluster - ManagedCluster.properties.addonFeatures: AddOnFeatures - ManagedCluster.properties.allowRdpAccess: IsRdpAccessAllowed - ManagedCluster.properties.clusterCertificateThumbprints: -|any - ManagedCluster.properties.clusterId: -|uuid - ManagedCluster.properties.enableAutoOSUpgrade: IsAutoOSUpgradeEnabled - ManagedCluster.properties.enableIpv6: IsIPv6Enabled - ManagedCluster.properties.enableServicePublicIP: IsServicePublicIPEnabled - ManagedCluster.properties.ipv4Address: -|ip-address - ManagedCluster.properties.ipv6Address: -|ip-address - ManagedCluster.properties.zonalResiliency: HasZoneResiliency - ManagedCluster.properties.enableHttpGatewayExclusiveAuthMode: IsHttpGatewayExclusiveAuthModeEnabled - - Subnet: ManagedClusterSubnet - Subnet.enableIpv6: IsIPv6Enabled - Subnet.networkSecurityGroupId: -|arm-id - AzureActiveDirectory: ManagedClusterAzureActiveDirectory - ClientCertificate: ManagedClusterClientCertificate - ClientCertificate.thumbprint: -|any - ClientCertificate.issuerThumbprint: -|any - ClusterState: ServiceFabricManagedClusterState - ClusterUpgradeCadence: ManagedClusterUpgradeCadence - ClusterUpgradeMode: ManagedClusterUpgradeMode - SettingsSectionDescription: ClusterFabricSettingsSection - SettingsParameterDescription: ClusterFabricSettingsParameterDescription - IpTag: ManagedClusterIPTag - LoadBalancingRule: ManagedClusterLoadBalancingRule - NetworkSecurityRule: ServiceFabricManagedNetworkSecurityRule - Direction: ServiceFabricManagedNetworkSecurityRuleDirection - Access: ServiceFabricManagedNetworkTrafficAccess - ManagedResourceProvisioningState: ServiceFabricManagedResourceProvisioningState - ServiceEndpoint: ManagedClusterServiceEndpoint - ServiceEndpoint.locations: -|azure-location - NodeType: ServiceFabricManagedNodeType - NodeType.properties.dataDiskSizeGB: DataDiskSizeInGB - NodeType.properties.enableAcceleratedNetworking: IsAcceleratedNetworkingEnabled - NodeType.properties.enableEncryptionAtHost: IsEncryptionAtHostEnabled - NodeType.properties.enableOverProvisioning: IsOverProvisioningEnabled - NodeType.properties.multiplePlacementGroups: HasMultiplePlacementGroups - NodeType.properties.enableNodePublicIPv6: IsNodePublicIPv6Enabled - VmApplication : ServiceFabricManagedVmApplication - VmssDataDisk: NodeTypeVmssDataDisk - VmssDataDisk.diskSizeGB: DiskSizeInGB - VmssExtension: NodeTypeVmssExtension - VmssExtension.properties.enableAutomaticUpgrade: IsAutomaticUpgradeEnabled - VaultSecretGroup: NodeTypeVaultSecretGroup - VaultCertificate: NodeTypeVaultCertificate - DiskType: ServiceFabricManagedDataDiskType - FrontendConfiguration: NodeTypeFrontendConfiguration - FrontendConfiguration.loadBalancerBackendAddressPoolId: -|arm-id - FrontendConfiguration.loadBalancerInboundNatPoolId: -|arm-id - VmManagedIdentity.userAssignedIdentities: -|arm-id - NodeTypeActionParameters: NodeTypeActionContent - NodeTypeActionParameters.force: IsForced - ServiceResource: ServiceFabricManagedService - ServiceResourceProperties: ManagedServiceProperties - ServiceResourcePropertiesBase: ManagedServiceBaseProperties - ServiceCorrelation: ManagedServiceCorrelation - ServiceCorrelationScheme: ManagedServiceCorrelationScheme - ScalingPolicy: ManagedServiceScalingPolicy - ScalingMechanism: ManagedServiceScalingMechanism - ScalingTrigger: ManagedServiceScalingTrigger - MoveCost: ServiceFabricManagedServiceMoveCost - ApplicationUpgradePolicy.instanceCloseDelayDuration: InstanceCloseDelayDurationInSeconds - FailureAction: PolicyViolationCompensationAction - IPAddressType: NodeTypeFrontendConfigurationIPAddressType - ProbeProtocol: ManagedClusterLoadBalanceProbeProtocol - Protocol: ManagedClusterLoadBalancingRuleTransportProtocol - Partition: ManagedServicePartitionScheme - NsgProtocol: ServiceFabricManagedNsgProtocol - NsgProtocol.ah: AH - NodeTypeAvailableSku.resourceType: -|resource-type - PartitionInstanceCountScaleMechanism: PartitionInstanceCountScalingMechanism - PrivateEndpointNetworkPolicies: ManagedClusterSubnetPrivateEndpointNetworkPoliciesState - PrivateLinkServiceNetworkPolicies: ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState - ServiceLoadMetric: ManagedServiceLoadMetric - ServiceLoadMetricWeight: ManagedServiceLoadMetricWeight - ServicePackageActivationMode: ManagedServicePackageActivationMode - ServicePlacementPolicy: ManagedServicePlacementPolicy - ManagedVMSize: ServiceFabricManagedUnsupportedVmSize - AddRemoveIncrementalNamedPartitionScalingMechanism: NamedPartitionAddOrRemoveScalingMechanism - NodeType.properties.enableNodePublicIP: IsNodePublicIPEnabled - NodeType.properties.secureBootEnabled: IsSecureBootEnabled - EvictionPolicyType: SpotNodeVmEvictionPolicyType - ResourceAzStatus.resourceType: -|resource-type - SecurityType: ServiceFabricManagedClusterSecurityType - UpdateType: ServiceFabricManagedClusterUpdateType - ClusterHealthPolicy: ManagedClusterHealthPolicy - ClusterUpgradePolicy: ManagedClusterUpgradePolicy - ClusterUpgradeDeltaHealthPolicy: ManagedClusterUpgradeDeltaHealthPolicy - ClusterMonitoringPolicy: ManagedClusterMonitoringPolicy - PrivateIPAddressVersion: ServiceFabricManagedClusterPrivateIPAddressVersion - PublicIPAddressVersion: ServiceFabricManagedClusterPublicIPAddressVersion - IpConfiguration: ServiceFabricManagedClusterIPConfiguration - IpConfigurationPublicIPAddressConfiguration: ServiceFabricManagedClusterPublicIPAddressConfiguration - ManagedMaintenanceWindowStatus.lastWindowStatusUpdateAtUTC: LastWindowStatusUpdatedOn - ManagedMaintenanceWindowStatus.lastWindowStartTimeUTC: LastWindowStartOn - ManagedMaintenanceWindowStatus.lastWindowEndTimeUTC: LastWindowEndOn - -suppress-abstract-base-class: -- ManagedServiceProperties - -directive: - - remove-operation: OperationStatus_Get - - remove-operation: OperationResults_Get - - from: managedapplication.json - where: $.definitions - transform: > - $.HealthCheckWaitDuration['x-ms-format'] = 'duration-constant'; - $.HealthCheckStableDuration['x-ms-format'] = 'duration-constant'; - $.HealthCheckRetryTimeout['x-ms-format'] = 'duration-constant'; - $.UpgradeDomainTimeout['x-ms-format'] = 'duration-constant'; - $.UpgradeTimeout['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.replicaRestartWaitDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.quorumLossWaitDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.standByReplicaKeepDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.servicePlacementTimeLimit['x-ms-format'] = 'duration-constant'; - - from: managedcluster.json - where: $.definitions - transform: > - $.ManagedClusterVersionDetails.properties.supportExpiryUtc['format'] = 'date-time'; - - from: nodetype.json - where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}'].patch - transform: > - $['responses'] = { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/NodeType" - } - }, - "202": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/NodeType" - } - }, - "default": { - "description": "The detailed error response.", - "schema": { - "$ref": "#/definitions/ErrorModel" - } - } - } - reason: response status 202 missing -``` diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml new file mode 100644 index 000000000000..752cc16a37ca --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/servicefabricmanagedclusters/ServiceFabricManagedClusters.Management +commit: 7a71098ded360a72a7ddd2c76acab9b00b499b68 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tspCodeModel.json b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tspCodeModel.json new file mode 100644 index 000000000000..15eaf0d77cda --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tspCodeModel.json @@ -0,0 +1,55955 @@ +{ + "$id": "1", + "name": "Microsoft.ServiceFabric", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "enums": [ + { + "$id": "2", + "kind": "enum", + "name": "PolicyViolationCompensationAction", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FailureAction", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "Rollback", + "value": "Rollback", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service Fabric will not proceed to the next upgrade domain automatically.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "8", + "kind": "enum", + "name": "RollingUpgradeMode", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMode", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "10", + "kind": "enumvalue", + "name": "Monitored", + "value": "Monitored", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "8" + }, + "doc": "The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 0.", + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "UnmonitoredAuto", + "value": "UnmonitoredAuto", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "8" + }, + "doc": "The upgrade will proceed automatically without performing any health monitoring. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "14", + "kind": "enum", + "name": "ManagedIdentityType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentityType", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Indicates that no identity is associated with the resource.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Indicates that system assigned identity is associated with the resource.", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Indicates that user assigned identity is associated with the resource.", + "decorators": [] + }, + { + "$id": "22", + "kind": "enumvalue", + "name": "SystemAssigned, UserAssigned", + "value": "SystemAssigned, UserAssigned", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Indicates that both system assigned and user assigned identity are associated with the resource.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The type of managed identity for the resource.", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "24", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "26", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "32", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "34", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "36", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "42", + "kind": "enum", + "name": "ServiceKind", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceKind", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "44", + "kind": "enumvalue", + "name": "Stateless", + "value": "Stateless", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "Does not use Service Fabric to make its state highly available or reliable. The value is 0.", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "Stateful", + "value": "Stateful", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The kind of service (Stateless or Stateful).", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "48", + "kind": "enum", + "name": "PartitionScheme", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionScheme", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "50", + "kind": "enumvalue", + "name": "Singleton", + "value": "Singleton", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "Indicates that the partition is based on string names, and is a SingletonPartitionScheme object, The value is 0.", + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "UniformInt64Range", + "value": "UniformInt64Range", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "Indicates that the partition is based on Int64 key ranges, and is a UniformInt64RangePartitionScheme object. The value is 1.", + "decorators": [] + }, + { + "$id": "54", + "kind": "enumvalue", + "name": "Named", + "value": "Named", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "Indicates that the partition is based on string names, and is a NamedPartitionScheme object. The value is 2.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enumerates the ways that a service can be partitioned.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "56", + "kind": "enum", + "name": "ManagedServicePackageActivationMode", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePackageActivationMode", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "58", + "kind": "enumvalue", + "name": "SharedProcess", + "value": "SharedProcess", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "56" + }, + "doc": "Indicates the application package activation mode will use shared process.", + "decorators": [] + }, + { + "$id": "60", + "kind": "enumvalue", + "name": "ExclusiveProcess", + "value": "ExclusiveProcess", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "56" + }, + "doc": "Indicates the application package activation mode will use exclusive process.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The activation Mode of the service package", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "62", + "kind": "enum", + "name": "ManagedServiceCorrelationScheme", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceCorrelationScheme", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "64", + "kind": "enumvalue", + "name": "AlignedAffinity", + "value": "AlignedAffinity", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "62" + }, + "doc": "Aligned affinity ensures that the primaries of the partitions of the affinitized services are collocated on the same nodes. This is the default and is the same as selecting the Affinity scheme. The value is 0.", + "decorators": [] + }, + { + "$id": "66", + "kind": "enumvalue", + "name": "NonAlignedAffinity", + "value": "NonAlignedAffinity", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "62" + }, + "doc": "Non-Aligned affinity guarantees that all replicas of each service will be placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will be collocated. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The service correlation scheme.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "68", + "kind": "enum", + "name": "ManagedServiceLoadMetricWeight", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetricWeight", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "70", + "kind": "enumvalue", + "name": "Zero", + "value": "Zero", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Disables resource balancing for this metric. This value is zero.", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "Low", + "value": "Low", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Specifies the metric weight of the service load as Low. The value is 1.", + "decorators": [] + }, + { + "$id": "74", + "kind": "enumvalue", + "name": "Medium", + "value": "Medium", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Specifies the metric weight of the service load as Medium. The value is 2.", + "decorators": [] + }, + { + "$id": "76", + "kind": "enumvalue", + "name": "High", + "value": "High", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Specifies the metric weight of the service load as High. The value is 3.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Determines the metric weight relative to the other metrics that are configured for this service. During runtime, if two metrics end up in conflict, the Cluster Resource Manager prefers the metric with the higher weight.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "78", + "kind": "enum", + "name": "ServicePlacementPolicyType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPolicyType", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "80", + "kind": "enumvalue", + "name": "InvalidDomain", + "value": "InvalidDomain", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or upgrade domain cannot be used for placement of this service. The value is 0.", + "decorators": [] + }, + { + "$id": "82", + "kind": "enumvalue", + "name": "RequiredDomain", + "value": "RequiredDomain", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service must be placed in a specific domain. The value is 1.", + "decorators": [] + }, + { + "$id": "84", + "kind": "enumvalue", + "name": "PreferredPrimaryDomain", + "value": "PreferredPrimaryDomain", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the Primary replica for the partitions of the service should be located in a particular domain as an optimization. The value is 2.", + "decorators": [] + }, + { + "$id": "86", + "kind": "enumvalue", + "name": "RequiredDomainDistribution", + "value": "RequiredDomainDistribution", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will disallow placement of any two replicas from the same partition in the same domain at any time. The value is 3.", + "decorators": [] + }, + { + "$id": "88", + "kind": "enumvalue", + "name": "NonPartiallyPlaceService", + "value": "NonPartiallyPlaceService", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all replicas of a particular partition of the service should be placed atomically. The value is 4.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "90", + "kind": "enum", + "name": "ServiceFabricManagedServiceMoveCost", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.MoveCost", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "92", + "kind": "enumvalue", + "name": "Zero", + "value": "Zero", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "90" + }, + "doc": "Zero move cost. This value is zero.", + "decorators": [] + }, + { + "$id": "94", + "kind": "enumvalue", + "name": "Low", + "value": "Low", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "90" + }, + "doc": "Specifies the move cost of the service as Low. The value is 1.", + "decorators": [] + }, + { + "$id": "96", + "kind": "enumvalue", + "name": "Medium", + "value": "Medium", + "valueType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "90" + }, + "doc": "Specifies the move cost of the service as Medium. The value is 2.", + "decorators": [] + }, + { + "$id": "98", + "kind": "enumvalue", + "name": "High", + "value": "High", + "valueType": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "90" + }, + "doc": "Specifies the move cost of the service as High. The value is 3.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies the move cost for the service.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "100", + "kind": "enum", + "name": "ServiceScalingMechanismKind", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceScalingMechanismKind", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "102", + "kind": "enumvalue", + "name": "ScalePartitionInstanceCount", + "value": "ScalePartitionInstanceCount", + "valueType": { + "$id": "103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "100" + }, + "doc": "Represents a scaling mechanism for adding or removing instances of stateless service partition. The value is 0.", + "decorators": [] + }, + { + "$id": "104", + "kind": "enumvalue", + "name": "AddRemoveIncrementalNamedPartition", + "value": "AddRemoveIncrementalNamedPartition", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "100" + }, + "doc": "Represents a scaling mechanism for adding or removing named partitions of a stateless service. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enumerates the ways that a service can be partitioned.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "106", + "kind": "enum", + "name": "ServiceScalingTriggerKind", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceScalingTriggerKind", + "valueType": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "108", + "kind": "enumvalue", + "name": "AveragePartitionLoadTrigger", + "value": "AveragePartitionLoadTrigger", + "valueType": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "106" + }, + "doc": "Represents a scaling trigger related to an average load of a metric/resource of a partition. The value is 0.", + "decorators": [] + }, + { + "$id": "110", + "kind": "enumvalue", + "name": "AverageServiceLoadTrigger", + "value": "AverageServiceLoadTrigger", + "valueType": { + "$id": "111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "106" + }, + "doc": "Represents a scaling policy related to an average load of a metric/resource of a service. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enumerates the ways that a service can be partitioned.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "112", + "kind": "enum", + "name": "ServiceFabricManagedClusterOSType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OsType", + "valueType": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "114", + "kind": "enumvalue", + "name": "Windows", + "value": "Windows", + "valueType": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "112" + }, + "doc": "Indicates os is Windows.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Cluster operating system, the default will be Windows", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "116", + "kind": "enum", + "name": "ManagedClusterVersionEnvironment", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionEnvironment", + "valueType": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "118", + "kind": "enumvalue", + "name": "Windows", + "value": "Windows", + "valueType": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "116" + }, + "doc": "Indicates os is Windows.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The operating system of the cluster. The default means all.", + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "120", + "kind": "enum", + "name": "ServiceFabricManagedClusterState", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterState", + "valueType": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "122", + "kind": "enumvalue", + "name": "WaitingForNodes", + "value": "WaitingForNodes", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the cluster resource is created and the resource provider is waiting for Service Fabric VM extension to boot up and report to it.", + "decorators": [] + }, + { + "$id": "124", + "kind": "enumvalue", + "name": "Deploying", + "value": "Deploying", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the Service Fabric runtime is being installed on the VMs. Cluster resource will be in this state until the cluster boots up and system services are up.", + "decorators": [] + }, + { + "$id": "126", + "kind": "enumvalue", + "name": "BaselineUpgrade", + "value": "BaselineUpgrade", + "valueType": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is automatically initiated when the cluster boots up for the first time.", + "decorators": [] + }, + { + "$id": "128", + "kind": "enumvalue", + "name": "Upgrading", + "value": "Upgrading", + "valueType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the cluster is being upgraded with the user provided configuration.", + "decorators": [] + }, + { + "$id": "130", + "kind": "enumvalue", + "name": "UpgradeFailed", + "value": "UpgradeFailed", + "valueType": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the last upgrade for the cluster has failed.", + "decorators": [] + }, + { + "$id": "132", + "kind": "enumvalue", + "name": "Ready", + "value": "Ready", + "valueType": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the cluster is in a stable state.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The current state of the cluster.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "134", + "kind": "enum", + "name": "ManagedClusterLoadBalancingRuleTransportProtocol", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Protocol", + "valueType": { + "$id": "135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "136", + "kind": "enumvalue", + "name": "tcp", + "value": "tcp", + "valueType": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "134" + }, + "doc": "Transport protocol is TCP.", + "decorators": [] + }, + { + "$id": "138", + "kind": "enumvalue", + "name": "udp", + "value": "udp", + "valueType": { + "$id": "139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "134" + }, + "doc": "Transport protocol is UDP.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The reference to the transport protocol used by the load balancing rule.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "140", + "kind": "enum", + "name": "ManagedClusterLoadBalanceProbeProtocol", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ProbeProtocol", + "valueType": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "142", + "kind": "enumvalue", + "name": "tcp", + "value": "tcp", + "valueType": { + "$id": "143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "140" + }, + "doc": "Probe protocol is TCP.", + "decorators": [] + }, + { + "$id": "144", + "kind": "enumvalue", + "name": "http", + "value": "http", + "valueType": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "140" + }, + "doc": "Probe protocol is HTTP.", + "decorators": [] + }, + { + "$id": "146", + "kind": "enumvalue", + "name": "https", + "value": "https", + "valueType": { + "$id": "147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "140" + }, + "doc": "Probe protocol is HTTPS.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The reference to the load balancer probe used by the load balancing rule.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "148", + "kind": "enum", + "name": "ServiceFabricManagedNsgProtocol", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NsgProtocol", + "valueType": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "150", + "kind": "enumvalue", + "name": "http", + "value": "http", + "valueType": { + "$id": "151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to HTTP.", + "decorators": [] + }, + { + "$id": "152", + "kind": "enumvalue", + "name": "https", + "value": "https", + "valueType": { + "$id": "153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to HTTPS.", + "decorators": [] + }, + { + "$id": "154", + "kind": "enumvalue", + "name": "tcp", + "value": "tcp", + "valueType": { + "$id": "155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to TCP.", + "decorators": [] + }, + { + "$id": "156", + "kind": "enumvalue", + "name": "udp", + "value": "udp", + "valueType": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to UDP.", + "decorators": [] + }, + { + "$id": "158", + "kind": "enumvalue", + "name": "icmp", + "value": "icmp", + "valueType": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to ICMP.", + "decorators": [] + }, + { + "$id": "160", + "kind": "enumvalue", + "name": "AH", + "value": "ah", + "valueType": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to AH.", + "decorators": [] + }, + { + "$id": "162", + "kind": "enumvalue", + "name": "esp", + "value": "esp", + "valueType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to ESP.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Network protocol this rule applies to.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "164", + "kind": "enum", + "name": "ServiceFabricManagedNetworkTrafficAccess", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Access", + "valueType": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "166", + "kind": "enumvalue", + "name": "allow", + "value": "allow", + "valueType": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "164" + }, + "doc": "The network traffic is allowed.", + "decorators": [] + }, + { + "$id": "168", + "kind": "enumvalue", + "name": "deny", + "value": "deny", + "valueType": { + "$id": "169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "164" + }, + "doc": "The network traffic is denied.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The network traffic is allowed or denied.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "170", + "kind": "enum", + "name": "ServiceFabricManagedNetworkSecurityRuleDirection", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Direction", + "valueType": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "172", + "kind": "enumvalue", + "name": "inbound", + "value": "inbound", + "valueType": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "doc": "Inbound direction.", + "decorators": [] + }, + { + "$id": "174", + "kind": "enumvalue", + "name": "outbound", + "value": "outbound", + "valueType": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "doc": "Outbound direction.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Network security rule direction.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "176", + "kind": "enum", + "name": "ServiceFabricManagedResourceProvisioningState", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedResourceProvisioningState", + "valueType": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "178", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource does not have a provisioning state.", + "decorators": [] + }, + { + "$id": "180", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource is being created.", + "decorators": [] + }, + { + "$id": "182", + "kind": "enumvalue", + "name": "Created", + "value": "Created", + "valueType": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource is created.", + "decorators": [] + }, + { + "$id": "184", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource is being updated.", + "decorators": [] + }, + { + "$id": "186", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource provisioning has succeeded.", + "decorators": [] + }, + { + "$id": "188", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource provisioning has failed.", + "decorators": [] + }, + { + "$id": "190", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource provisioning has been canceled.", + "decorators": [] + }, + { + "$id": "192", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource is being deleted.", + "decorators": [] + }, + { + "$id": "194", + "kind": "enumvalue", + "name": "Deleted", + "value": "Deleted", + "valueType": { + "$id": "195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource has been deleted.", + "decorators": [] + }, + { + "$id": "196", + "kind": "enumvalue", + "name": "Other", + "value": "Other", + "valueType": { + "$id": "197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource provisioning state is a state other than the previously specified states.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The provisioning state of the managed resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "198", + "kind": "enum", + "name": "ManagedClusterUpgradeMode", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeMode", + "valueType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "200", + "kind": "enumvalue", + "name": "Automatic", + "value": "Automatic", + "valueType": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "198" + }, + "doc": "The cluster will be automatically upgraded to the latest Service Fabric runtime version, **clusterUpgradeCadence** will determine when the upgrade starts after the new version becomes available.", + "decorators": [] + }, + { + "$id": "202", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "198" + }, + "doc": "The cluster will not be automatically upgraded to the latest Service Fabric runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The upgrade mode of the cluster when new Service Fabric runtime version is available.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "204", + "kind": "enum", + "name": "ManagedClusterUpgradeCadence", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeCadence", + "valueType": { + "$id": "205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "206", + "kind": "enumvalue", + "name": "Wave0", + "value": "Wave0", + "valueType": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "204" + }, + "doc": "Cluster upgrade starts immediately after a new version is rolled out. Recommended for Test/Dev clusters.", + "decorators": [] + }, + { + "$id": "208", + "kind": "enumvalue", + "name": "Wave1", + "value": "Wave1", + "valueType": { + "$id": "209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "204" + }, + "doc": "Cluster upgrade starts 7 days after a new version is rolled out. Recommended for Pre-prod clusters.", + "decorators": [] + }, + { + "$id": "210", + "kind": "enumvalue", + "name": "Wave2", + "value": "Wave2", + "valueType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "204" + }, + "doc": "Cluster upgrade starts 14 days after a new version is rolled out. Recommended for Production clusters.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "212", + "kind": "enum", + "name": "ManagedClusterAddOnFeature", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterAddOnFeature", + "valueType": { + "$id": "213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "214", + "kind": "enumvalue", + "name": "DnsService", + "value": "DnsService", + "valueType": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "Dns service", + "decorators": [] + }, + { + "$id": "216", + "kind": "enumvalue", + "name": "BackupRestoreService", + "value": "BackupRestoreService", + "valueType": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "Backup and restore service", + "decorators": [] + }, + { + "$id": "218", + "kind": "enumvalue", + "name": "ResourceMonitorService", + "value": "ResourceMonitorService", + "valueType": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "Resource monitor service", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Available cluster add-on features", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "220", + "kind": "enum", + "name": "ManagedClusterSubnetPrivateEndpointNetworkPoliciesState", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PrivateEndpointNetworkPolicies", + "valueType": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "222", + "kind": "enumvalue", + "name": "enabled", + "value": "enabled", + "valueType": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "doc": "Enable apply network policies on private end point in the subnet.", + "decorators": [] + }, + { + "$id": "224", + "kind": "enumvalue", + "name": "disabled", + "value": "disabled", + "valueType": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "doc": "Disable apply network policies on private end point in the subnet.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enable or Disable apply network policies on private end point in the subnet.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "226", + "kind": "enum", + "name": "ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PrivateLinkServiceNetworkPolicies", + "valueType": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "228", + "kind": "enumvalue", + "name": "enabled", + "value": "enabled", + "valueType": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "226" + }, + "doc": "Enable apply network policies on private link service in the subnet.", + "decorators": [] + }, + { + "$id": "230", + "kind": "enumvalue", + "name": "disabled", + "value": "disabled", + "valueType": { + "$id": "231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "226" + }, + "doc": "Disable apply network policies on private link service in the subnet.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enable or Disable apply network policies on private link service in the subnet.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "232", + "kind": "enum", + "name": "ZonalUpdateMode", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ZonalUpdateMode", + "valueType": { + "$id": "233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "234", + "kind": "enumvalue", + "name": "Standard", + "value": "Standard", + "valueType": { + "$id": "235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "232" + }, + "doc": "The cluster will use 5 upgrade domains for Cross Az Node types.", + "decorators": [] + }, + { + "$id": "236", + "kind": "enumvalue", + "name": "Fast", + "value": "Fast", + "valueType": { + "$id": "237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "232" + }, + "doc": "The cluster will use a maximum of 3 upgrade domains per zone instead of 5 for Cross Az Node types for faster deployments.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Indicates the update mode for Cross Az clusters.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "238", + "kind": "enum", + "name": "AutoGeneratedDomainNameLabelScope", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AutoGeneratedDomainNameLabelScope", + "valueType": { + "$id": "239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "240", + "kind": "enumvalue", + "name": "TenantReuse", + "value": "TenantReuse", + "valueType": { + "$id": "241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "TenantReuse allows for the same hash to be created if the resource is created in the same Tenant with the same resource name.", + "decorators": [] + }, + { + "$id": "242", + "kind": "enumvalue", + "name": "SubscriptionReuse", + "value": "SubscriptionReuse", + "valueType": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "SubscriptionReuse allows for the same hash to be created if the resource is created in the same Subscription with the same resource name.", + "decorators": [] + }, + { + "$id": "244", + "kind": "enumvalue", + "name": "ResourceGroupReuse", + "value": "ResourceGroupReuse", + "valueType": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "ResourceGroupReuse allows for the same hash to be created if the resource is created in the same Resource Group with the same resource name.", + "decorators": [] + }, + { + "$id": "246", + "kind": "enumvalue", + "name": "NoReuse", + "value": "NoReuse", + "valueType": { + "$id": "247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "NoReuse will create a new hash regardless of the Subscription, Resource Group, Tenant and Resource name.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "This enum is the entrypoint to using a certificate from a public CA for your cluster. This property was introduced to solve the\ndomain squatting problem with new domains. A domain name will be generated in the following format: {clustername}.{hash}.{regionname}.sfmcdomain.\nThe hash portion comes from Azure DNS' Deterministic Name Library. The library creates a hash using the cluster's Tenant, Subscription, Resource Group\nand Resource Name using the AutoGeneratedDomainNameLabelScope/reuse policy chosen.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "248", + "kind": "enum", + "name": "SkuName", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SkuName", + "valueType": { + "$id": "249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "250", + "kind": "enumvalue", + "name": "Basic", + "value": "Basic", + "valueType": { + "$id": "251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "248" + }, + "doc": "Basic requires a minimum of 3 nodes and allows only 1 node type.", + "decorators": [] + }, + { + "$id": "252", + "kind": "enumvalue", + "name": "Standard", + "value": "Standard", + "valueType": { + "$id": "253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "248" + }, + "doc": "Requires a minimum of 5 nodes and allows 1 or more node type.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Sku Name.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "254", + "kind": "enum", + "name": "FaultSimulationStatus", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationStatus", + "valueType": { + "$id": "255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "256", + "kind": "enumvalue", + "name": "Starting", + "value": "Starting", + "valueType": { + "$id": "257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation is starting. The simulation will have this status while the start operation is in progress.", + "decorators": [] + }, + { + "$id": "258", + "kind": "enumvalue", + "name": "Active", + "value": "Active", + "valueType": { + "$id": "259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation is active. The simulation will have this status after the start operation has completed successfully.", + "decorators": [] + }, + { + "$id": "260", + "kind": "enumvalue", + "name": "Stopping", + "value": "Stopping", + "valueType": { + "$id": "261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation is stopping. The simulation will have this status while the stop operation is in progress.", + "decorators": [] + }, + { + "$id": "262", + "kind": "enumvalue", + "name": "Done", + "value": "Done", + "valueType": { + "$id": "263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation is done. The simulation will have this status after the stop operation has completed successfully.", + "decorators": [] + }, + { + "$id": "264", + "kind": "enumvalue", + "name": "StartFailed", + "value": "StartFailed", + "valueType": { + "$id": "265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation has failed on start. The simulation will have this status after the start operation fails.", + "decorators": [] + }, + { + "$id": "266", + "kind": "enumvalue", + "name": "StopFailed", + "value": "StopFailed", + "valueType": { + "$id": "267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation has failed on stop. The simulation will have this status after the stop operation fails.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Fault simulation status.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "268", + "kind": "enum", + "name": "SfmcOperationStatus", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SfmcOperationStatus", + "valueType": { + "$id": "269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "270", + "kind": "enumvalue", + "name": "Created", + "value": "Created", + "valueType": { + "$id": "271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation created.", + "decorators": [] + }, + { + "$id": "272", + "kind": "enumvalue", + "name": "Started", + "value": "Started", + "valueType": { + "$id": "273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation started.", + "decorators": [] + }, + { + "$id": "274", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation succeeded.", + "decorators": [] + }, + { + "$id": "276", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation failed.", + "decorators": [] + }, + { + "$id": "278", + "kind": "enumvalue", + "name": "Aborted", + "value": "Aborted", + "valueType": { + "$id": "279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation aborted.", + "decorators": [] + }, + { + "$id": "280", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Sfmc operation status.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "282", + "kind": "enum", + "name": "FaultKind", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultKind", + "valueType": { + "$id": "283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "284", + "kind": "enumvalue", + "name": "Zone", + "value": "Zone", + "valueType": { + "$id": "285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "282" + }, + "doc": "Simulates an availability zone down.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The kind of fault simulation.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "286", + "kind": "enum", + "name": "ServiceFabricManagedDataDiskType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.DiskType", + "valueType": { + "$id": "287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "288", + "kind": "enumvalue", + "name": "Standard_LRS", + "value": "Standard_LRS", + "valueType": { + "$id": "289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access.", + "decorators": [] + }, + { + "$id": "290", + "kind": "enumvalue", + "name": "StandardSSD_LRS", + "value": "StandardSSD_LRS", + "valueType": { + "$id": "291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev/test.", + "decorators": [] + }, + { + "$id": "292", + "kind": "enumvalue", + "name": "Premium_LRS", + "value": "Premium_LRS", + "valueType": { + "$id": "293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Premium SSD locally redundant storage. Best for production and performance sensitive workloads.", + "decorators": [] + }, + { + "$id": "294", + "kind": "enumvalue", + "name": "PremiumV2_LRS", + "value": "PremiumV2_LRS", + "valueType": { + "$id": "295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Premium SSD V2 locally redundant storage. Best for production and performance sensitive workloads that consistently require low latency and high IOPS and throughput.", + "decorators": [] + }, + { + "$id": "296", + "kind": "enumvalue", + "name": "StandardSSD_ZRS", + "value": "StandardSSD_ZRS", + "valueType": { + "$id": "297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev/test that need storage resiliency against zone failures.", + "decorators": [] + }, + { + "$id": "298", + "kind": "enumvalue", + "name": "Premium_ZRS", + "value": "Premium_ZRS", + "valueType": { + "$id": "299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Premium SSD zone redundant storage. Best for production workloads that need storage resiliency against zone failures.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "300", + "kind": "enum", + "name": "VmssExtensionSetupOrder", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssExtensionSetupOrder", + "valueType": { + "$id": "301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "302", + "kind": "enumvalue", + "name": "BeforeSFRuntime", + "value": "BeforeSFRuntime", + "valueType": { + "$id": "303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "300" + }, + "doc": "Indicates that the vm extension should run before the service fabric runtime starts.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Vm extension setup order.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "304", + "kind": "enum", + "name": "NodeTypeFrontendConfigurationIPAddressType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IPAddressType", + "valueType": { + "$id": "305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "306", + "kind": "enumvalue", + "name": "IPv4", + "value": "IPv4", + "valueType": { + "$id": "307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "304" + }, + "doc": "IPv4 address type.", + "decorators": [] + }, + { + "$id": "308", + "kind": "enumvalue", + "name": "IPv6", + "value": "IPv6", + "valueType": { + "$id": "309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "304" + }, + "doc": "IPv6 address type.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The IP address type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "310", + "kind": "enum", + "name": "SpotNodeVmEvictionPolicyType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.EvictionPolicyType", + "valueType": { + "$id": "311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "312", + "kind": "enumvalue", + "name": "Delete", + "value": "Delete", + "valueType": { + "$id": "313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "310" + }, + "doc": "Eviction policy will be Delete for SPOT vms.", + "decorators": [] + }, + { + "$id": "314", + "kind": "enumvalue", + "name": "Deallocate", + "value": "Deallocate", + "valueType": { + "$id": "315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "310" + }, + "doc": "Eviction policy will be Deallocate for SPOT vms.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies the eviction policy for virtual machines in a SPOT node type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "316", + "kind": "enum", + "name": "VmSetupAction", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmSetupAction", + "valueType": { + "$id": "317", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "318", + "kind": "enumvalue", + "name": "EnableContainers", + "value": "EnableContainers", + "valueType": { + "$id": "319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "doc": "Enable windows containers feature.", + "decorators": [] + }, + { + "$id": "320", + "kind": "enumvalue", + "name": "EnableHyperV", + "value": "EnableHyperV", + "valueType": { + "$id": "321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "doc": "Enables windows HyperV feature.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "action to be performed on the vms before bootstrapping the service fabric runtime.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "322", + "kind": "enum", + "name": "ServiceFabricManagedClusterSecurityType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SecurityType", + "valueType": { + "$id": "323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "324", + "kind": "enumvalue", + "name": "TrustedLaunch", + "value": "TrustedLaunch", + "valueType": { + "$id": "325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "322" + }, + "doc": "Trusted Launch is a security type that secures generation 2 virtual machines.", + "decorators": [] + }, + { + "$id": "326", + "kind": "enumvalue", + "name": "Standard", + "value": "Standard", + "valueType": { + "$id": "327", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "322" + }, + "doc": "Standard is the default security type for all machines.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "328", + "kind": "enum", + "name": "ServiceFabricManagedClusterPrivateIPAddressVersion", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PrivateIPAddressVersion", + "valueType": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "330", + "kind": "enumvalue", + "name": "IPv4", + "value": "IPv4", + "valueType": { + "$id": "331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "doc": "The IP configuration's private IP is IPv4.", + "decorators": [] + }, + { + "$id": "332", + "kind": "enumvalue", + "name": "IPv6", + "value": "IPv6", + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "doc": "The IP configuration's private IP is IPv6.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "334", + "kind": "enum", + "name": "ServiceFabricManagedClusterPublicIPAddressVersion", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressVersion", + "valueType": { + "$id": "335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "336", + "kind": "enumvalue", + "name": "IPv4", + "value": "IPv4", + "valueType": { + "$id": "337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "334" + }, + "doc": "The IP configuration's public IP is IPv4.", + "decorators": [] + }, + { + "$id": "338", + "kind": "enumvalue", + "name": "IPv6", + "value": "IPv6", + "valueType": { + "$id": "339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "334" + }, + "doc": "The IP configuration's public IP is IPv6.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies whether the IP configuration's public IP is IPv4 or IPv6. Default is IPv4.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "340", + "kind": "enum", + "name": "ServiceFabricManagedClusterUpdateType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UpdateType", + "valueType": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "342", + "kind": "enumvalue", + "name": "Default", + "value": "Default", + "valueType": { + "$id": "343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "340" + }, + "doc": "The operation will proceed in all specified nodes at the same time.", + "decorators": [] + }, + { + "$id": "344", + "kind": "enumvalue", + "name": "ByUpgradeDomain", + "value": "ByUpgradeDomain", + "valueType": { + "$id": "345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "340" + }, + "doc": "The operation will proceed one upgrade domain at a time, checking the health in between each to continue.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies the way the operation will be performed.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "346", + "kind": "enum", + "name": "NodeTypeSkuScaleType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuScaleType", + "valueType": { + "$id": "347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "348", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "doc": "Node count is not adjustable in any way (e.g. it is fixed).", + "decorators": [] + }, + { + "$id": "350", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "doc": "The user must manually scale out/in.", + "decorators": [] + }, + { + "$id": "352", + "kind": "enumvalue", + "name": "Automatic", + "value": "Automatic", + "valueType": { + "$id": "353", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "doc": "Automatic scale is allowed.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Node type capacity scale type.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "354", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Versions", + "valueType": { + "$id": "355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "356", + "kind": "enumvalue", + "name": "v2024_11_01_preview", + "value": "2024-11-01-preview", + "valueType": { + "$id": "357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "354" + }, + "doc": "The 2024-11-01-preview API version.", + "decorators": [] + }, + { + "$id": "358", + "kind": "enumvalue", + "name": "v2025_03_01_preview", + "value": "2025-03-01-preview", + "valueType": { + "$id": "359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "354" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The available API versions.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "360", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationListResult", + "usage": "Output,Json", + "doc": "Describes the result of the request to list Service Fabric resource provider operations.", + "decorators": [], + "properties": [ + { + "$id": "361", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The OperationResult items on this page", + "type": { + "$id": "362", + "kind": "array", + "name": "ArrayOperationResult", + "valueType": { + "$id": "363", + "kind": "model", + "name": "OperationResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult", + "usage": "Output,Json", + "doc": "Available operation list result", + "decorators": [], + "properties": [ + { + "$id": "364", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation.", + "type": { + "$id": "365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.name", + "serializationOptions": { + "$id": "366", + "json": { + "$id": "367", + "name": "name" + } + } + }, + { + "$id": "368", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Indicates whether the operation is a data action", + "type": { + "$id": "369", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.isDataAction", + "serializationOptions": { + "$id": "370", + "json": { + "$id": "371", + "name": "isDataAction" + } + } + }, + { + "$id": "372", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "The object that represents the operation.", + "type": { + "$id": "373", + "kind": "model", + "name": "AvailableOperationDisplay", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay", + "usage": "Output,Json", + "doc": "Operation supported by the Service Fabric resource provider", + "decorators": [], + "properties": [ + { + "$id": "374", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The name of the provider.", + "type": { + "$id": "375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay.provider", + "serializationOptions": { + "$id": "376", + "json": { + "$id": "377", + "name": "provider" + } + } + }, + { + "$id": "378", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The resource on which the operation is performed", + "type": { + "$id": "379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay.resource", + "serializationOptions": { + "$id": "380", + "json": { + "$id": "381", + "name": "resource" + } + } + }, + { + "$id": "382", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The operation that can be performed.", + "type": { + "$id": "383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay.operation", + "serializationOptions": { + "$id": "384", + "json": { + "$id": "385", + "name": "operation" + } + } + }, + { + "$id": "386", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Operation description", + "type": { + "$id": "387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay.description", + "serializationOptions": { + "$id": "388", + "json": { + "$id": "389", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.display", + "serializationOptions": { + "$id": "390", + "json": { + "$id": "391", + "name": "display" + } + } + }, + { + "$id": "392", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "Origin result", + "type": { + "$id": "393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.origin", + "serializationOptions": { + "$id": "394", + "json": { + "$id": "395", + "name": "origin" + } + } + }, + { + "$id": "396", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The URL to use for getting the next set of results.", + "type": { + "$id": "397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.nextLink", + "serializationOptions": { + "$id": "398", + "json": { + "$id": "399", + "name": "nextLink" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationListResult.value", + "serializationOptions": { + "$id": "400", + "json": { + "$id": "401", + "name": "value" + } + } + }, + { + "$id": "402", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "403", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "404", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationListResult.nextLink", + "serializationOptions": { + "$id": "405", + "json": { + "$id": "406", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "363" + }, + { + "$ref": "373" + }, + { + "$id": "407", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "408", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "409", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "410", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "412", + "json": { + "$id": "413", + "name": "code" + } + } + }, + { + "$id": "414", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "$id": "416", + "json": { + "$id": "417", + "name": "message" + } + } + }, + { + "$id": "418", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "419", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "420", + "json": { + "$id": "421", + "name": "target" + } + } + }, + { + "$id": "422", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "423", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "409" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "424", + "json": { + "$id": "425", + "name": "details" + } + } + }, + { + "$id": "426", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "427", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "428", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "429", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "430", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "$id": "431", + "json": { + "$id": "432", + "name": "type" + } + } + }, + { + "$id": "433", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "434", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "435", + "json": { + "$id": "436", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "437", + "json": { + "$id": "438", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "439", + "json": { + "$id": "440", + "name": "error" + } + } + } + ] + }, + { + "$ref": "409" + }, + { + "$ref": "428" + }, + { + "$ref": "434" + }, + { + "$id": "441", + "kind": "model", + "name": "ServiceFabricManagedApplication", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The application resource.", + "decorators": [], + "baseModel": { + "$id": "442", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ProxyResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "decorators": [], + "baseModel": { + "$id": "443", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "444", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "$id": "446", + "json": { + "$id": "447", + "name": "id" + } + } + }, + { + "$id": "448", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", + "serializationOptions": { + "$id": "450", + "json": { + "$id": "451", + "name": "name" + } + } + }, + { + "$id": "452", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "453", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "454", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", + "serializationOptions": { + "$id": "455", + "json": { + "$id": "456", + "name": "type" + } + } + }, + { + "$id": "457", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "458", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "459", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "460", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", + "serializationOptions": { + "$id": "461", + "json": { + "$id": "462", + "name": "createdBy" + } + } + }, + { + "$id": "463", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "24" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "464", + "json": { + "$id": "465", + "name": "createdByType" + } + } + }, + { + "$id": "466", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "467", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "468", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", + "serializationOptions": { + "$id": "469", + "json": { + "$id": "470", + "name": "createdAt" + } + } + }, + { + "$id": "471", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "472", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", + "serializationOptions": { + "$id": "473", + "json": { + "$id": "474", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "475", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "24" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "476", + "json": { + "$id": "477", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "478", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "479", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", + "serializationOptions": { + "$id": "481", + "json": { + "$id": "482", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "483", + "json": { + "$id": "484", + "name": "systemData" + } + } + } + ] + }, + "properties": [] + }, + "properties": [ + { + "$id": "485", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The application resource properties.", + "type": { + "$id": "486", + "kind": "model", + "name": "ApplicationResourceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The application resource properties.", + "decorators": [], + "properties": [ + { + "$id": "487", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The current deployment or provisioning state, which only appears in the response", + "type": { + "$id": "488", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.provisioningState", + "serializationOptions": { + "$id": "489", + "json": { + "$id": "490", + "name": "provisioningState" + } + } + }, + { + "$id": "491", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "The version of the application type as defined in the application manifest.\nThis name must be the full Arm Resource ID for the referenced application type version.", + "type": { + "$id": "492", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.version", + "serializationOptions": { + "$id": "493", + "json": { + "$id": "494", + "name": "version" + } + } + }, + { + "$id": "495", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "List of application parameters with overridden values from their default values specified in the application manifest.", + "type": { + "$id": "496", + "kind": "dict", + "keyType": { + "$id": "497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.parameters", + "serializationOptions": { + "$id": "499", + "json": { + "$id": "500", + "name": "parameters" + } + } + }, + { + "$id": "501", + "kind": "property", + "name": "upgradePolicy", + "serializedName": "upgradePolicy", + "doc": "Describes the policy for a monitored application upgrade.", + "type": { + "$id": "502", + "kind": "model", + "name": "ApplicationUpgradePolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy for a monitored application upgrade.", + "decorators": [], + "properties": [ + { + "$id": "503", + "kind": "property", + "name": "applicationHealthPolicy", + "serializedName": "applicationHealthPolicy", + "doc": "Defines a health policy used to evaluate the health of an application or one of its children entities.", + "type": { + "$id": "504", + "kind": "model", + "name": "ApplicationHealthPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines a health policy used to evaluate the health of an application or one of its children entities.", + "decorators": [], + "properties": [ + { + "$id": "505", + "kind": "property", + "name": "considerWarningAsError", + "serializedName": "considerWarningAsError", + "doc": "Indicates whether warnings are treated with the same severity as errors.", + "type": { + "$id": "506", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy.considerWarningAsError", + "serializationOptions": { + "$id": "507", + "json": { + "$id": "508", + "name": "considerWarningAsError" + } + } + }, + { + "$id": "509", + "kind": "property", + "name": "maxPercentUnhealthyDeployedApplications", + "serializedName": "maxPercentUnhealthyDeployedApplications", + "doc": "The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100.\nThe percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error.\nThis is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster.\nThe computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.", + "type": { + "$id": "510", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy.maxPercentUnhealthyDeployedApplications", + "serializationOptions": { + "$id": "511", + "json": { + "$id": "512", + "name": "maxPercentUnhealthyDeployedApplications" + } + } + }, + { + "$id": "513", + "kind": "property", + "name": "defaultServiceTypeHealthPolicy", + "serializedName": "defaultServiceTypeHealthPolicy", + "doc": "The health policy used by default to evaluate the health of a service type.", + "type": { + "$id": "514", + "kind": "model", + "name": "ServiceTypeHealthPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceTypeHealthPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents the health policy used to evaluate the health of services belonging to a service type.", + "decorators": [], + "properties": [ + { + "$id": "515", + "kind": "property", + "name": "maxPercentUnhealthyServices", + "serializedName": "maxPercentUnhealthyServices", + "doc": "The maximum allowed percentage of unhealthy services.\n\nThe percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error.\nIf the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning.\nThis is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type.\nThe computation rounds up to tolerate one failure on small numbers of services.", + "type": { + "$id": "516", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceTypeHealthPolicy.maxPercentUnhealthyServices", + "serializationOptions": { + "$id": "517", + "json": { + "$id": "518", + "name": "maxPercentUnhealthyServices" + } + } + }, + { + "$id": "519", + "kind": "property", + "name": "maxPercentUnhealthyPartitionsPerService", + "serializedName": "maxPercentUnhealthyPartitionsPerService", + "doc": "The maximum allowed percentage of unhealthy partitions per service.\n\nThe percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service is considered in error.\nIf the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning.\nThe percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service.\nThe computation rounds up to tolerate one failure on small numbers of partitions.", + "type": { + "$id": "520", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService", + "serializationOptions": { + "$id": "521", + "json": { + "$id": "522", + "name": "maxPercentUnhealthyPartitionsPerService" + } + } + }, + { + "$id": "523", + "kind": "property", + "name": "maxPercentUnhealthyReplicasPerPartition", + "serializedName": "maxPercentUnhealthyReplicasPerPartition", + "doc": "The maximum allowed percentage of unhealthy replicas per partition.\n\nThe percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition is considered in error.\nIf the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning.\nThe percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition.\nThe computation rounds up to tolerate one failure on small numbers of replicas.", + "type": { + "$id": "524", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition", + "serializationOptions": { + "$id": "525", + "json": { + "$id": "526", + "name": "maxPercentUnhealthyReplicasPerPartition" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy.defaultServiceTypeHealthPolicy", + "serializationOptions": { + "$id": "527", + "json": { + "$id": "528", + "name": "defaultServiceTypeHealthPolicy" + } + } + }, + { + "$id": "529", + "kind": "property", + "name": "serviceTypeHealthPolicyMap", + "serializedName": "serviceTypeHealthPolicyMap", + "doc": "The map with service type health policy per service type name. The map is empty by default.", + "type": { + "$id": "530", + "kind": "dict", + "keyType": { + "$id": "531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "514" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy.serviceTypeHealthPolicyMap", + "serializationOptions": { + "$id": "532", + "json": { + "$id": "533", + "name": "serviceTypeHealthPolicyMap" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.applicationHealthPolicy", + "serializationOptions": { + "$id": "534", + "json": { + "$id": "535", + "name": "applicationHealthPolicy" + } + } + }, + { + "$id": "536", + "kind": "property", + "name": "forceRestart", + "serializedName": "forceRestart", + "doc": "If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).", + "type": { + "$id": "537", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.forceRestart", + "serializationOptions": { + "$id": "538", + "json": { + "$id": "539", + "name": "forceRestart" + } + } + }, + { + "$id": "540", + "kind": "property", + "name": "rollingUpgradeMonitoringPolicy", + "serializedName": "rollingUpgradeMonitoringPolicy", + "doc": "The policy used for monitoring the application upgrade", + "type": { + "$id": "541", + "kind": "model", + "name": "RollingUpgradeMonitoringPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The policy used for monitoring the application upgrade", + "decorators": [], + "properties": [ + { + "$id": "542", + "kind": "property", + "name": "failureAction", + "serializedName": "failureAction", + "doc": "The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode.", + "type": { + "$ref": "2" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.failureAction", + "serializationOptions": { + "$id": "543", + "json": { + "$id": "544", + "name": "failureAction" + } + } + }, + { + "$id": "545", + "kind": "property", + "name": "healthCheckWaitDuration", + "serializedName": "healthCheckWaitDuration", + "doc": "The amount of time to wait after completing an upgrade domain before applying health policies. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.healthCheckWaitDuration", + "serializationOptions": { + "$id": "547", + "json": { + "$id": "548", + "name": "healthCheckWaitDuration" + } + } + }, + { + "$id": "549", + "kind": "property", + "name": "healthCheckStableDuration", + "serializedName": "healthCheckStableDuration", + "doc": "The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "550", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.healthCheckStableDuration", + "serializationOptions": { + "$id": "551", + "json": { + "$id": "552", + "name": "healthCheckStableDuration" + } + } + }, + { + "$id": "553", + "kind": "property", + "name": "healthCheckRetryTimeout", + "serializedName": "healthCheckRetryTimeout", + "doc": "The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.healthCheckRetryTimeout", + "serializationOptions": { + "$id": "555", + "json": { + "$id": "556", + "name": "healthCheckRetryTimeout" + } + } + }, + { + "$id": "557", + "kind": "property", + "name": "upgradeTimeout", + "serializedName": "upgradeTimeout", + "doc": "The amount of time the overall upgrade has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.upgradeTimeout", + "serializationOptions": { + "$id": "559", + "json": { + "$id": "560", + "name": "upgradeTimeout" + } + } + }, + { + "$id": "561", + "kind": "property", + "name": "upgradeDomainTimeout", + "serializedName": "upgradeDomainTimeout", + "doc": "The amount of time each upgrade domain has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.upgradeDomainTimeout", + "serializationOptions": { + "$id": "563", + "json": { + "$id": "564", + "name": "upgradeDomainTimeout" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.rollingUpgradeMonitoringPolicy", + "serializationOptions": { + "$id": "565", + "json": { + "$id": "566", + "name": "rollingUpgradeMonitoringPolicy" + } + } + }, + { + "$id": "567", + "kind": "property", + "name": "InstanceCloseDelayDurationInSeconds", + "serializedName": "instanceCloseDelayDuration", + "doc": "Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured in the service description.", + "type": { + "$id": "568", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.instanceCloseDelayDuration", + "serializationOptions": { + "$id": "569", + "json": { + "$id": "570", + "name": "instanceCloseDelayDuration" + } + } + }, + { + "$id": "571", + "kind": "property", + "name": "upgradeMode", + "serializedName": "upgradeMode", + "doc": "The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto.", + "type": { + "$ref": "8" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.upgradeMode", + "serializationOptions": { + "$id": "572", + "json": { + "$id": "573", + "name": "upgradeMode" + } + } + }, + { + "$id": "574", + "kind": "property", + "name": "upgradeReplicaSetCheckTimeout", + "serializedName": "upgradeReplicaSetCheckTimeout", + "doc": "The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). Unit is in seconds.", + "type": { + "$id": "575", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.upgradeReplicaSetCheckTimeout", + "serializationOptions": { + "$id": "576", + "json": { + "$id": "577", + "name": "upgradeReplicaSetCheckTimeout" + } + } + }, + { + "$id": "578", + "kind": "property", + "name": "recreateApplication", + "serializedName": "recreateApplication", + "doc": "Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed.", + "type": { + "$id": "579", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.recreateApplication", + "serializationOptions": { + "$id": "580", + "json": { + "$id": "581", + "name": "recreateApplication" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.upgradePolicy", + "serializationOptions": { + "$id": "582", + "json": { + "$id": "583", + "name": "upgradePolicy" + } + } + }, + { + "$id": "584", + "kind": "property", + "name": "managedIdentities", + "serializedName": "managedIdentities", + "doc": "List of user assigned identities for the application, each mapped to a friendly name.", + "type": { + "$id": "585", + "kind": "array", + "name": "ArrayApplicationUserAssignedIdentity", + "valueType": { + "$id": "586", + "kind": "model", + "name": "ApplicationUserAssignedIdentityInfo", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity for the application.", + "decorators": [], + "properties": [ + { + "$id": "587", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The friendly name of user assigned identity.", + "type": { + "$id": "588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUserAssignedIdentity.name", + "serializationOptions": { + "$id": "589", + "json": { + "$id": "590", + "name": "name" + } + } + }, + { + "$id": "591", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal id of user assigned identity.", + "type": { + "$id": "592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUserAssignedIdentity.principalId", + "serializationOptions": { + "$id": "593", + "json": { + "$id": "594", + "name": "principalId" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.managedIdentities", + "serializationOptions": { + "$id": "595", + "json": { + "$id": "596", + "name": "managedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.properties", + "serializationOptions": { + "$id": "597", + "json": { + "$id": "598", + "name": "properties" + } + } + }, + { + "$id": "599", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "600", + "kind": "dict", + "keyType": { + "$id": "601", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.tags", + "serializationOptions": { + "$id": "603", + "json": { + "$id": "604", + "name": "tags" + } + } + }, + { + "$id": "605", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "Describes the managed identities for an Azure resource.", + "type": { + "$id": "606", + "kind": "model", + "name": "ManagedIdentity", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the managed identities for an Azure resource.", + "decorators": [], + "properties": [ + { + "$id": "607", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal id of the managed identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity.principalId", + "serializationOptions": { + "$id": "609", + "json": { + "$id": "610", + "name": "principalId" + } + } + }, + { + "$id": "611", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "The tenant id of the managed identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity.tenantId", + "serializationOptions": { + "$id": "613", + "json": { + "$id": "614", + "name": "tenantId" + } + } + }, + { + "$id": "615", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity for the resource.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity.type", + "serializationOptions": { + "$id": "616", + "json": { + "$id": "617", + "name": "type" + } + } + }, + { + "$id": "618", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form:\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", + "type": { + "$id": "619", + "kind": "dict", + "keyType": { + "$id": "620", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "621", + "kind": "model", + "name": "UserAssignedIdentity", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity.", + "decorators": [], + "properties": [ + { + "$id": "622", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal id of user assigned identity.", + "type": { + "$id": "623", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UserAssignedIdentity.principalId", + "serializationOptions": { + "$id": "624", + "json": { + "$id": "625", + "name": "principalId" + } + } + }, + { + "$id": "626", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client id of user assigned identity.", + "type": { + "$id": "627", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UserAssignedIdentity.clientId", + "serializationOptions": { + "$id": "628", + "json": { + "$id": "629", + "name": "clientId" + } + } + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "630", + "json": { + "$id": "631", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.identity", + "serializationOptions": { + "$id": "632", + "json": { + "$id": "633", + "name": "identity" + } + } + }, + { + "$id": "634", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.location", + "serializationOptions": { + "$id": "636", + "json": { + "$id": "637", + "name": "location" + } + } + } + ] + }, + { + "$ref": "486" + }, + { + "$ref": "502" + }, + { + "$ref": "504" + }, + { + "$ref": "514" + }, + { + "$ref": "541" + }, + { + "$ref": "586" + }, + { + "$ref": "606" + }, + { + "$ref": "621" + }, + { + "$ref": "442" + }, + { + "$ref": "443" + }, + { + "$ref": "458" + }, + { + "$id": "638", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "639", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "34" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "640", + "json": { + "$id": "641", + "name": "status" + } + } + }, + { + "$id": "642", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "643", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "644", + "json": { + "$id": "645", + "name": "name" + } + } + }, + { + "$id": "646", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "647", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", + "serializationOptions": { + "$id": "649", + "json": { + "$id": "650", + "name": "startTime" + } + } + }, + { + "$id": "651", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "652", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "$id": "654", + "json": { + "$id": "655", + "name": "endTime" + } + } + }, + { + "$id": "656", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "657", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "658", + "json": { + "$id": "659", + "name": "percentComplete" + } + } + }, + { + "$id": "660", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "409" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "661", + "json": { + "$id": "662", + "name": "error" + } + } + } + ] + }, + { + "$id": "663", + "kind": "model", + "name": "ApplicationUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpdateParameters", + "usage": "Input,Json", + "doc": "Application update request.", + "decorators": [], + "properties": [ + { + "$id": "664", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Application update parameters", + "type": { + "$id": "665", + "kind": "dict", + "keyType": { + "$id": "666", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "667", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpdateParameters.tags", + "serializationOptions": { + "$id": "668", + "json": { + "$id": "669", + "name": "tags" + } + } + } + ] + }, + { + "$id": "670", + "kind": "model", + "name": "ApplicationResourceList", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceList", + "usage": "Output,Json", + "doc": "The list of application resources.", + "decorators": [], + "properties": [ + { + "$id": "671", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ApplicationResource items on this page", + "type": { + "$id": "672", + "kind": "array", + "name": "ArrayApplicationResource", + "valueType": { + "$ref": "441" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceList.value", + "serializationOptions": { + "$id": "673", + "json": { + "$id": "674", + "name": "value" + } + } + }, + { + "$id": "675", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "676", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "677", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceList.nextLink", + "serializationOptions": { + "$id": "678", + "json": { + "$id": "679", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "680", + "kind": "model", + "name": "RuntimeResumeApplicationUpgradeParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RuntimeResumeApplicationUpgradeParameters", + "usage": "Input,Json", + "doc": "Parameters for Resume Upgrade action. The upgrade domain name must be specified.", + "decorators": [], + "properties": [ + { + "$id": "681", + "kind": "property", + "name": "upgradeDomainName", + "serializedName": "upgradeDomainName", + "doc": "The upgrade domain name. Expected to be the next upgrade domain if the application is upgrading.", + "type": { + "$id": "682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RuntimeResumeApplicationUpgradeParameters.upgradeDomainName", + "serializationOptions": { + "$id": "683", + "json": { + "$id": "684", + "name": "upgradeDomainName" + } + } + } + ] + }, + { + "$id": "685", + "kind": "model", + "name": "ServiceFabricManagedApplicationType", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource", + "usage": "Input,Output,Json", + "doc": "The application type name resource", + "decorators": [], + "baseModel": { + "$ref": "442" + }, + "properties": [ + { + "$id": "686", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The application type name properties", + "type": { + "$id": "687", + "kind": "model", + "name": "ApplicationTypeResourceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceProperties", + "usage": "Input,Output,Json", + "doc": "The application type name properties", + "decorators": [], + "properties": [ + { + "$id": "688", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The current deployment or provisioning state, which only appears in the response.", + "type": { + "$id": "689", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceProperties.provisioningState", + "serializationOptions": { + "$id": "690", + "json": { + "$id": "691", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource.properties", + "serializationOptions": { + "$id": "692", + "json": { + "$id": "693", + "name": "properties" + } + } + }, + { + "$id": "694", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "695", + "kind": "dict", + "keyType": { + "$id": "696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "697", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource.tags", + "serializationOptions": { + "$id": "698", + "json": { + "$id": "699", + "name": "tags" + } + } + }, + { + "$id": "700", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "701", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource.location", + "serializationOptions": { + "$id": "702", + "json": { + "$id": "703", + "name": "location" + } + } + } + ] + }, + { + "$ref": "687" + }, + { + "$id": "704", + "kind": "model", + "name": "ApplicationTypeUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeUpdateParameters", + "usage": "Input,Json", + "doc": "Application type update request", + "decorators": [], + "properties": [ + { + "$id": "705", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Application type update parameters", + "type": { + "$id": "706", + "kind": "dict", + "keyType": { + "$id": "707", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "708", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeUpdateParameters.tags", + "serializationOptions": { + "$id": "709", + "json": { + "$id": "710", + "name": "tags" + } + } + } + ] + }, + { + "$id": "711", + "kind": "model", + "name": "ApplicationTypeResourceList", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceList", + "usage": "Output,Json", + "doc": "The list of application type names.", + "decorators": [], + "properties": [ + { + "$id": "712", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ApplicationTypeResource items on this page", + "type": { + "$id": "713", + "kind": "array", + "name": "ArrayApplicationTypeResource", + "valueType": { + "$ref": "685" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceList.value", + "serializationOptions": { + "$id": "714", + "json": { + "$id": "715", + "name": "value" + } + } + }, + { + "$id": "716", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "717", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "718", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceList.nextLink", + "serializationOptions": { + "$id": "719", + "json": { + "$id": "720", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "721", + "kind": "model", + "name": "ServiceFabricManagedApplicationTypeVersion", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "An application type version resource for the specified application type name resource.", + "decorators": [], + "baseModel": { + "$ref": "442" + }, + "properties": [ + { + "$id": "722", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of the application type version resource.", + "type": { + "$id": "723", + "kind": "model", + "name": "ApplicationTypeVersionResourceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The properties of the application type version resource.", + "decorators": [], + "properties": [ + { + "$id": "724", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The current deployment or provisioning state, which only appears in the response", + "type": { + "$id": "725", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties.provisioningState", + "serializationOptions": { + "$id": "726", + "json": { + "$id": "727", + "name": "provisioningState" + } + } + }, + { + "$id": "728", + "kind": "property", + "name": "appPackageUrl", + "serializedName": "appPackageUrl", + "doc": "The URL to the application package", + "type": { + "$id": "729", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties.appPackageUrl", + "serializationOptions": { + "$id": "730", + "json": { + "$id": "731", + "name": "appPackageUrl" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource.properties", + "serializationOptions": { + "$id": "732", + "json": { + "$id": "733", + "name": "properties" + } + } + }, + { + "$id": "734", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "735", + "kind": "dict", + "keyType": { + "$id": "736", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource.tags", + "serializationOptions": { + "$id": "738", + "json": { + "$id": "739", + "name": "tags" + } + } + }, + { + "$id": "740", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource.location", + "serializationOptions": { + "$id": "742", + "json": { + "$id": "743", + "name": "location" + } + } + } + ] + }, + { + "$ref": "723" + }, + { + "$id": "744", + "kind": "model", + "name": "ApplicationTypeVersionUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionUpdateParameters", + "usage": "Input,Json", + "doc": "Application type version update request", + "decorators": [], + "properties": [ + { + "$id": "745", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Application type version update parameters", + "type": { + "$id": "746", + "kind": "dict", + "keyType": { + "$id": "747", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionUpdateParameters.tags", + "serializationOptions": { + "$id": "749", + "json": { + "$id": "750", + "name": "tags" + } + } + } + ] + }, + { + "$id": "751", + "kind": "model", + "name": "ApplicationTypeVersionResourceList", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceList", + "usage": "Output,Json", + "doc": "The list of application type version resources for the specified application type name resource.", + "decorators": [], + "properties": [ + { + "$id": "752", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ApplicationTypeVersionResource items on this page", + "type": { + "$id": "753", + "kind": "array", + "name": "ArrayApplicationTypeVersionResource", + "valueType": { + "$ref": "721" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceList.value", + "serializationOptions": { + "$id": "754", + "json": { + "$id": "755", + "name": "value" + } + } + }, + { + "$id": "756", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "757", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "758", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceList.nextLink", + "serializationOptions": { + "$id": "759", + "json": { + "$id": "760", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "761", + "kind": "model", + "name": "ServiceFabricManagedService", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The service resource.", + "decorators": [], + "baseModel": { + "$ref": "442" + }, + "properties": [ + { + "$id": "762", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The service resource properties.", + "type": { + "$id": "763", + "kind": "model", + "name": "ManagedServiceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The service resource properties.", + "decorators": [], + "discriminatorProperty": { + "$id": "764", + "kind": "property", + "name": "serviceKind", + "serializedName": "serviceKind", + "doc": "The kind of service (Stateless or Stateful).", + "type": { + "$ref": "42" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.serviceKind", + "serializationOptions": { + "$id": "765", + "json": { + "$id": "766", + "name": "serviceKind" + } + } + }, + "baseModel": { + "$id": "767", + "kind": "model", + "name": "ManagedServiceBaseProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The common service resource properties.", + "decorators": [], + "properties": [ + { + "$id": "768", + "kind": "property", + "name": "placementConstraints", + "serializedName": "placementConstraints", + "doc": "The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: \"NodeColor == blue)\".", + "type": { + "$id": "769", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.placementConstraints", + "serializationOptions": { + "$id": "770", + "json": { + "$id": "771", + "name": "placementConstraints" + } + } + }, + { + "$id": "772", + "kind": "property", + "name": "correlationScheme", + "serializedName": "correlationScheme", + "doc": "A list that describes the correlation of the service with other services.", + "type": { + "$id": "773", + "kind": "array", + "name": "ArrayServiceCorrelation", + "valueType": { + "$id": "774", + "kind": "model", + "name": "ManagedServiceCorrelation", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceCorrelation", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Creates a particular correlation between services.", + "decorators": [], + "properties": [ + { + "$id": "775", + "kind": "property", + "name": "scheme", + "serializedName": "scheme", + "doc": "The ServiceCorrelationScheme which describes the relationship between this service and the service specified via ServiceName.", + "type": { + "$ref": "62" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceCorrelation.scheme", + "serializationOptions": { + "$id": "776", + "json": { + "$id": "777", + "name": "scheme" + } + } + }, + { + "$id": "778", + "kind": "property", + "name": "serviceName", + "serializedName": "serviceName", + "doc": "The Arm Resource ID of the service that the correlation relationship is established with.", + "type": { + "$id": "779", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceCorrelation.serviceName", + "serializationOptions": { + "$id": "780", + "json": { + "$id": "781", + "name": "serviceName" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.correlationScheme", + "serializationOptions": { + "$id": "782", + "json": { + "$id": "783", + "name": "correlationScheme" + } + } + }, + { + "$id": "784", + "kind": "property", + "name": "serviceLoadMetrics", + "serializedName": "serviceLoadMetrics", + "doc": "The service load metrics is given as an array of ServiceLoadMetric objects.", + "type": { + "$id": "785", + "kind": "array", + "name": "ArrayServiceLoadMetric", + "valueType": { + "$id": "786", + "kind": "model", + "name": "ManagedServiceLoadMetric", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies a metric to load balance a service during runtime.", + "decorators": [], + "properties": [ + { + "$id": "787", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive.", + "type": { + "$id": "788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.name", + "serializationOptions": { + "$id": "789", + "json": { + "$id": "790", + "name": "name" + } + } + }, + { + "$id": "791", + "kind": "property", + "name": "weight", + "serializedName": "weight", + "doc": "The service load metric relative weight, compared to other metrics configured for this service, as a number.", + "type": { + "$ref": "68" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.weight", + "serializationOptions": { + "$id": "792", + "json": { + "$id": "793", + "name": "weight" + } + } + }, + { + "$id": "794", + "kind": "property", + "name": "primaryDefaultLoad", + "serializedName": "primaryDefaultLoad", + "doc": "Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica.", + "type": { + "$id": "795", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.primaryDefaultLoad", + "serializationOptions": { + "$id": "796", + "json": { + "$id": "797", + "name": "primaryDefaultLoad" + } + } + }, + { + "$id": "798", + "kind": "property", + "name": "secondaryDefaultLoad", + "serializedName": "secondaryDefaultLoad", + "doc": "Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica.", + "type": { + "$id": "799", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.secondaryDefaultLoad", + "serializationOptions": { + "$id": "800", + "json": { + "$id": "801", + "name": "secondaryDefaultLoad" + } + } + }, + { + "$id": "802", + "kind": "property", + "name": "defaultLoad", + "serializedName": "defaultLoad", + "doc": "Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric.", + "type": { + "$id": "803", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.defaultLoad", + "serializationOptions": { + "$id": "804", + "json": { + "$id": "805", + "name": "defaultLoad" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.serviceLoadMetrics", + "serializationOptions": { + "$id": "806", + "json": { + "$id": "807", + "name": "serviceLoadMetrics" + } + } + }, + { + "$id": "808", + "kind": "property", + "name": "servicePlacementPolicies", + "serializedName": "servicePlacementPolicies", + "doc": "A list that describes the correlation of the service with other services.", + "type": { + "$id": "809", + "kind": "array", + "name": "ArrayServicePlacementPolicy", + "valueType": { + "$id": "810", + "kind": "model", + "name": "ManagedServicePlacementPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service.", + "decorators": [], + "discriminatorProperty": { + "$id": "811", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "78" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPolicy.type", + "serializationOptions": { + "$id": "812", + "json": { + "$id": "813", + "name": "type" + } + } + }, + "properties": [ + { + "$ref": "811" + } + ], + "discriminatedSubtypes": { + "$id": "814", + "InvalidDomain": { + "$id": "815", + "kind": "model", + "name": "ServicePlacementInvalidDomainPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service where a particular fault or upgrade domain should not be used for placement of the instances or replicas of that service.", + "discriminatorValue": "InvalidDomain", + "decorators": [], + "baseModel": { + "$ref": "810" + }, + "properties": [ + { + "$id": "816", + "kind": "property", + "name": "domainName", + "serializedName": "domainName", + "doc": "The name of the domain that should not be used for placement.", + "type": { + "$id": "817", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy.domainName", + "serializationOptions": { + "$id": "818", + "json": { + "$id": "819", + "name": "domainName" + } + } + }, + { + "$id": "820", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "type": { + "$id": "821", + "kind": "constant", + "valueType": { + "$id": "822", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "InvalidDomain", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy.type", + "serializationOptions": { + "$id": "823", + "json": { + "$id": "824", + "name": "type" + } + } + } + ] + }, + "RequiredDomain": { + "$id": "825", + "kind": "model", + "name": "ServicePlacementRequiredDomainPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service where the instances or replicas of that service must be placed in a particular domain.", + "discriminatorValue": "RequiredDomain", + "decorators": [], + "baseModel": { + "$ref": "810" + }, + "properties": [ + { + "$id": "826", + "kind": "property", + "name": "domainName", + "serializedName": "domainName", + "doc": "The name of the domain that should used for placement as per this policy.", + "type": { + "$id": "827", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy.domainName", + "serializationOptions": { + "$id": "828", + "json": { + "$id": "829", + "name": "domainName" + } + } + }, + { + "$id": "830", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "type": { + "$id": "831", + "kind": "constant", + "valueType": { + "$id": "832", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "RequiredDomain", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy.type", + "serializationOptions": { + "$id": "833", + "json": { + "$id": "834", + "name": "type" + } + } + } + ] + }, + "PreferredPrimaryDomain": { + "$id": "835", + "kind": "model", + "name": "ServicePlacementPreferPrimaryDomainPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service where the service's\nPrimary replicas should optimally be placed in a particular domain.\n\nThis placement policy is usually used with fault domains in scenarios where the Service Fabric\ncluster is geographically distributed in order to indicate that a service's primary replica should\nbe located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional\nor datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica\nmay not end up located in this domain due to failures, capacity limits, or other constraints.", + "discriminatorValue": "PreferredPrimaryDomain", + "decorators": [], + "baseModel": { + "$ref": "810" + }, + "properties": [ + { + "$id": "836", + "kind": "property", + "name": "domainName", + "serializedName": "domainName", + "doc": "The name of the domain that should used for placement as per this policy.", + "type": { + "$id": "837", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy.domainName", + "serializationOptions": { + "$id": "838", + "json": { + "$id": "839", + "name": "domainName" + } + } + }, + { + "$id": "840", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "type": { + "$id": "841", + "kind": "constant", + "valueType": { + "$id": "842", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "PreferredPrimaryDomain", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy.type", + "serializationOptions": { + "$id": "843", + "json": { + "$id": "844", + "name": "type" + } + } + } + ] + }, + "RequiredDomainDistribution": { + "$id": "845", + "kind": "model", + "name": "ServicePlacementRequireDomainDistributionPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service where two replicas\nfrom the same partition should never be placed in the same fault or upgrade domain.\n\nWhile this is not common it can expose the service to an increased risk of concurrent failures\ndue to unplanned outages or other cases of subsequent/concurrent failures. As an example, consider\na case where replicas are deployed across different data center, with one replica per location.\nIn the event that one of the datacenters goes offline, normally the replica that was placed in that\ndatacenter will be packed into one of the remaining datacenters. If this is not desirable then this\npolicy should be set.", + "discriminatorValue": "RequiredDomainDistribution", + "decorators": [], + "baseModel": { + "$ref": "810" + }, + "properties": [ + { + "$id": "846", + "kind": "property", + "name": "domainName", + "serializedName": "domainName", + "doc": "The name of the domain that should used for placement as per this policy.", + "type": { + "$id": "847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy.domainName", + "serializationOptions": { + "$id": "848", + "json": { + "$id": "849", + "name": "domainName" + } + } + }, + { + "$id": "850", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "type": { + "$id": "851", + "kind": "constant", + "valueType": { + "$id": "852", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "RequiredDomainDistribution", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy.type", + "serializationOptions": { + "$id": "853", + "json": { + "$id": "854", + "name": "type" + } + } + } + ] + }, + "NonPartiallyPlaceService": { + "$id": "855", + "kind": "model", + "name": "ServicePlacementNonPartiallyPlaceServicePolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementNonPartiallyPlaceServicePolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "discriminatorValue": "NonPartiallyPlaceService", + "decorators": [], + "baseModel": { + "$ref": "810" + }, + "properties": [ + { + "$id": "856", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "857", + "kind": "constant", + "valueType": { + "$id": "858", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "NonPartiallyPlaceService", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementNonPartiallyPlaceServicePolicy.type", + "serializationOptions": { + "$id": "859", + "json": { + "$id": "860", + "name": "type" + } + } + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.servicePlacementPolicies", + "serializationOptions": { + "$id": "861", + "json": { + "$id": "862", + "name": "servicePlacementPolicies" + } + } + }, + { + "$id": "863", + "kind": "property", + "name": "defaultMoveCost", + "serializedName": "defaultMoveCost", + "doc": "Specifies the move cost for the service.", + "type": { + "$ref": "90" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.defaultMoveCost", + "serializationOptions": { + "$id": "864", + "json": { + "$id": "865", + "name": "defaultMoveCost" + } + } + }, + { + "$id": "866", + "kind": "property", + "name": "scalingPolicies", + "serializedName": "scalingPolicies", + "doc": "Scaling policies for this service.", + "type": { + "$id": "867", + "kind": "array", + "name": "ArrayScalingPolicy", + "valueType": { + "$id": "868", + "kind": "model", + "name": "ManagedServiceScalingPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies a metric to load balance a service during runtime.", + "decorators": [], + "properties": [ + { + "$id": "869", + "kind": "property", + "name": "scalingMechanism", + "serializedName": "scalingMechanism", + "doc": "Specifies the mechanism associated with this scaling policy", + "type": { + "$id": "870", + "kind": "model", + "name": "ManagedServiceScalingMechanism", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingMechanism", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the mechanism for performing a scaling operation.", + "decorators": [], + "discriminatorProperty": { + "$id": "871", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "type": { + "$ref": "100" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingMechanism.kind", + "serializationOptions": { + "$id": "872", + "json": { + "$id": "873", + "name": "kind" + } + } + }, + "properties": [ + { + "$ref": "871" + } + ], + "discriminatedSubtypes": { + "$id": "874", + "AddRemoveIncrementalNamedPartition": { + "$id": "875", + "kind": "model", + "name": "NamedPartitionAddOrRemoveScalingMechanism", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents a scaling mechanism for adding or removing named partitions of a stateless service. Partition names are in the format '0','1'...'N-1'.", + "discriminatorValue": "AddRemoveIncrementalNamedPartition", + "decorators": [], + "baseModel": { + "$ref": "870" + }, + "properties": [ + { + "$id": "876", + "kind": "property", + "name": "minPartitionCount", + "serializedName": "minPartitionCount", + "doc": "Minimum number of named partitions of the service.", + "type": { + "$id": "877", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism.minPartitionCount", + "serializationOptions": { + "$id": "878", + "json": { + "$id": "879", + "name": "minPartitionCount" + } + } + }, + { + "$id": "880", + "kind": "property", + "name": "maxPartitionCount", + "serializedName": "maxPartitionCount", + "doc": "Maximum number of named partitions of the service.", + "type": { + "$id": "881", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism.maxPartitionCount", + "serializationOptions": { + "$id": "882", + "json": { + "$id": "883", + "name": "maxPartitionCount" + } + } + }, + { + "$id": "884", + "kind": "property", + "name": "scaleIncrement", + "serializedName": "scaleIncrement", + "doc": "The number of instances to add or remove during a scaling operation.", + "type": { + "$id": "885", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism.scaleIncrement", + "serializationOptions": { + "$id": "886", + "json": { + "$id": "887", + "name": "scaleIncrement" + } + } + }, + { + "$id": "888", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Specifies the mechanism associated with this scaling policy.", + "type": { + "$id": "889", + "kind": "constant", + "valueType": { + "$id": "890", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "AddRemoveIncrementalNamedPartition", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism.kind", + "serializationOptions": { + "$id": "891", + "json": { + "$id": "892", + "name": "kind" + } + } + } + ] + }, + "ScalePartitionInstanceCount": { + "$id": "893", + "kind": "model", + "name": "PartitionInstanceCountScalingMechanism", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents a scaling mechanism for adding or removing instances of stateless service partition.", + "discriminatorValue": "ScalePartitionInstanceCount", + "decorators": [], + "baseModel": { + "$ref": "870" + }, + "properties": [ + { + "$id": "894", + "kind": "property", + "name": "minInstanceCount", + "serializedName": "minInstanceCount", + "doc": "Minimum number of instances of the partition.", + "type": { + "$id": "895", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism.minInstanceCount", + "serializationOptions": { + "$id": "896", + "json": { + "$id": "897", + "name": "minInstanceCount" + } + } + }, + { + "$id": "898", + "kind": "property", + "name": "maxInstanceCount", + "serializedName": "maxInstanceCount", + "doc": "Maximum number of instances of the partition.", + "type": { + "$id": "899", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism.maxInstanceCount", + "serializationOptions": { + "$id": "900", + "json": { + "$id": "901", + "name": "maxInstanceCount" + } + } + }, + { + "$id": "902", + "kind": "property", + "name": "scaleIncrement", + "serializedName": "scaleIncrement", + "doc": "The number of instances to add or remove during a scaling operation.", + "type": { + "$id": "903", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism.scaleIncrement", + "serializationOptions": { + "$id": "904", + "json": { + "$id": "905", + "name": "scaleIncrement" + } + } + }, + { + "$id": "906", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Specifies the mechanism associated with this scaling policy.", + "type": { + "$id": "907", + "kind": "constant", + "valueType": { + "$id": "908", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "ScalePartitionInstanceCount", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism.kind", + "serializationOptions": { + "$id": "909", + "json": { + "$id": "910", + "name": "kind" + } + } + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingPolicy.scalingMechanism", + "serializationOptions": { + "$id": "911", + "json": { + "$id": "912", + "name": "scalingMechanism" + } + } + }, + { + "$id": "913", + "kind": "property", + "name": "scalingTrigger", + "serializedName": "scalingTrigger", + "doc": "Specifies the trigger associated with this scaling policy.", + "type": { + "$id": "914", + "kind": "model", + "name": "ManagedServiceScalingTrigger", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingTrigger", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the trigger for performing a scaling operation.", + "decorators": [], + "discriminatorProperty": { + "$id": "915", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "type": { + "$ref": "106" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingTrigger.kind", + "serializationOptions": { + "$id": "916", + "json": { + "$id": "917", + "name": "kind" + } + } + }, + "properties": [ + { + "$ref": "915" + } + ], + "discriminatedSubtypes": { + "$id": "918", + "AveragePartitionLoadTrigger": { + "$id": "919", + "kind": "model", + "name": "AveragePartitionLoadScalingTrigger", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents a scaling trigger related to an average load of a metric/resource of a partition.", + "discriminatorValue": "AveragePartitionLoadTrigger", + "decorators": [], + "baseModel": { + "$ref": "914" + }, + "properties": [ + { + "$id": "920", + "kind": "property", + "name": "metricName", + "serializedName": "metricName", + "doc": "The name of the metric for which usage should be tracked.", + "type": { + "$id": "921", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.metricName", + "serializationOptions": { + "$id": "922", + "json": { + "$id": "923", + "name": "metricName" + } + } + }, + { + "$id": "924", + "kind": "property", + "name": "lowerLoadThreshold", + "serializedName": "lowerLoadThreshold", + "doc": "The lower limit of the load below which a scale in operation should be performed.", + "type": { + "$id": "925", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.lowerLoadThreshold", + "serializationOptions": { + "$id": "926", + "json": { + "$id": "927", + "name": "lowerLoadThreshold" + } + } + }, + { + "$id": "928", + "kind": "property", + "name": "upperLoadThreshold", + "serializedName": "upperLoadThreshold", + "doc": "The upper limit of the load beyond which a scale out operation should be performed.", + "type": { + "$id": "929", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.upperLoadThreshold", + "serializationOptions": { + "$id": "930", + "json": { + "$id": "931", + "name": "upperLoadThreshold" + } + } + }, + { + "$id": "932", + "kind": "property", + "name": "scaleInterval", + "serializedName": "scaleInterval", + "doc": "The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "933", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.scaleInterval", + "serializationOptions": { + "$id": "934", + "json": { + "$id": "935", + "name": "scaleInterval" + } + } + }, + { + "$id": "936", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Specifies the trigger associated with this scaling policy.", + "type": { + "$id": "937", + "kind": "constant", + "valueType": { + "$id": "938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "AveragePartitionLoadTrigger", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.kind", + "serializationOptions": { + "$id": "939", + "json": { + "$id": "940", + "name": "kind" + } + } + } + ] + }, + "AverageServiceLoadTrigger": { + "$id": "941", + "kind": "model", + "name": "AverageServiceLoadScalingTrigger", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents a scaling policy related to an average load of a metric/resource of a service.", + "discriminatorValue": "AverageServiceLoadTrigger", + "decorators": [], + "baseModel": { + "$ref": "914" + }, + "properties": [ + { + "$id": "942", + "kind": "property", + "name": "metricName", + "serializedName": "metricName", + "doc": "The name of the metric for which usage should be tracked.", + "type": { + "$id": "943", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.metricName", + "serializationOptions": { + "$id": "944", + "json": { + "$id": "945", + "name": "metricName" + } + } + }, + { + "$id": "946", + "kind": "property", + "name": "lowerLoadThreshold", + "serializedName": "lowerLoadThreshold", + "doc": "The lower limit of the load below which a scale in operation should be performed.", + "type": { + "$id": "947", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.lowerLoadThreshold", + "serializationOptions": { + "$id": "948", + "json": { + "$id": "949", + "name": "lowerLoadThreshold" + } + } + }, + { + "$id": "950", + "kind": "property", + "name": "upperLoadThreshold", + "serializedName": "upperLoadThreshold", + "doc": "The upper limit of the load beyond which a scale out operation should be performed.", + "type": { + "$id": "951", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.upperLoadThreshold", + "serializationOptions": { + "$id": "952", + "json": { + "$id": "953", + "name": "upperLoadThreshold" + } + } + }, + { + "$id": "954", + "kind": "property", + "name": "scaleInterval", + "serializedName": "scaleInterval", + "doc": "The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "955", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.scaleInterval", + "serializationOptions": { + "$id": "956", + "json": { + "$id": "957", + "name": "scaleInterval" + } + } + }, + { + "$id": "958", + "kind": "property", + "name": "useOnlyPrimaryLoad", + "serializedName": "useOnlyPrimaryLoad", + "doc": "Flag determines whether only the load of primary replica should be considered for scaling. If set to true, then trigger will only consider the load of primary replicas of stateful service. If set to false, trigger will consider load of all replicas. This parameter cannot be set to true for stateless service.", + "type": { + "$id": "959", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.useOnlyPrimaryLoad", + "serializationOptions": { + "$id": "960", + "json": { + "$id": "961", + "name": "useOnlyPrimaryLoad" + } + } + }, + { + "$id": "962", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Specifies the trigger associated with this scaling policy.", + "type": { + "$id": "963", + "kind": "constant", + "valueType": { + "$id": "964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "AverageServiceLoadTrigger", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.kind", + "serializationOptions": { + "$id": "965", + "json": { + "$id": "966", + "name": "kind" + } + } + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingPolicy.scalingTrigger", + "serializationOptions": { + "$id": "967", + "json": { + "$id": "968", + "name": "scalingTrigger" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.scalingPolicies", + "serializationOptions": { + "$id": "969", + "json": { + "$id": "970", + "name": "scalingPolicies" + } + } + } + ] + }, + "properties": [ + { + "$id": "971", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The current deployment or provisioning state, which only appears in the response", + "type": { + "$id": "972", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.provisioningState", + "serializationOptions": { + "$id": "973", + "json": { + "$id": "974", + "name": "provisioningState" + } + } + }, + { + "$ref": "764" + }, + { + "$id": "975", + "kind": "property", + "name": "serviceTypeName", + "serializedName": "serviceTypeName", + "doc": "The name of the service type", + "type": { + "$id": "976", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.serviceTypeName", + "serializationOptions": { + "$id": "977", + "json": { + "$id": "978", + "name": "serviceTypeName" + } + } + }, + { + "$id": "979", + "kind": "property", + "name": "partitionDescription", + "serializedName": "partitionDescription", + "doc": "Describes how the service is partitioned.", + "type": { + "$id": "980", + "kind": "model", + "name": "ManagedServicePartitionScheme", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Partition", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes how the service is partitioned.", + "decorators": [], + "discriminatorProperty": { + "$id": "981", + "kind": "property", + "name": "partitionScheme", + "serializedName": "partitionScheme", + "type": { + "$ref": "48" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Partition.partitionScheme", + "serializationOptions": { + "$id": "982", + "json": { + "$id": "983", + "name": "partitionScheme" + } + } + }, + "properties": [ + { + "$ref": "981" + } + ], + "discriminatedSubtypes": { + "$id": "984", + "UniformInt64Range": { + "$id": "985", + "kind": "model", + "name": "UniformInt64RangePartitionScheme", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a partitioning scheme where an integer range is allocated evenly across a number of partitions.", + "discriminatorValue": "UniformInt64Range", + "decorators": [], + "baseModel": { + "$ref": "980" + }, + "properties": [ + { + "$id": "986", + "kind": "property", + "name": "count", + "serializedName": "count", + "doc": "The number of partitions.", + "type": { + "$id": "987", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme.count", + "serializationOptions": { + "$id": "988", + "json": { + "$id": "989", + "name": "count" + } + } + }, + { + "$id": "990", + "kind": "property", + "name": "lowKey", + "serializedName": "lowKey", + "doc": "The lower bound of the partition key range that\nshould be split between the partition ‘Count’", + "type": { + "$id": "991", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme.lowKey", + "serializationOptions": { + "$id": "992", + "json": { + "$id": "993", + "name": "lowKey" + } + } + }, + { + "$id": "994", + "kind": "property", + "name": "highKey", + "serializedName": "highKey", + "doc": "The upper bound of the partition key range that\nshould be split between the partition ‘Count’", + "type": { + "$id": "995", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme.highKey", + "serializationOptions": { + "$id": "996", + "json": { + "$id": "997", + "name": "highKey" + } + } + }, + { + "$id": "998", + "kind": "property", + "name": "partitionScheme", + "serializedName": "partitionScheme", + "doc": "Specifies how the service is partitioned.", + "type": { + "$id": "999", + "kind": "constant", + "valueType": { + "$id": "1000", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "UniformInt64Range", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme.partitionScheme", + "serializationOptions": { + "$id": "1001", + "json": { + "$id": "1002", + "name": "partitionScheme" + } + } + } + ] + }, + "Singleton": { + "$id": "1003", + "kind": "model", + "name": "SingletonPartitionScheme", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SingletonPartitionScheme", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the partition scheme of a singleton-partitioned, or non-partitioned service.", + "discriminatorValue": "Singleton", + "decorators": [], + "baseModel": { + "$ref": "980" + }, + "properties": [ + { + "$id": "1004", + "kind": "property", + "name": "partitionScheme", + "serializedName": "partitionScheme", + "doc": "Specifies how the service is partitioned.", + "type": { + "$id": "1005", + "kind": "constant", + "valueType": { + "$id": "1006", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Singleton", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SingletonPartitionScheme.partitionScheme", + "serializationOptions": { + "$id": "1007", + "json": { + "$id": "1008", + "name": "partitionScheme" + } + } + } + ] + }, + "Named": { + "$id": "1009", + "kind": "model", + "name": "NamedPartitionScheme", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NamedPartitionScheme", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the named partition scheme of the service.", + "discriminatorValue": "Named", + "decorators": [], + "baseModel": { + "$ref": "980" + }, + "properties": [ + { + "$id": "1010", + "kind": "property", + "name": "names", + "serializedName": "names", + "doc": "Array for the names of the partitions.", + "type": { + "$id": "1011", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NamedPartitionScheme.names", + "serializationOptions": { + "$id": "1013", + "json": { + "$id": "1014", + "name": "names" + } + } + }, + { + "$id": "1015", + "kind": "property", + "name": "partitionScheme", + "serializedName": "partitionScheme", + "doc": "Specifies how the service is partitioned.", + "type": { + "$id": "1016", + "kind": "constant", + "valueType": { + "$id": "1017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Named", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NamedPartitionScheme.partitionScheme", + "serializationOptions": { + "$id": "1018", + "json": { + "$id": "1019", + "name": "partitionScheme" + } + } + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.partitionDescription", + "serializationOptions": { + "$id": "1020", + "json": { + "$id": "1021", + "name": "partitionDescription" + } + } + }, + { + "$id": "1022", + "kind": "property", + "name": "servicePackageActivationMode", + "serializedName": "servicePackageActivationMode", + "doc": "The activation Mode of the service package", + "type": { + "$ref": "56" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.servicePackageActivationMode", + "serializationOptions": { + "$id": "1023", + "json": { + "$id": "1024", + "name": "servicePackageActivationMode" + } + } + }, + { + "$id": "1025", + "kind": "property", + "name": "serviceDnsName", + "serializedName": "serviceDnsName", + "doc": "Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP).\nWhen updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name.\nWhen removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable.", + "type": { + "$id": "1026", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.serviceDnsName", + "serializationOptions": { + "$id": "1027", + "json": { + "$id": "1028", + "name": "serviceDnsName" + } + } + } + ], + "discriminatedSubtypes": { + "$id": "1029", + "Stateful": { + "$id": "1030", + "kind": "model", + "name": "StatefulServiceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The properties of a stateful service resource.", + "discriminatorValue": "Stateful", + "decorators": [], + "baseModel": { + "$ref": "763" + }, + "properties": [ + { + "$id": "1031", + "kind": "property", + "name": "hasPersistedState", + "serializedName": "hasPersistedState", + "doc": "A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false.", + "type": { + "$id": "1032", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.hasPersistedState", + "serializationOptions": { + "$id": "1033", + "json": { + "$id": "1034", + "name": "hasPersistedState" + } + } + }, + { + "$id": "1035", + "kind": "property", + "name": "targetReplicaSetSize", + "serializedName": "targetReplicaSetSize", + "doc": "The target replica set size as a number.", + "type": { + "$id": "1036", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.targetReplicaSetSize", + "serializationOptions": { + "$id": "1037", + "json": { + "$id": "1038", + "name": "targetReplicaSetSize" + } + } + }, + { + "$id": "1039", + "kind": "property", + "name": "minReplicaSetSize", + "serializedName": "minReplicaSetSize", + "doc": "The minimum replica set size as a number.", + "type": { + "$id": "1040", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.minReplicaSetSize", + "serializationOptions": { + "$id": "1041", + "json": { + "$id": "1042", + "name": "minReplicaSetSize" + } + } + }, + { + "$id": "1043", + "kind": "property", + "name": "replicaRestartWaitDuration", + "serializedName": "replicaRestartWaitDuration", + "doc": "The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "1044", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.replicaRestartWaitDuration", + "serializationOptions": { + "$id": "1045", + "json": { + "$id": "1046", + "name": "replicaRestartWaitDuration" + } + } + }, + { + "$id": "1047", + "kind": "property", + "name": "quorumLossWaitDuration", + "serializedName": "quorumLossWaitDuration", + "doc": "The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "1048", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.quorumLossWaitDuration", + "serializationOptions": { + "$id": "1049", + "json": { + "$id": "1050", + "name": "quorumLossWaitDuration" + } + } + }, + { + "$id": "1051", + "kind": "property", + "name": "standByReplicaKeepDuration", + "serializedName": "standByReplicaKeepDuration", + "doc": "The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "1052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.standByReplicaKeepDuration", + "serializationOptions": { + "$id": "1053", + "json": { + "$id": "1054", + "name": "standByReplicaKeepDuration" + } + } + }, + { + "$id": "1055", + "kind": "property", + "name": "servicePlacementTimeLimit", + "serializedName": "servicePlacementTimeLimit", + "doc": "The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "1056", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.servicePlacementTimeLimit", + "serializationOptions": { + "$id": "1057", + "json": { + "$id": "1058", + "name": "servicePlacementTimeLimit" + } + } + }, + { + "$id": "1059", + "kind": "property", + "name": "serviceKind", + "serializedName": "serviceKind", + "doc": "The kind of service (Stateless or Stateful).", + "type": { + "$id": "1060", + "kind": "constant", + "valueType": { + "$id": "1061", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Stateful", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.serviceKind", + "serializationOptions": { + "$id": "1062", + "json": { + "$id": "1063", + "name": "serviceKind" + } + } + } + ] + }, + "Stateless": { + "$id": "1064", + "kind": "model", + "name": "StatelessServiceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The properties of a stateless service resource.", + "discriminatorValue": "Stateless", + "decorators": [], + "baseModel": { + "$ref": "763" + }, + "properties": [ + { + "$id": "1065", + "kind": "property", + "name": "instanceCount", + "serializedName": "instanceCount", + "doc": "The instance count.", + "type": { + "$id": "1066", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties.instanceCount", + "serializationOptions": { + "$id": "1067", + "json": { + "$id": "1068", + "name": "instanceCount" + } + } + }, + { + "$id": "1069", + "kind": "property", + "name": "minInstanceCount", + "serializedName": "minInstanceCount", + "doc": "MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.", + "type": { + "$id": "1070", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties.minInstanceCount", + "serializationOptions": { + "$id": "1071", + "json": { + "$id": "1072", + "name": "minInstanceCount" + } + } + }, + { + "$id": "1073", + "kind": "property", + "name": "minInstancePercentage", + "serializedName": "minInstancePercentage", + "doc": "MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.", + "type": { + "$id": "1074", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties.minInstancePercentage", + "serializationOptions": { + "$id": "1075", + "json": { + "$id": "1076", + "name": "minInstancePercentage" + } + } + }, + { + "$id": "1077", + "kind": "property", + "name": "serviceKind", + "serializedName": "serviceKind", + "doc": "The kind of service (Stateless or Stateful).", + "type": { + "$id": "1078", + "kind": "constant", + "valueType": { + "$id": "1079", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Stateless", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties.serviceKind", + "serializationOptions": { + "$id": "1080", + "json": { + "$id": "1081", + "name": "serviceKind" + } + } + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource.properties", + "serializationOptions": { + "$id": "1082", + "json": { + "$id": "1083", + "name": "properties" + } + } + }, + { + "$id": "1084", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "1085", + "kind": "dict", + "keyType": { + "$id": "1086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1087", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource.tags", + "serializationOptions": { + "$id": "1088", + "json": { + "$id": "1089", + "name": "tags" + } + } + }, + { + "$id": "1090", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "1091", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource.location", + "serializationOptions": { + "$id": "1092", + "json": { + "$id": "1093", + "name": "location" + } + } + } + ] + }, + { + "$ref": "763" + }, + { + "$ref": "980" + }, + { + "$ref": "985" + }, + { + "$ref": "1003" + }, + { + "$ref": "1009" + }, + { + "$ref": "767" + }, + { + "$ref": "774" + }, + { + "$ref": "786" + }, + { + "$ref": "810" + }, + { + "$ref": "815" + }, + { + "$ref": "825" + }, + { + "$ref": "835" + }, + { + "$ref": "845" + }, + { + "$ref": "855" + }, + { + "$ref": "868" + }, + { + "$ref": "870" + }, + { + "$ref": "875" + }, + { + "$ref": "893" + }, + { + "$ref": "914" + }, + { + "$ref": "919" + }, + { + "$ref": "941" + }, + { + "$ref": "1030" + }, + { + "$ref": "1064" + }, + { + "$id": "1094", + "kind": "model", + "name": "ServiceUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceUpdateParameters", + "usage": "Input,Json", + "doc": "Service update request", + "decorators": [], + "properties": [ + { + "$id": "1095", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Service update parameters", + "type": { + "$id": "1096", + "kind": "dict", + "keyType": { + "$id": "1097", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1098", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceUpdateParameters.tags", + "serializationOptions": { + "$id": "1099", + "json": { + "$id": "1100", + "name": "tags" + } + } + } + ] + }, + { + "$id": "1101", + "kind": "model", + "name": "ServiceResourceList", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceList", + "usage": "Output,Json", + "doc": "The list of service resources.", + "decorators": [], + "properties": [ + { + "$id": "1102", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ServiceResource items on this page", + "type": { + "$id": "1103", + "kind": "array", + "name": "ArrayServiceResource", + "valueType": { + "$ref": "761" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceList.value", + "serializationOptions": { + "$id": "1104", + "json": { + "$id": "1105", + "name": "value" + } + } + }, + { + "$id": "1106", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1107", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1108", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceList.nextLink", + "serializationOptions": { + "$id": "1109", + "json": { + "$id": "1110", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1111", + "kind": "model", + "name": "ServiceFabricManagedClusterVersion", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult", + "usage": "Output,Json", + "doc": "The result of the Service Fabric runtime versions", + "decorators": [], + "properties": [ + { + "$id": "1112", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The identification of the result", + "type": { + "$id": "1113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult.id", + "serializationOptions": { + "$id": "1114", + "json": { + "$id": "1115", + "name": "id" + } + } + }, + { + "$id": "1116", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the result", + "type": { + "$id": "1117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult.name", + "serializationOptions": { + "$id": "1118", + "json": { + "$id": "1119", + "name": "name" + } + } + }, + { + "$id": "1120", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The result resource type", + "type": { + "$id": "1121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult.type", + "serializationOptions": { + "$id": "1122", + "json": { + "$id": "1123", + "name": "type" + } + } + }, + { + "$id": "1124", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The detail of the Service Fabric runtime version result", + "type": { + "$id": "1125", + "kind": "model", + "name": "ManagedClusterVersionDetails", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionDetails", + "usage": "Output,Json", + "doc": "The detail of the Service Fabric runtime version result", + "decorators": [], + "properties": [ + { + "$id": "1126", + "kind": "property", + "name": "clusterCodeVersion", + "serializedName": "clusterCodeVersion", + "doc": "The Service Fabric runtime version of the cluster.", + "type": { + "$id": "1127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionDetails.clusterCodeVersion", + "serializationOptions": { + "$id": "1128", + "json": { + "$id": "1129", + "name": "clusterCodeVersion" + } + } + }, + { + "$id": "1130", + "kind": "property", + "name": "VersionSupportExpireOn", + "serializedName": "supportExpiryUtc", + "doc": "The date of expiry of support of the version.", + "type": { + "$id": "1131", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionDetails.supportExpiryUtc", + "serializationOptions": { + "$id": "1133", + "json": { + "$id": "1134", + "name": "supportExpiryUtc" + } + } + }, + { + "$id": "1135", + "kind": "property", + "name": "osType", + "serializedName": "osType", + "doc": "Cluster operating system, the default will be Windows", + "type": { + "$ref": "112" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionDetails.osType", + "serializationOptions": { + "$id": "1136", + "json": { + "$id": "1137", + "name": "osType" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult.properties", + "serializationOptions": { + "$id": "1138", + "json": { + "$id": "1139", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "1125" + }, + { + "$id": "1140", + "kind": "model", + "name": "ServiceFabricManagedUnsupportedVmSize", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize", + "usage": "Output,Json", + "doc": "Describes a VM Sizes.", + "decorators": [], + "properties": [ + { + "$id": "1141", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "VM Size properties.", + "type": { + "$id": "1142", + "kind": "model", + "name": "VMSize", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSize", + "usage": "Output,Json", + "doc": "VM Sizes properties.", + "decorators": [], + "properties": [ + { + "$id": "1143", + "kind": "property", + "name": "size", + "serializedName": "size", + "doc": "VM Size name.", + "type": { + "$id": "1144", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSize.size", + "serializationOptions": { + "$id": "1145", + "json": { + "$id": "1146", + "name": "size" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize.properties", + "serializationOptions": { + "$id": "1147", + "json": { + "$id": "1148", + "name": "properties" + } + } + }, + { + "$id": "1149", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "VM Size id.", + "type": { + "$id": "1150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize.id", + "serializationOptions": { + "$id": "1151", + "json": { + "$id": "1152", + "name": "id" + } + } + }, + { + "$id": "1153", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "VM Size name.", + "type": { + "$id": "1154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize.name", + "serializationOptions": { + "$id": "1155", + "json": { + "$id": "1156", + "name": "name" + } + } + }, + { + "$id": "1157", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "VM Size type.", + "type": { + "$id": "1158", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize.type", + "serializationOptions": { + "$id": "1159", + "json": { + "$id": "1160", + "name": "type" + } + } + } + ] + }, + { + "$ref": "1142" + }, + { + "$id": "1161", + "kind": "model", + "name": "ManagedVMSizesResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSizesResult", + "usage": "Output,Json", + "doc": "Describes the result of the request to list Managed VM Sizes for Service Fabric Managed Clusters.", + "decorators": [], + "properties": [ + { + "$id": "1162", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ManagedVMSize items on this page", + "type": { + "$id": "1163", + "kind": "array", + "name": "ArrayManagedVmSize", + "valueType": { + "$ref": "1140" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSizesResult.value", + "serializationOptions": { + "$id": "1164", + "json": { + "$id": "1165", + "name": "value" + } + } + }, + { + "$id": "1166", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1167", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1168", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSizesResult.nextLink", + "serializationOptions": { + "$id": "1169", + "json": { + "$id": "1170", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1171", + "kind": "model", + "name": "ServiceFabricManagedCluster", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The managed cluster resource", + "decorators": [], + "baseModel": { + "$id": "1172", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$ref": "443" + }, + "properties": [ + { + "$id": "1173", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "1174", + "kind": "dict", + "keyType": { + "$id": "1175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1176", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", + "serializationOptions": { + "$id": "1177", + "json": { + "$id": "1178", + "name": "tags" + } + } + }, + { + "$id": "1179", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "1180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", + "serializationOptions": { + "$id": "1181", + "json": { + "$id": "1182", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "1183", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The managed cluster resource properties", + "type": { + "$id": "1184", + "kind": "model", + "name": "ManagedClusterProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the managed cluster resource properties.", + "decorators": [], + "properties": [ + { + "$id": "1185", + "kind": "property", + "name": "dnsName", + "serializedName": "dnsName", + "doc": "The cluster dns name.", + "type": { + "$id": "1186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.dnsName", + "serializationOptions": { + "$id": "1187", + "json": { + "$id": "1188", + "name": "dnsName" + } + } + }, + { + "$id": "1189", + "kind": "property", + "name": "fqdn", + "serializedName": "fqdn", + "doc": "The fully qualified domain name associated with the public load balancer of the cluster.", + "type": { + "$id": "1190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.fqdn", + "serializationOptions": { + "$id": "1191", + "json": { + "$id": "1192", + "name": "fqdn" + } + } + }, + { + "$id": "1193", + "kind": "property", + "name": "ipv4Address", + "serializedName": "ipv4Address", + "doc": "The IPv4 address associated with the public load balancer of the cluster.", + "type": { + "$id": "1194", + "kind": "string", + "name": "ipV4Address", + "crossLanguageDefinitionId": "Azure.Core.ipV4Address", + "baseType": { + "$id": "1195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.ipv4Address", + "serializationOptions": { + "$id": "1196", + "json": { + "$id": "1197", + "name": "ipv4Address" + } + } + }, + { + "$id": "1198", + "kind": "property", + "name": "-|uuid", + "serializedName": "clusterId", + "doc": "A service generated unique identifier for the cluster resource.", + "type": { + "$id": "1199", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1200", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterId", + "serializationOptions": { + "$id": "1201", + "json": { + "$id": "1202", + "name": "clusterId" + } + } + }, + { + "$id": "1203", + "kind": "property", + "name": "clusterState", + "serializedName": "clusterState", + "doc": "The current state of the cluster.", + "type": { + "$ref": "120" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterState", + "serializationOptions": { + "$id": "1204", + "json": { + "$id": "1205", + "name": "clusterState" + } + } + }, + { + "$id": "1206", + "kind": "property", + "name": "-|any", + "serializedName": "clusterCertificateThumbprints", + "doc": "List of thumbprints of the cluster certificates.", + "type": { + "$id": "1207", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1208", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterCertificateThumbprints", + "serializationOptions": { + "$id": "1209", + "json": { + "$id": "1210", + "name": "clusterCertificateThumbprints" + } + } + }, + { + "$id": "1211", + "kind": "property", + "name": "clientConnectionPort", + "serializedName": "clientConnectionPort", + "doc": "The port used for client connections to the cluster.", + "type": { + "$id": "1212", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clientConnectionPort", + "serializationOptions": { + "$id": "1213", + "json": { + "$id": "1214", + "name": "clientConnectionPort" + } + } + }, + { + "$id": "1215", + "kind": "property", + "name": "httpGatewayConnectionPort", + "serializedName": "httpGatewayConnectionPort", + "doc": "The port used for HTTP connections to the cluster.", + "type": { + "$id": "1216", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.httpGatewayConnectionPort", + "serializationOptions": { + "$id": "1217", + "json": { + "$id": "1218", + "name": "httpGatewayConnectionPort" + } + } + }, + { + "$id": "1219", + "kind": "property", + "name": "adminUserName", + "serializedName": "adminUserName", + "doc": "VM admin user name.", + "type": { + "$id": "1220", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.adminUserName", + "serializationOptions": { + "$id": "1221", + "json": { + "$id": "1222", + "name": "adminUserName" + } + } + }, + { + "$id": "1223", + "kind": "property", + "name": "adminPassword", + "serializedName": "adminPassword", + "doc": "VM admin user password.", + "type": { + "$id": "1224", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.adminPassword", + "serializationOptions": { + "$id": "1225", + "json": { + "$id": "1226", + "name": "adminPassword" + } + } + }, + { + "$id": "1227", + "kind": "property", + "name": "loadBalancingRules", + "serializedName": "loadBalancingRules", + "doc": "Load balancing rules that are applied to the public load balancer of the cluster.", + "type": { + "$id": "1228", + "kind": "array", + "name": "ArrayLoadBalancingRule", + "valueType": { + "$id": "1229", + "kind": "model", + "name": "ManagedClusterLoadBalancingRule", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a load balancing rule.", + "decorators": [], + "properties": [ + { + "$id": "1230", + "kind": "property", + "name": "frontendPort", + "serializedName": "frontendPort", + "doc": "The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 1 and 65534.", + "type": { + "$id": "1231", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.frontendPort", + "serializationOptions": { + "$id": "1232", + "json": { + "$id": "1233", + "name": "frontendPort" + } + } + }, + { + "$id": "1234", + "kind": "property", + "name": "backendPort", + "serializedName": "backendPort", + "doc": "The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.", + "type": { + "$id": "1235", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.backendPort", + "serializationOptions": { + "$id": "1236", + "json": { + "$id": "1237", + "name": "backendPort" + } + } + }, + { + "$id": "1238", + "kind": "property", + "name": "protocol", + "serializedName": "protocol", + "doc": "The reference to the transport protocol used by the load balancing rule.", + "type": { + "$ref": "134" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.protocol", + "serializationOptions": { + "$id": "1239", + "json": { + "$id": "1240", + "name": "protocol" + } + } + }, + { + "$id": "1241", + "kind": "property", + "name": "probePort", + "serializedName": "probePort", + "doc": "The prob port used by the load balancing rule. Acceptable values are between 1 and 65535.", + "type": { + "$id": "1242", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.probePort", + "serializationOptions": { + "$id": "1243", + "json": { + "$id": "1244", + "name": "probePort" + } + } + }, + { + "$id": "1245", + "kind": "property", + "name": "probeProtocol", + "serializedName": "probeProtocol", + "doc": "the reference to the load balancer probe used by the load balancing rule.", + "type": { + "$ref": "140" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.probeProtocol", + "serializationOptions": { + "$id": "1246", + "json": { + "$id": "1247", + "name": "probeProtocol" + } + } + }, + { + "$id": "1248", + "kind": "property", + "name": "probeRequestPath", + "serializedName": "probeRequestPath", + "doc": "The probe request path. Only supported for HTTP/HTTPS probes.", + "type": { + "$id": "1249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.probeRequestPath", + "serializationOptions": { + "$id": "1250", + "json": { + "$id": "1251", + "name": "probeRequestPath" + } + } + }, + { + "$id": "1252", + "kind": "property", + "name": "loadDistribution", + "serializedName": "loadDistribution", + "doc": "The load distribution policy for this rule.", + "type": { + "$id": "1253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.loadDistribution", + "serializationOptions": { + "$id": "1254", + "json": { + "$id": "1255", + "name": "loadDistribution" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.loadBalancingRules", + "serializationOptions": { + "$id": "1256", + "json": { + "$id": "1257", + "name": "loadBalancingRules" + } + } + }, + { + "$id": "1258", + "kind": "property", + "name": "IsRdpAccessAllowed", + "serializedName": "allowRdpAccess", + "doc": "Setting this to true enables RDP access to the VM. The default NSG rule opens RDP port to Internet which can be overridden with custom Network Security Rules. The default value for this setting is false.", + "type": { + "$id": "1259", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.allowRdpAccess", + "serializationOptions": { + "$id": "1260", + "json": { + "$id": "1261", + "name": "allowRdpAccess" + } + } + }, + { + "$id": "1262", + "kind": "property", + "name": "networkSecurityRules", + "serializedName": "networkSecurityRules", + "doc": "Custom Network Security Rules that are applied to the Virtual Network of the cluster.", + "type": { + "$id": "1263", + "kind": "array", + "name": "ArrayNetworkSecurityRule", + "valueType": { + "$id": "1264", + "kind": "model", + "name": "ServiceFabricManagedNetworkSecurityRule", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a network security rule.", + "decorators": [], + "properties": [ + { + "$id": "1265", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Network security rule name.", + "type": { + "$id": "1266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.name", + "serializationOptions": { + "$id": "1267", + "json": { + "$id": "1268", + "name": "name" + } + } + }, + { + "$id": "1269", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Network security rule description.", + "type": { + "$id": "1270", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.description", + "serializationOptions": { + "$id": "1271", + "json": { + "$id": "1272", + "name": "description" + } + } + }, + { + "$id": "1273", + "kind": "property", + "name": "protocol", + "serializedName": "protocol", + "doc": "Network protocol this rule applies to.", + "type": { + "$ref": "148" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.protocol", + "serializationOptions": { + "$id": "1274", + "json": { + "$id": "1275", + "name": "protocol" + } + } + }, + { + "$id": "1276", + "kind": "property", + "name": "sourceAddressPrefixes", + "serializedName": "sourceAddressPrefixes", + "doc": "The CIDR or source IP ranges.", + "type": { + "$id": "1277", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.sourceAddressPrefixes", + "serializationOptions": { + "$id": "1279", + "json": { + "$id": "1280", + "name": "sourceAddressPrefixes" + } + } + }, + { + "$id": "1281", + "kind": "property", + "name": "destinationAddressPrefixes", + "serializedName": "destinationAddressPrefixes", + "doc": "The destination address prefixes. CIDR or destination IP ranges.", + "type": { + "$id": "1282", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.destinationAddressPrefixes", + "serializationOptions": { + "$id": "1284", + "json": { + "$id": "1285", + "name": "destinationAddressPrefixes" + } + } + }, + { + "$id": "1286", + "kind": "property", + "name": "sourcePortRanges", + "serializedName": "sourcePortRanges", + "doc": "The source port ranges.", + "type": { + "$id": "1287", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.sourcePortRanges", + "serializationOptions": { + "$id": "1289", + "json": { + "$id": "1290", + "name": "sourcePortRanges" + } + } + }, + { + "$id": "1291", + "kind": "property", + "name": "destinationPortRanges", + "serializedName": "destinationPortRanges", + "doc": "The destination port ranges.", + "type": { + "$id": "1292", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.destinationPortRanges", + "serializationOptions": { + "$id": "1294", + "json": { + "$id": "1295", + "name": "destinationPortRanges" + } + } + }, + { + "$id": "1296", + "kind": "property", + "name": "sourceAddressPrefix", + "serializedName": "sourceAddressPrefix", + "doc": "The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.", + "type": { + "$id": "1297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.sourceAddressPrefix", + "serializationOptions": { + "$id": "1298", + "json": { + "$id": "1299", + "name": "sourceAddressPrefix" + } + } + }, + { + "$id": "1300", + "kind": "property", + "name": "destinationAddressPrefix", + "serializedName": "destinationAddressPrefix", + "doc": "The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.", + "type": { + "$id": "1301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.destinationAddressPrefix", + "serializationOptions": { + "$id": "1302", + "json": { + "$id": "1303", + "name": "destinationAddressPrefix" + } + } + }, + { + "$id": "1304", + "kind": "property", + "name": "sourcePortRange", + "serializedName": "sourcePortRange", + "doc": "The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.", + "type": { + "$id": "1305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.sourcePortRange", + "serializationOptions": { + "$id": "1306", + "json": { + "$id": "1307", + "name": "sourcePortRange" + } + } + }, + { + "$id": "1308", + "kind": "property", + "name": "destinationPortRange", + "serializedName": "destinationPortRange", + "doc": "he destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.", + "type": { + "$id": "1309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.destinationPortRange", + "serializationOptions": { + "$id": "1310", + "json": { + "$id": "1311", + "name": "destinationPortRange" + } + } + }, + { + "$id": "1312", + "kind": "property", + "name": "access", + "serializedName": "access", + "doc": "The network traffic is allowed or denied.", + "type": { + "$ref": "164" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.access", + "serializationOptions": { + "$id": "1313", + "json": { + "$id": "1314", + "name": "access" + } + } + }, + { + "$id": "1315", + "kind": "property", + "name": "priority", + "serializedName": "priority", + "doc": "The priority of the rule. The value can be in the range 1000 to 3000. Values outside this range are reserved for Service Fabric ManagerCluster Resource Provider. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.", + "type": { + "$id": "1316", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.priority", + "serializationOptions": { + "$id": "1317", + "json": { + "$id": "1318", + "name": "priority" + } + } + }, + { + "$id": "1319", + "kind": "property", + "name": "direction", + "serializedName": "direction", + "doc": "Network security rule direction.", + "type": { + "$ref": "170" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.direction", + "serializationOptions": { + "$id": "1320", + "json": { + "$id": "1321", + "name": "direction" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.networkSecurityRules", + "serializationOptions": { + "$id": "1322", + "json": { + "$id": "1323", + "name": "networkSecurityRules" + } + } + }, + { + "$id": "1324", + "kind": "property", + "name": "clients", + "serializedName": "clients", + "doc": "Client certificates that are allowed to manage the cluster.", + "type": { + "$id": "1325", + "kind": "array", + "name": "ArrayClientCertificate", + "valueType": { + "$id": "1326", + "kind": "model", + "name": "ManagedClusterClientCertificate", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Client certificate definition.", + "decorators": [], + "properties": [ + { + "$id": "1327", + "kind": "property", + "name": "isAdmin", + "serializedName": "isAdmin", + "doc": "Indicates if the client certificate has admin access to the cluster. Non admin clients can perform only read only operations on the cluster.", + "type": { + "$id": "1328", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate.isAdmin", + "serializationOptions": { + "$id": "1329", + "json": { + "$id": "1330", + "name": "isAdmin" + } + } + }, + { + "$id": "1331", + "kind": "property", + "name": "thumbprint", + "serializedName": "thumbprint", + "doc": "Certificate thumbprint.", + "type": { + "$id": "1332", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate.thumbprint", + "serializationOptions": { + "$id": "1333", + "json": { + "$id": "1334", + "name": "thumbprint" + } + } + }, + { + "$id": "1335", + "kind": "property", + "name": "commonName", + "serializedName": "commonName", + "doc": "Certificate common name.", + "type": { + "$id": "1336", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate.commonName", + "serializationOptions": { + "$id": "1337", + "json": { + "$id": "1338", + "name": "commonName" + } + } + }, + { + "$id": "1339", + "kind": "property", + "name": "issuerThumbprint", + "serializedName": "issuerThumbprint", + "doc": "Issuer thumbprint for the certificate. Only used together with CommonName.", + "type": { + "$id": "1340", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate.issuerThumbprint", + "serializationOptions": { + "$id": "1341", + "json": { + "$id": "1342", + "name": "issuerThumbprint" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clients", + "serializationOptions": { + "$id": "1343", + "json": { + "$id": "1344", + "name": "clients" + } + } + }, + { + "$id": "1345", + "kind": "property", + "name": "azureActiveDirectory", + "serializedName": "azureActiveDirectory", + "doc": "The AAD authentication settings of the cluster.", + "type": { + "$id": "1346", + "kind": "model", + "name": "ManagedClusterAzureActiveDirectory", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AzureActiveDirectory", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The settings to enable AAD authentication on the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1347", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "Azure active directory tenant id.", + "type": { + "$id": "1348", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AzureActiveDirectory.tenantId", + "serializationOptions": { + "$id": "1350", + "json": { + "$id": "1351", + "name": "tenantId" + } + } + }, + { + "$id": "1352", + "kind": "property", + "name": "clusterApplication", + "serializedName": "clusterApplication", + "doc": "Azure active directory cluster application id.", + "type": { + "$id": "1353", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AzureActiveDirectory.clusterApplication", + "serializationOptions": { + "$id": "1354", + "json": { + "$id": "1355", + "name": "clusterApplication" + } + } + }, + { + "$id": "1356", + "kind": "property", + "name": "clientApplication", + "serializedName": "clientApplication", + "doc": "Azure active directory client application id.", + "type": { + "$id": "1357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AzureActiveDirectory.clientApplication", + "serializationOptions": { + "$id": "1358", + "json": { + "$id": "1359", + "name": "clientApplication" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.azureActiveDirectory", + "serializationOptions": { + "$id": "1360", + "json": { + "$id": "1361", + "name": "azureActiveDirectory" + } + } + }, + { + "$id": "1362", + "kind": "property", + "name": "fabricSettings", + "serializedName": "fabricSettings", + "doc": "The list of custom fabric settings to configure the cluster.", + "type": { + "$id": "1363", + "kind": "array", + "name": "ArraySettingsSectionDescription", + "valueType": { + "$id": "1364", + "kind": "model", + "name": "ClusterFabricSettingsSection", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsSectionDescription", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a section in the fabric settings of the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1365", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The section name of the fabric settings.", + "type": { + "$id": "1366", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsSectionDescription.name", + "serializationOptions": { + "$id": "1367", + "json": { + "$id": "1368", + "name": "name" + } + } + }, + { + "$id": "1369", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "The collection of parameters in the section.", + "type": { + "$id": "1370", + "kind": "array", + "name": "ArraySettingsParameterDescription", + "valueType": { + "$id": "1371", + "kind": "model", + "name": "ClusterFabricSettingsParameterDescription", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsParameterDescription", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a parameter in fabric settings of the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1372", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The parameter name of fabric setting.", + "type": { + "$id": "1373", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsParameterDescription.name", + "serializationOptions": { + "$id": "1374", + "json": { + "$id": "1375", + "name": "name" + } + } + }, + { + "$id": "1376", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The parameter value of fabric setting.", + "type": { + "$id": "1377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsParameterDescription.value", + "serializationOptions": { + "$id": "1378", + "json": { + "$id": "1379", + "name": "value" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsSectionDescription.parameters", + "serializationOptions": { + "$id": "1380", + "json": { + "$id": "1381", + "name": "parameters" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.fabricSettings", + "serializationOptions": { + "$id": "1382", + "json": { + "$id": "1383", + "name": "fabricSettings" + } + } + }, + { + "$id": "1384", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state of the managed cluster resource.", + "type": { + "$ref": "176" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.provisioningState", + "serializationOptions": { + "$id": "1385", + "json": { + "$id": "1386", + "name": "provisioningState" + } + } + }, + { + "$id": "1387", + "kind": "property", + "name": "clusterCodeVersion", + "serializedName": "clusterCodeVersion", + "doc": "The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**.", + "type": { + "$id": "1388", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterCodeVersion", + "serializationOptions": { + "$id": "1389", + "json": { + "$id": "1390", + "name": "clusterCodeVersion" + } + } + }, + { + "$id": "1391", + "kind": "property", + "name": "clusterUpgradeMode", + "serializedName": "clusterUpgradeMode", + "doc": "The upgrade mode of the cluster when new Service Fabric runtime version is available.", + "type": { + "$ref": "198" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterUpgradeMode", + "serializationOptions": { + "$id": "1392", + "json": { + "$id": "1393", + "name": "clusterUpgradeMode" + } + } + }, + { + "$id": "1394", + "kind": "property", + "name": "clusterUpgradeCadence", + "serializedName": "clusterUpgradeCadence", + "doc": "Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'.", + "type": { + "$ref": "204" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterUpgradeCadence", + "serializationOptions": { + "$id": "1395", + "json": { + "$id": "1396", + "name": "clusterUpgradeCadence" + } + } + }, + { + "$id": "1397", + "kind": "property", + "name": "AddOnFeatures", + "serializedName": "addonFeatures", + "doc": "List of add-on features to enable on the cluster.", + "type": { + "$id": "1398", + "kind": "array", + "name": "ArrayManagedClusterAddOnFeature", + "valueType": { + "$ref": "212" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.addonFeatures", + "serializationOptions": { + "$id": "1399", + "json": { + "$id": "1400", + "name": "addonFeatures" + } + } + }, + { + "$id": "1401", + "kind": "property", + "name": "IsAutoOSUpgradeEnabled", + "serializedName": "enableAutoOSUpgrade", + "doc": "Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for this setting is false.", + "type": { + "$id": "1402", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.enableAutoOSUpgrade", + "serializationOptions": { + "$id": "1403", + "json": { + "$id": "1404", + "name": "enableAutoOSUpgrade" + } + } + }, + { + "$id": "1405", + "kind": "property", + "name": "HasZoneResiliency", + "serializedName": "zonalResiliency", + "doc": "Indicates if the cluster has zone resiliency.", + "type": { + "$id": "1406", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.zonalResiliency", + "serializationOptions": { + "$id": "1407", + "json": { + "$id": "1408", + "name": "zonalResiliency" + } + } + }, + { + "$id": "1409", + "kind": "property", + "name": "applicationTypeVersionsCleanupPolicy", + "serializedName": "applicationTypeVersionsCleanupPolicy", + "doc": "The policy used to clean up unused versions.", + "type": { + "$id": "1410", + "kind": "model", + "name": "ApplicationTypeVersionsCleanupPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionsCleanupPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The policy used to clean up unused versions. When the policy is not specified explicitly, the default unused application versions to keep will be 3.", + "decorators": [], + "properties": [ + { + "$id": "1411", + "kind": "property", + "name": "maxUnusedVersionsToKeep", + "serializedName": "maxUnusedVersionsToKeep", + "doc": "Number of unused versions per application type to keep.", + "type": { + "$id": "1412", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionsCleanupPolicy.maxUnusedVersionsToKeep", + "serializationOptions": { + "$id": "1413", + "json": { + "$id": "1414", + "name": "maxUnusedVersionsToKeep" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.applicationTypeVersionsCleanupPolicy", + "serializationOptions": { + "$id": "1415", + "json": { + "$id": "1416", + "name": "applicationTypeVersionsCleanupPolicy" + } + } + }, + { + "$id": "1417", + "kind": "property", + "name": "IsIPv6Enabled", + "serializedName": "enableIpv6", + "doc": "Setting this to true creates IPv6 address space for the default VNet used by the cluster. This setting cannot be changed once the cluster is created. The default value for this setting is false.", + "type": { + "$id": "1418", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.enableIpv6", + "serializationOptions": { + "$id": "1419", + "json": { + "$id": "1420", + "name": "enableIpv6" + } + } + }, + { + "$id": "1421", + "kind": "property", + "name": "subnetId", + "serializedName": "subnetId", + "doc": "If specified, the node types for the cluster are created in this subnet instead of the default VNet. The **networkSecurityRules** specified for the cluster are also applied to this subnet. This setting cannot be changed once the cluster is created.", + "type": { + "$id": "1422", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.subnetId", + "serializationOptions": { + "$id": "1423", + "json": { + "$id": "1424", + "name": "subnetId" + } + } + }, + { + "$id": "1425", + "kind": "property", + "name": "ipTags", + "serializedName": "ipTags", + "doc": "The list of IP tags associated with the default public IP address of the cluster.", + "type": { + "$id": "1426", + "kind": "array", + "name": "ArrayIpTag", + "valueType": { + "$id": "1427", + "kind": "model", + "name": "ManagedClusterIPTag", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpTag", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The IP tag associated with the public IP address.", + "decorators": [], + "properties": [ + { + "$id": "1428", + "kind": "property", + "name": "ipTagType", + "serializedName": "ipTagType", + "doc": "IP tag type. Example: FirstPartyUsage.", + "type": { + "$id": "1429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpTag.ipTagType", + "serializationOptions": { + "$id": "1430", + "json": { + "$id": "1431", + "name": "ipTagType" + } + } + }, + { + "$id": "1432", + "kind": "property", + "name": "tag", + "serializedName": "tag", + "doc": "IP tag associated with the public IP. Example: SQL, Storage etc.", + "type": { + "$id": "1433", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpTag.tag", + "serializationOptions": { + "$id": "1434", + "json": { + "$id": "1435", + "name": "tag" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.ipTags", + "serializationOptions": { + "$id": "1436", + "json": { + "$id": "1437", + "name": "ipTags" + } + } + }, + { + "$id": "1438", + "kind": "property", + "name": "ipv6Address", + "serializedName": "ipv6Address", + "doc": "IPv6 address for the cluster if IPv6 is enabled.", + "type": { + "$id": "1439", + "kind": "string", + "name": "ipV6Address", + "crossLanguageDefinitionId": "Azure.Core.ipV6Address", + "baseType": { + "$id": "1440", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.ipv6Address", + "serializationOptions": { + "$id": "1441", + "json": { + "$id": "1442", + "name": "ipv6Address" + } + } + }, + { + "$id": "1443", + "kind": "property", + "name": "IsServicePublicIPEnabled", + "serializedName": "enableServicePublicIP", + "doc": "Setting this to true will link the IPv4 address as the ServicePublicIP of the IPv6 address. It can only be set to True if IPv6 is enabled on the cluster.", + "type": { + "$id": "1444", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.enableServicePublicIP", + "serializationOptions": { + "$id": "1445", + "json": { + "$id": "1446", + "name": "enableServicePublicIP" + } + } + }, + { + "$id": "1447", + "kind": "property", + "name": "auxiliarySubnets", + "serializedName": "auxiliarySubnets", + "doc": "Auxiliary subnets for the cluster.", + "type": { + "$id": "1448", + "kind": "array", + "name": "ArraySubnet", + "valueType": { + "$id": "1449", + "kind": "model", + "name": "ManagedClusterSubnet", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a Subnet.", + "decorators": [], + "properties": [ + { + "$id": "1450", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Subnet name.", + "type": { + "$id": "1451", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.name", + "serializationOptions": { + "$id": "1452", + "json": { + "$id": "1453", + "name": "name" + } + } + }, + { + "$id": "1454", + "kind": "property", + "name": "IsIPv6Enabled", + "serializedName": "enableIpv6", + "doc": "Indicates wether to enable Ipv6 or not. If not provided, it will take the same configuration as the cluster.", + "type": { + "$id": "1455", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.enableIpv6", + "serializationOptions": { + "$id": "1456", + "json": { + "$id": "1457", + "name": "enableIpv6" + } + } + }, + { + "$id": "1458", + "kind": "property", + "name": "privateEndpointNetworkPolicies", + "serializedName": "privateEndpointNetworkPolicies", + "doc": "Enable or Disable apply network policies on private end point in the subnet.", + "type": { + "$ref": "220" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.privateEndpointNetworkPolicies", + "serializationOptions": { + "$id": "1459", + "json": { + "$id": "1460", + "name": "privateEndpointNetworkPolicies" + } + } + }, + { + "$id": "1461", + "kind": "property", + "name": "privateLinkServiceNetworkPolicies", + "serializedName": "privateLinkServiceNetworkPolicies", + "doc": "Enable or Disable apply network policies on private link service in the subnet.", + "type": { + "$ref": "226" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.privateLinkServiceNetworkPolicies", + "serializationOptions": { + "$id": "1462", + "json": { + "$id": "1463", + "name": "privateLinkServiceNetworkPolicies" + } + } + }, + { + "$id": "1464", + "kind": "property", + "name": "networkSecurityGroupId", + "serializedName": "networkSecurityGroupId", + "doc": "Full resource id for the network security group.", + "type": { + "$id": "1465", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1466", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.networkSecurityGroupId", + "serializationOptions": { + "$id": "1467", + "json": { + "$id": "1468", + "name": "networkSecurityGroupId" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.auxiliarySubnets", + "serializationOptions": { + "$id": "1469", + "json": { + "$id": "1470", + "name": "auxiliarySubnets" + } + } + }, + { + "$id": "1471", + "kind": "property", + "name": "serviceEndpoints", + "serializedName": "serviceEndpoints", + "doc": "Service endpoints for subnets in the cluster.", + "type": { + "$id": "1472", + "kind": "array", + "name": "ArrayServiceEndpoint", + "valueType": { + "$id": "1473", + "kind": "model", + "name": "ManagedClusterServiceEndpoint", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceEndpoint", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The service endpoint properties.", + "decorators": [], + "properties": [ + { + "$id": "1474", + "kind": "property", + "name": "service", + "serializedName": "service", + "doc": "The type of the endpoint service.", + "type": { + "$id": "1475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceEndpoint.service", + "serializationOptions": { + "$id": "1476", + "json": { + "$id": "1477", + "name": "service" + } + } + }, + { + "$id": "1478", + "kind": "property", + "name": "-|azure-location", + "serializedName": "locations", + "doc": "A list of locations.", + "type": { + "$id": "1479", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceEndpoint.locations", + "serializationOptions": { + "$id": "1481", + "json": { + "$id": "1482", + "name": "locations" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.serviceEndpoints", + "serializationOptions": { + "$id": "1483", + "json": { + "$id": "1484", + "name": "serviceEndpoints" + } + } + }, + { + "$id": "1485", + "kind": "property", + "name": "zonalUpdateMode", + "serializedName": "zonalUpdateMode", + "doc": "Indicates the update mode for Cross Az clusters.", + "type": { + "$ref": "232" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.zonalUpdateMode", + "serializationOptions": { + "$id": "1486", + "json": { + "$id": "1487", + "name": "zonalUpdateMode" + } + } + }, + { + "$id": "1488", + "kind": "property", + "name": "useCustomVnet", + "serializedName": "useCustomVnet", + "doc": "For new clusters, this parameter indicates that it uses Bring your own VNet, but the subnet is specified at node type level; and for such clusters, the subnetId property is required for node types.", + "type": { + "$id": "1489", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.useCustomVnet", + "serializationOptions": { + "$id": "1490", + "json": { + "$id": "1491", + "name": "useCustomVnet" + } + } + }, + { + "$id": "1492", + "kind": "property", + "name": "publicIPPrefixId", + "serializedName": "publicIPPrefixId", + "doc": "Specify the resource id of a public IPv4 prefix that the load balancer will allocate a public IPv4 address from. This setting cannot be changed once the cluster is created.", + "type": { + "$id": "1493", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1494", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.publicIPPrefixId", + "serializationOptions": { + "$id": "1495", + "json": { + "$id": "1496", + "name": "publicIPPrefixId" + } + } + }, + { + "$id": "1497", + "kind": "property", + "name": "publicIPv6PrefixId", + "serializedName": "publicIPv6PrefixId", + "doc": "Specify the resource id of a public IPv6 prefix that the load balancer will allocate a public IPv6 address from. This setting cannot be changed once the cluster is created.", + "type": { + "$id": "1498", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.publicIPv6PrefixId", + "serializationOptions": { + "$id": "1500", + "json": { + "$id": "1501", + "name": "publicIPv6PrefixId" + } + } + }, + { + "$id": "1502", + "kind": "property", + "name": "ddosProtectionPlanId", + "serializedName": "ddosProtectionPlanId", + "doc": "Specify the resource id of a DDoS network protection plan that will be associated with the virtual network of the cluster.", + "type": { + "$id": "1503", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.ddosProtectionPlanId", + "serializationOptions": { + "$id": "1505", + "json": { + "$id": "1506", + "name": "ddosProtectionPlanId" + } + } + }, + { + "$id": "1507", + "kind": "property", + "name": "upgradeDescription", + "serializedName": "upgradeDescription", + "doc": "The policy to use when upgrading the cluster.", + "type": { + "$id": "1508", + "kind": "model", + "name": "ManagedClusterUpgradePolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy used when upgrading the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1509", + "kind": "property", + "name": "forceRestart", + "serializedName": "forceRestart", + "doc": "If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).", + "type": { + "$id": "1510", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.forceRestart", + "serializationOptions": { + "$id": "1511", + "json": { + "$id": "1512", + "name": "forceRestart" + } + } + }, + { + "$id": "1513", + "kind": "property", + "name": "healthPolicy", + "serializedName": "healthPolicy", + "doc": "The cluster health policy defines a health policy used to evaluate the health of the cluster during a cluster upgrade.", + "type": { + "$id": "1514", + "kind": "model", + "name": "ManagedClusterHealthPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterHealthPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines a health policy used to evaluate the health of the cluster or of a cluster node.", + "decorators": [], + "properties": [ + { + "$id": "1515", + "kind": "property", + "name": "maxPercentUnhealthyNodes", + "serializedName": "maxPercentUnhealthyNodes", + "doc": "The maximum allowed percentage of unhealthy nodes before reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10.\n\nThe percentage represents the maximum tolerated percentage of nodes that can be unhealthy before the cluster is considered in error.\nIf the percentage is respected but there is at least one unhealthy node, the health is evaluated as Warning.\nThe percentage is calculated by dividing the number of unhealthy nodes over the total number of nodes in the cluster.\nThe computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.\n\nIn large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that.", + "type": { + "$id": "1516", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterHealthPolicy.maxPercentUnhealthyNodes", + "serializationOptions": { + "$id": "1517", + "json": { + "$id": "1518", + "name": "maxPercentUnhealthyNodes" + } + } + }, + { + "$id": "1519", + "kind": "property", + "name": "maxPercentUnhealthyApplications", + "serializedName": "maxPercentUnhealthyApplications", + "doc": "The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10.\n\nThe percentage represents the maximum tolerated percentage of applications that can be unhealthy before the cluster is considered in error.\nIf the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning.\nThis is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap.\nThe computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero.", + "type": { + "$id": "1520", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterHealthPolicy.maxPercentUnhealthyApplications", + "serializationOptions": { + "$id": "1521", + "json": { + "$id": "1522", + "name": "maxPercentUnhealthyApplications" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.healthPolicy", + "serializationOptions": { + "$id": "1523", + "json": { + "$id": "1524", + "name": "healthPolicy" + } + } + }, + { + "$id": "1525", + "kind": "property", + "name": "deltaHealthPolicy", + "serializedName": "deltaHealthPolicy", + "doc": "The cluster delta health policy defines a health policy used to evaluate the health of the cluster during a cluster upgrade.", + "type": { + "$id": "1526", + "kind": "model", + "name": "ManagedClusterUpgradeDeltaHealthPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the delta health policies for the cluster upgrade.", + "decorators": [], + "properties": [ + { + "$id": "1527", + "kind": "property", + "name": "maxPercentDeltaUnhealthyNodes", + "serializedName": "maxPercentDeltaUnhealthyNodes", + "doc": "The maximum allowed percentage of nodes health degradation allowed during cluster upgrades.\nThe delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation.\nThe check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits.", + "type": { + "$id": "1528", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy.maxPercentDeltaUnhealthyNodes", + "serializationOptions": { + "$id": "1529", + "json": { + "$id": "1530", + "name": "maxPercentDeltaUnhealthyNodes" + } + } + }, + { + "$id": "1531", + "kind": "property", + "name": "maxPercentUpgradeDomainDeltaUnhealthyNodes", + "serializedName": "maxPercentUpgradeDomainDeltaUnhealthyNodes", + "doc": "The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades.\nThe delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation.\nThe check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits.", + "type": { + "$id": "1532", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes", + "serializationOptions": { + "$id": "1533", + "json": { + "$id": "1534", + "name": "maxPercentUpgradeDomainDeltaUnhealthyNodes" + } + } + }, + { + "$id": "1535", + "kind": "property", + "name": "maxPercentDeltaUnhealthyApplications", + "serializedName": "maxPercentDeltaUnhealthyApplications", + "doc": "The maximum allowed percentage of applications health degradation allowed during cluster upgrades.\nThe delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation.\nThe check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this.\nNOTE: This value will overwrite the value specified in properties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", + "type": { + "$id": "1536", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy.maxPercentDeltaUnhealthyApplications", + "serializationOptions": { + "$id": "1537", + "json": { + "$id": "1538", + "name": "maxPercentDeltaUnhealthyApplications" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.deltaHealthPolicy", + "serializationOptions": { + "$id": "1539", + "json": { + "$id": "1540", + "name": "deltaHealthPolicy" + } + } + }, + { + "$id": "1541", + "kind": "property", + "name": "monitoringPolicy", + "serializedName": "monitoringPolicy", + "doc": "The cluster monitoring policy describes the parameters for monitoring an upgrade in Monitored mode.", + "type": { + "$id": "1542", + "kind": "model", + "name": "ManagedClusterMonitoringPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the monitoring policies for the cluster upgrade.", + "decorators": [], + "properties": [ + { + "$id": "1543", + "kind": "property", + "name": "healthCheckWaitDuration", + "serializedName": "healthCheckWaitDuration", + "doc": "The length of time to wait after completing an upgrade domain before performing health checks. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.healthCheckWaitDuration", + "serializationOptions": { + "$id": "1545", + "json": { + "$id": "1546", + "name": "healthCheckWaitDuration" + } + } + }, + { + "$id": "1547", + "kind": "property", + "name": "healthCheckStableDuration", + "serializedName": "healthCheckStableDuration", + "doc": "The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.healthCheckStableDuration", + "serializationOptions": { + "$id": "1549", + "json": { + "$id": "1550", + "name": "healthCheckStableDuration" + } + } + }, + { + "$id": "1551", + "kind": "property", + "name": "healthCheckRetryTimeout", + "serializedName": "healthCheckRetryTimeout", + "doc": "The amount of time to retry health evaluation when the application or cluster is unhealthy before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.healthCheckRetryTimeout", + "serializationOptions": { + "$id": "1553", + "json": { + "$id": "1554", + "name": "healthCheckRetryTimeout" + } + } + }, + { + "$id": "1555", + "kind": "property", + "name": "upgradeTimeout", + "serializedName": "upgradeTimeout", + "doc": "The amount of time the overall upgrade has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.upgradeTimeout", + "serializationOptions": { + "$id": "1557", + "json": { + "$id": "1558", + "name": "upgradeTimeout" + } + } + }, + { + "$id": "1559", + "kind": "property", + "name": "upgradeDomainTimeout", + "serializedName": "upgradeDomainTimeout", + "doc": "The amount of time each upgrade domain has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1560", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.upgradeDomainTimeout", + "serializationOptions": { + "$id": "1561", + "json": { + "$id": "1562", + "name": "upgradeDomainTimeout" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.monitoringPolicy", + "serializationOptions": { + "$id": "1563", + "json": { + "$id": "1564", + "name": "monitoringPolicy" + } + } + }, + { + "$id": "1565", + "kind": "property", + "name": "upgradeReplicaSetCheckTimeout", + "serializedName": "upgradeReplicaSetCheckTimeout", + "doc": "The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues.\nWhen this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues.\nThe timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.\nThis value must be between 00:00:00 and 49710.06:28:15 (unsigned 32 bit integer for seconds)", + "type": { + "$id": "1566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.upgradeReplicaSetCheckTimeout", + "serializationOptions": { + "$id": "1567", + "json": { + "$id": "1568", + "name": "upgradeReplicaSetCheckTimeout" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.upgradeDescription", + "serializationOptions": { + "$id": "1569", + "json": { + "$id": "1570", + "name": "upgradeDescription" + } + } + }, + { + "$id": "1571", + "kind": "property", + "name": "httpGatewayTokenAuthConnectionPort", + "serializedName": "httpGatewayTokenAuthConnectionPort", + "doc": "The port used for token-auth based HTTPS connections to the cluster. Cannot be set to the same port as HttpGatewayEndpoint.", + "type": { + "$id": "1572", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.httpGatewayTokenAuthConnectionPort", + "serializationOptions": { + "$id": "1573", + "json": { + "$id": "1574", + "name": "httpGatewayTokenAuthConnectionPort" + } + } + }, + { + "$id": "1575", + "kind": "property", + "name": "IsHttpGatewayExclusiveAuthModeEnabled", + "serializedName": "enableHttpGatewayExclusiveAuthMode", + "doc": "If true, token-based authentication is not allowed on the HttpGatewayEndpoint. This is required to support TLS versions 1.3 and above. If token-based authentication is used, HttpGatewayTokenAuthConnectionPort must be defined.", + "type": { + "$id": "1576", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.enableHttpGatewayExclusiveAuthMode", + "serializationOptions": { + "$id": "1577", + "json": { + "$id": "1578", + "name": "enableHttpGatewayExclusiveAuthMode" + } + } + }, + { + "$id": "1579", + "kind": "property", + "name": "autoGeneratedDomainNameLabelScope", + "serializedName": "autoGeneratedDomainNameLabelScope", + "doc": "This property is the entry point to using a public CA cert for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject of the public CA cert.", + "type": { + "$ref": "238" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.autoGeneratedDomainNameLabelScope", + "serializationOptions": { + "$id": "1580", + "json": { + "$id": "1581", + "name": "autoGeneratedDomainNameLabelScope" + } + } + }, + { + "$id": "1582", + "kind": "property", + "name": "allocatedOutboundPorts", + "serializedName": "allocatedOutboundPorts", + "doc": "The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size.", + "type": { + "$id": "1583", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.allocatedOutboundPorts", + "serializationOptions": { + "$id": "1584", + "json": { + "$id": "1585", + "name": "allocatedOutboundPorts" + } + } + }, + { + "$id": "1586", + "kind": "property", + "name": "VMImage", + "serializedName": "VMImage", + "doc": "The VM image the node types are configured with. This property controls the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is 'Windows'.", + "type": { + "$id": "1587", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.VMImage", + "serializationOptions": { + "$id": "1588", + "json": { + "$id": "1589", + "name": "VMImage" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster.properties", + "serializationOptions": { + "$id": "1590", + "json": { + "$id": "1591", + "name": "properties" + } + } + }, + { + "$id": "1592", + "kind": "property", + "name": "etag", + "serializedName": "etag", + "doc": "If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\",", + "type": { + "$id": "1593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster.etag", + "serializationOptions": { + "$id": "1594", + "json": { + "$id": "1595", + "name": "etag" + } + } + }, + { + "$id": "1596", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The sku of the managed cluster", + "type": { + "$id": "1597", + "kind": "model", + "name": "Sku", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Sku", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Service Fabric managed cluster Sku definition", + "decorators": [], + "properties": [ + { + "$id": "1598", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Sku Name.", + "type": { + "$ref": "248" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Sku.name", + "serializationOptions": { + "$id": "1599", + "json": { + "$id": "1600", + "name": "name" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster.sku", + "serializationOptions": { + "$id": "1601", + "json": { + "$id": "1602", + "name": "sku" + } + } + } + ] + }, + { + "$ref": "1184" + }, + { + "$ref": "1229" + }, + { + "$ref": "1264" + }, + { + "$ref": "1326" + }, + { + "$ref": "1346" + }, + { + "$ref": "1364" + }, + { + "$ref": "1371" + }, + { + "$ref": "1410" + }, + { + "$ref": "1427" + }, + { + "$ref": "1449" + }, + { + "$ref": "1473" + }, + { + "$ref": "1508" + }, + { + "$ref": "1514" + }, + { + "$ref": "1526" + }, + { + "$ref": "1542" + }, + { + "$ref": "1597" + }, + { + "$ref": "1172" + }, + { + "$id": "1603", + "kind": "model", + "name": "ManagedClusterUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterUpdateParameters", + "usage": "Input,Json", + "doc": "Managed cluster update request", + "decorators": [], + "properties": [ + { + "$id": "1604", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Managed cluster update parameters", + "type": { + "$id": "1605", + "kind": "dict", + "keyType": { + "$id": "1606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterUpdateParameters.tags", + "serializationOptions": { + "$id": "1608", + "json": { + "$id": "1609", + "name": "tags" + } + } + } + ] + }, + { + "$id": "1610", + "kind": "model", + "name": "ManagedClusterListResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a ManagedCluster list operation.", + "decorators": [], + "properties": [ + { + "$id": "1611", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ManagedCluster items on this page", + "type": { + "$id": "1612", + "kind": "array", + "name": "ArrayManagedCluster", + "valueType": { + "$ref": "1171" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1613", + "json": { + "$id": "1614", + "name": "value" + } + } + }, + { + "$id": "1615", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1616", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1617", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1618", + "json": { + "$id": "1619", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1620", + "kind": "model", + "name": "FaultSimulationIdContent", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationIdContent", + "usage": "Input,Json", + "doc": "Parameters for Fault Simulation id.", + "decorators": [], + "properties": [ + { + "$id": "1621", + "kind": "property", + "name": "simulationId", + "serializedName": "simulationId", + "doc": "unique identifier for the fault simulation.", + "type": { + "$id": "1622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationIdContent.simulationId", + "serializationOptions": { + "$id": "1623", + "json": { + "$id": "1624", + "name": "simulationId" + } + } + } + ] + }, + { + "$id": "1625", + "kind": "model", + "name": "FaultSimulation", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation", + "usage": "Output,Json,LroFinalEnvelope", + "doc": "Fault simulation object with status.", + "decorators": [], + "properties": [ + { + "$id": "1626", + "kind": "property", + "name": "simulationId", + "serializedName": "simulationId", + "doc": "unique identifier for the fault simulation.", + "type": { + "$id": "1627", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.simulationId", + "serializationOptions": { + "$id": "1628", + "json": { + "$id": "1629", + "name": "simulationId" + } + } + }, + { + "$id": "1630", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Fault simulation status", + "type": { + "$ref": "254" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.status", + "serializationOptions": { + "$id": "1631", + "json": { + "$id": "1632", + "name": "status" + } + } + }, + { + "$id": "1633", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "The start time of the fault simulation.", + "type": { + "$id": "1634", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.startTime", + "serializationOptions": { + "$id": "1636", + "json": { + "$id": "1637", + "name": "startTime" + } + } + }, + { + "$id": "1638", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "The end time of the fault simulation.", + "type": { + "$id": "1639", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1640", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.endTime", + "serializationOptions": { + "$id": "1641", + "json": { + "$id": "1642", + "name": "endTime" + } + } + }, + { + "$id": "1643", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "Fault simulation details", + "type": { + "$id": "1644", + "kind": "model", + "name": "FaultSimulationDetails", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails", + "usage": "Output,Json,LroFinalEnvelope", + "doc": "Details for Fault Simulation.", + "decorators": [], + "properties": [ + { + "$id": "1645", + "kind": "property", + "name": "clusterId", + "serializedName": "clusterId", + "doc": "unique identifier for the cluster resource.", + "type": { + "$id": "1646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails.clusterId", + "serializationOptions": { + "$id": "1647", + "json": { + "$id": "1648", + "name": "clusterId" + } + } + }, + { + "$id": "1649", + "kind": "property", + "name": "operationId", + "serializedName": "operationId", + "doc": "unique identifier for the operation associated with the fault simulation.", + "type": { + "$id": "1650", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails.operationId", + "serializationOptions": { + "$id": "1651", + "json": { + "$id": "1652", + "name": "operationId" + } + } + }, + { + "$id": "1653", + "kind": "property", + "name": "nodeTypeFaultSimulation", + "serializedName": "nodeTypeFaultSimulation", + "doc": "List of node type simulations associated with the cluster fault simulation.", + "type": { + "$id": "1654", + "kind": "array", + "name": "ArrayNodeTypeFaultSimulation", + "valueType": { + "$id": "1655", + "kind": "model", + "name": "NodeTypeFaultSimulation", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation", + "usage": "Output,Json,LroFinalEnvelope", + "doc": "Node type fault simulation object with status.", + "decorators": [], + "properties": [ + { + "$id": "1656", + "kind": "property", + "name": "nodeTypeName", + "serializedName": "nodeTypeName", + "doc": "Node type name.", + "type": { + "$id": "1657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation.nodeTypeName", + "serializationOptions": { + "$id": "1658", + "json": { + "$id": "1659", + "name": "nodeTypeName" + } + } + }, + { + "$id": "1660", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Fault simulation status", + "type": { + "$ref": "254" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation.status", + "serializationOptions": { + "$id": "1661", + "json": { + "$id": "1662", + "name": "status" + } + } + }, + { + "$id": "1663", + "kind": "property", + "name": "operationId", + "serializedName": "operationId", + "doc": "Current or latest asynchronous operation identifier on the node type.", + "type": { + "$id": "1664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation.operationId", + "serializationOptions": { + "$id": "1665", + "json": { + "$id": "1666", + "name": "operationId" + } + } + }, + { + "$id": "1667", + "kind": "property", + "name": "operationStatus", + "serializedName": "operationStatus", + "doc": "Current or latest asynchronous operation status on the node type", + "type": { + "$ref": "268" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation.operationStatus", + "serializationOptions": { + "$id": "1668", + "json": { + "$id": "1669", + "name": "operationStatus" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails.nodeTypeFaultSimulation", + "serializationOptions": { + "$id": "1670", + "json": { + "$id": "1671", + "name": "nodeTypeFaultSimulation" + } + } + }, + { + "$id": "1672", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "Fault simulation parameters.", + "type": { + "$id": "1673", + "kind": "model", + "name": "FaultSimulationContent", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContent", + "usage": "Input,Output,Json,LroFinalEnvelope", + "doc": "Parameters for Fault Simulation action.", + "decorators": [], + "discriminatorProperty": { + "$id": "1674", + "kind": "property", + "name": "faultKind", + "serializedName": "faultKind", + "doc": "The kind of fault to be simulated.", + "type": { + "$ref": "282" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContent.faultKind", + "serializationOptions": { + "$id": "1675", + "json": { + "$id": "1676", + "name": "faultKind" + } + } + }, + "properties": [ + { + "$ref": "1674" + }, + { + "$id": "1677", + "kind": "property", + "name": "force", + "serializedName": "force", + "doc": "Force the action to go through without any check on the cluster.", + "type": { + "$id": "1678", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContent.force", + "serializationOptions": { + "$id": "1679", + "json": { + "$id": "1680", + "name": "force" + } + } + }, + { + "$id": "1681", + "kind": "property", + "name": "constraints", + "serializedName": "constraints", + "doc": "Constraints for Fault Simulation action.", + "type": { + "$id": "1682", + "kind": "model", + "name": "FaultSimulationConstraints", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationConstraints", + "usage": "Input,Output,Json,LroFinalEnvelope", + "doc": "Constraints for Fault Simulation action.", + "decorators": [], + "properties": [ + { + "$id": "1683", + "kind": "property", + "name": "expirationTime", + "serializedName": "expirationTime", + "doc": "The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active.", + "type": { + "$id": "1684", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1685", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationConstraints.expirationTime", + "serializationOptions": { + "$id": "1686", + "json": { + "$id": "1687", + "name": "expirationTime" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContent.constraints", + "serializationOptions": { + "$id": "1688", + "json": { + "$id": "1689", + "name": "constraints" + } + } + } + ], + "discriminatedSubtypes": { + "$id": "1690", + "Zone": { + "$id": "1691", + "kind": "model", + "name": "ZoneFaultSimulationContent", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ZoneFaultSimulationContent", + "usage": "Input,Output,Json,LroFinalEnvelope", + "doc": "Parameters for Zone Fault Simulation action.", + "discriminatorValue": "Zone", + "decorators": [], + "baseModel": { + "$ref": "1673" + }, + "properties": [ + { + "$id": "1692", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Indicates the zones of the fault simulation.", + "type": { + "$id": "1693", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1694", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ZoneFaultSimulationContent.zones", + "serializationOptions": { + "$id": "1695", + "json": { + "$id": "1696", + "name": "zones" + } + } + }, + { + "$id": "1697", + "kind": "property", + "name": "faultKind", + "serializedName": "faultKind", + "doc": "The kind of fault simulation.", + "type": { + "$id": "1698", + "kind": "constant", + "valueType": { + "$id": "1699", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Zone", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ZoneFaultSimulationContent.faultKind", + "serializationOptions": { + "$id": "1700", + "json": { + "$id": "1701", + "name": "faultKind" + } + } + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails.parameters", + "serializationOptions": { + "$id": "1702", + "json": { + "$id": "1703", + "name": "parameters" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.details", + "serializationOptions": { + "$id": "1704", + "json": { + "$id": "1705", + "name": "details" + } + } + } + ] + }, + { + "$ref": "1644" + }, + { + "$ref": "1655" + }, + { + "$ref": "1673" + }, + { + "$ref": "1682" + }, + { + "$ref": "1691" + }, + { + "$id": "1706", + "kind": "model", + "name": "FaultSimulationListResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationListResult", + "usage": "Output,Json", + "doc": "Fault simulation list results", + "decorators": [], + "properties": [ + { + "$id": "1707", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The FaultSimulation items on this page", + "type": { + "$id": "1708", + "kind": "array", + "name": "ArrayFaultSimulation", + "valueType": { + "$ref": "1625" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationListResult.value", + "serializationOptions": { + "$id": "1709", + "json": { + "$id": "1710", + "name": "value" + } + } + }, + { + "$id": "1711", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1712", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1713", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationListResult.nextLink", + "serializationOptions": { + "$id": "1714", + "json": { + "$id": "1715", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1716", + "kind": "model", + "name": "FaultSimulationContentWrapper", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContentWrapper", + "usage": "Input,Json", + "doc": "Fault Simulation Request for Start action.", + "decorators": [], + "properties": [ + { + "$id": "1717", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "Parameters for Fault Simulation start action.", + "type": { + "$ref": "1673" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContentWrapper.parameters", + "serializationOptions": { + "$id": "1718", + "json": { + "$id": "1719", + "name": "parameters" + } + } + } + ] + }, + { + "$id": "1720", + "kind": "model", + "name": "ManagedAzResiliencyStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent", + "usage": "Output,Json", + "doc": "Describes the result of the request to list Managed VM Sizes for Service Fabric Managed Clusters.", + "decorators": [], + "properties": [ + { + "$id": "1721", + "kind": "property", + "name": "baseResourceStatus", + "serializedName": "baseResourceStatus", + "doc": "List of Managed VM Sizes for Service Fabric Managed Clusters.", + "type": { + "$id": "1722", + "kind": "array", + "name": "ArrayResourceAzStatus", + "valueType": { + "$id": "1723", + "kind": "model", + "name": "ResourceAzStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus", + "usage": "Output,Json", + "doc": "Describes Az Resiliency status of Base resources", + "decorators": [], + "properties": [ + { + "$id": "1724", + "kind": "property", + "name": "resourceName", + "serializedName": "resourceName", + "doc": "VM Size properties.", + "type": { + "$id": "1725", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus.resourceName", + "serializationOptions": { + "$id": "1726", + "json": { + "$id": "1727", + "name": "resourceName" + } + } + }, + { + "$id": "1728", + "kind": "property", + "name": "-|resource-type", + "serializedName": "resourceType", + "doc": "VM Size id.", + "type": { + "$id": "1729", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "1730", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus.resourceType", + "serializationOptions": { + "$id": "1731", + "json": { + "$id": "1732", + "name": "resourceType" + } + } + }, + { + "$id": "1733", + "kind": "property", + "name": "isZoneResilient", + "serializedName": "isZoneResilient", + "doc": "VM Size name.", + "type": { + "$id": "1734", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus.isZoneResilient", + "serializationOptions": { + "$id": "1735", + "json": { + "$id": "1736", + "name": "isZoneResilient" + } + } + }, + { + "$id": "1737", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "Zone resiliency status details for the resource.", + "type": { + "$id": "1738", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus.details", + "serializationOptions": { + "$id": "1739", + "json": { + "$id": "1740", + "name": "details" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent.baseResourceStatus", + "serializationOptions": { + "$id": "1741", + "json": { + "$id": "1742", + "name": "baseResourceStatus" + } + } + }, + { + "$id": "1743", + "kind": "property", + "name": "isClusterZoneResilient", + "serializedName": "isClusterZoneResilient", + "doc": "URL to get the next set of Managed VM Sizes if there are any.", + "type": { + "$id": "1744", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent.isClusterZoneResilient", + "serializationOptions": { + "$id": "1745", + "json": { + "$id": "1746", + "name": "isClusterZoneResilient" + } + } + } + ] + }, + { + "$ref": "1723" + }, + { + "$id": "1747", + "kind": "model", + "name": "ManagedMaintenanceWindowStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent", + "usage": "Output,Json", + "doc": "Describes the maintenance window status of the Service Fabric Managed Cluster.", + "decorators": [], + "properties": [ + { + "$id": "1748", + "kind": "property", + "name": "isWindowEnabled", + "serializedName": "isWindowEnabled", + "doc": "If maintenance window is enabled on this cluster.", + "type": { + "$id": "1749", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.isWindowEnabled", + "serializationOptions": { + "$id": "1750", + "json": { + "$id": "1751", + "name": "isWindowEnabled" + } + } + }, + { + "$id": "1752", + "kind": "property", + "name": "isRegionReady", + "serializedName": "isRegionReady", + "doc": "Indicates if the region is ready to configure maintenance windows.", + "type": { + "$id": "1753", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.isRegionReady", + "serializationOptions": { + "$id": "1754", + "json": { + "$id": "1755", + "name": "isRegionReady" + } + } + }, + { + "$id": "1756", + "kind": "property", + "name": "isWindowActive", + "serializedName": "isWindowActive", + "doc": "If maintenance window is active.", + "type": { + "$id": "1757", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.isWindowActive", + "serializationOptions": { + "$id": "1758", + "json": { + "$id": "1759", + "name": "isWindowActive" + } + } + }, + { + "$id": "1760", + "kind": "property", + "name": "canApplyUpdates", + "serializedName": "canApplyUpdates", + "doc": "If updates can be applied.", + "type": { + "$id": "1761", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.canApplyUpdates", + "serializationOptions": { + "$id": "1762", + "json": { + "$id": "1763", + "name": "canApplyUpdates" + } + } + }, + { + "$id": "1764", + "kind": "property", + "name": "LastWindowStatusUpdatedOn", + "serializedName": "lastWindowStatusUpdateAtUTC", + "doc": "Last window update time in UTC.", + "type": { + "$id": "1765", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1766", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.lastWindowStatusUpdateAtUTC", + "serializationOptions": { + "$id": "1767", + "json": { + "$id": "1768", + "name": "lastWindowStatusUpdateAtUTC" + } + } + }, + { + "$id": "1769", + "kind": "property", + "name": "LastWindowStartOn", + "serializedName": "lastWindowStartTimeUTC", + "doc": "Last window start time in UTC.", + "type": { + "$id": "1770", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1771", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.lastWindowStartTimeUTC", + "serializationOptions": { + "$id": "1772", + "json": { + "$id": "1773", + "name": "lastWindowStartTimeUTC" + } + } + }, + { + "$id": "1774", + "kind": "property", + "name": "LastWindowEndOn", + "serializedName": "lastWindowEndTimeUTC", + "doc": "Last window end time in UTC.", + "type": { + "$id": "1775", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1776", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.lastWindowEndTimeUTC", + "serializationOptions": { + "$id": "1777", + "json": { + "$id": "1778", + "name": "lastWindowEndTimeUTC" + } + } + } + ] + }, + { + "$id": "1779", + "kind": "model", + "name": "ServiceFabricManagedNodeType", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a node type in the cluster, each node type represents sub set of nodes in the cluster.", + "decorators": [], + "baseModel": { + "$ref": "442" + }, + "properties": [ + { + "$id": "1780", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The node type properties", + "type": { + "$id": "1781", + "kind": "model", + "name": "NodeTypeProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a node type in the cluster, each node type represents sub set of nodes in the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1782", + "kind": "property", + "name": "isPrimary", + "serializedName": "isPrimary", + "doc": "Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created.", + "type": { + "$id": "1783", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.isPrimary", + "serializationOptions": { + "$id": "1784", + "json": { + "$id": "1785", + "name": "isPrimary" + } + } + }, + { + "$id": "1786", + "kind": "property", + "name": "vmInstanceCount", + "serializedName": "vmInstanceCount", + "doc": "The number of nodes in the node type. **Values:** -1 - Use when auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale.", + "type": { + "$id": "1787", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmInstanceCount", + "serializationOptions": { + "$id": "1788", + "json": { + "$id": "1789", + "name": "vmInstanceCount" + } + } + }, + { + "$id": "1790", + "kind": "property", + "name": "DataDiskSizeInGB", + "serializedName": "dataDiskSizeGB", + "doc": "Disk size for the managed disk attached to the vms on the node type in GBs.", + "type": { + "$id": "1791", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.dataDiskSizeGB", + "serializationOptions": { + "$id": "1792", + "json": { + "$id": "1793", + "name": "dataDiskSizeGB" + } + } + }, + { + "$id": "1794", + "kind": "property", + "name": "dataDiskType", + "serializedName": "dataDiskType", + "doc": "Managed data disk type. Specifies the storage account type for the managed disk", + "type": { + "$ref": "286" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.dataDiskType", + "serializationOptions": { + "$id": "1795", + "json": { + "$id": "1796", + "name": "dataDiskType" + } + } + }, + { + "$id": "1797", + "kind": "property", + "name": "dataDiskLetter", + "serializedName": "dataDiskLetter", + "doc": "Managed data disk letter. It can not use the reserved letter C or D and it can not change after created.", + "type": { + "$id": "1798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.dataDiskLetter", + "serializationOptions": { + "$id": "1799", + "json": { + "$id": "1800", + "name": "dataDiskLetter" + } + } + }, + { + "$id": "1801", + "kind": "property", + "name": "placementProperties", + "serializedName": "placementProperties", + "doc": "The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.", + "type": { + "$id": "1802", + "kind": "dict", + "keyType": { + "$id": "1803", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.placementProperties", + "serializationOptions": { + "$id": "1805", + "json": { + "$id": "1806", + "name": "placementProperties" + } + } + }, + { + "$id": "1807", + "kind": "property", + "name": "capacities", + "serializedName": "capacities", + "doc": "The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.", + "type": { + "$id": "1808", + "kind": "dict", + "keyType": { + "$id": "1809", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1810", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.capacities", + "serializationOptions": { + "$id": "1811", + "json": { + "$id": "1812", + "name": "capacities" + } + } + }, + { + "$id": "1813", + "kind": "property", + "name": "applicationPorts", + "serializedName": "applicationPorts", + "doc": "The range of ports from which cluster assigned port to Service Fabric applications.", + "type": { + "$id": "1814", + "kind": "model", + "name": "EndpointRangeDescription", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.EndpointRangeDescription", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Port range details", + "decorators": [], + "properties": [ + { + "$id": "1815", + "kind": "property", + "name": "startPort", + "serializedName": "startPort", + "doc": "Starting port of a range of ports", + "type": { + "$id": "1816", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.EndpointRangeDescription.startPort", + "serializationOptions": { + "$id": "1817", + "json": { + "$id": "1818", + "name": "startPort" + } + } + }, + { + "$id": "1819", + "kind": "property", + "name": "endPort", + "serializedName": "endPort", + "doc": "End port of a range of ports", + "type": { + "$id": "1820", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.EndpointRangeDescription.endPort", + "serializationOptions": { + "$id": "1821", + "json": { + "$id": "1822", + "name": "endPort" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.applicationPorts", + "serializationOptions": { + "$id": "1823", + "json": { + "$id": "1824", + "name": "applicationPorts" + } + } + }, + { + "$id": "1825", + "kind": "property", + "name": "ephemeralPorts", + "serializedName": "ephemeralPorts", + "doc": "The range of ephemeral ports that nodes in this node type should be configured with.", + "type": { + "$ref": "1814" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.ephemeralPorts", + "serializationOptions": { + "$id": "1826", + "json": { + "$id": "1827", + "name": "ephemeralPorts" + } + } + }, + { + "$id": "1828", + "kind": "property", + "name": "vmSize", + "serializedName": "vmSize", + "doc": "The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.", + "type": { + "$id": "1829", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmSize", + "serializationOptions": { + "$id": "1830", + "json": { + "$id": "1831", + "name": "vmSize" + } + } + }, + { + "$id": "1832", + "kind": "property", + "name": "vmImagePublisher", + "serializedName": "vmImagePublisher", + "doc": "The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.", + "type": { + "$id": "1833", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImagePublisher", + "serializationOptions": { + "$id": "1834", + "json": { + "$id": "1835", + "name": "vmImagePublisher" + } + } + }, + { + "$id": "1836", + "kind": "property", + "name": "vmImageOffer", + "serializedName": "vmImageOffer", + "doc": "The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.", + "type": { + "$id": "1837", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImageOffer", + "serializationOptions": { + "$id": "1838", + "json": { + "$id": "1839", + "name": "vmImageOffer" + } + } + }, + { + "$id": "1840", + "kind": "property", + "name": "vmImageSku", + "serializedName": "vmImageSku", + "doc": "The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.", + "type": { + "$id": "1841", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImageSku", + "serializationOptions": { + "$id": "1842", + "json": { + "$id": "1843", + "name": "vmImageSku" + } + } + }, + { + "$id": "1844", + "kind": "property", + "name": "vmImageVersion", + "serializedName": "vmImageVersion", + "doc": "The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.", + "type": { + "$id": "1845", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImageVersion", + "serializationOptions": { + "$id": "1846", + "json": { + "$id": "1847", + "name": "vmImageVersion" + } + } + }, + { + "$id": "1848", + "kind": "property", + "name": "vmSecrets", + "serializedName": "vmSecrets", + "doc": "The secrets to install in the virtual machines.", + "type": { + "$id": "1849", + "kind": "array", + "name": "ArrayVaultSecretGroup", + "valueType": { + "$id": "1850", + "kind": "model", + "name": "NodeTypeVaultSecretGroup", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultSecretGroup", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies set of certificates that should be installed onto the virtual machines.", + "decorators": [], + "properties": [ + { + "$id": "1851", + "kind": "property", + "name": "sourceVault", + "serializedName": "sourceVault", + "doc": "The relative URL of the Key Vault containing all of the certificates in VaultCertificates.", + "type": { + "$id": "1852", + "kind": "model", + "name": "SubResource", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SubResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Azure resource identifier.", + "decorators": [], + "properties": [ + { + "$id": "1853", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Azure resource identifier.", + "type": { + "$id": "1854", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SubResource.id", + "serializationOptions": { + "$id": "1855", + "json": { + "$id": "1856", + "name": "id" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultSecretGroup.sourceVault", + "serializationOptions": { + "$id": "1857", + "json": { + "$id": "1858", + "name": "sourceVault" + } + } + }, + { + "$id": "1859", + "kind": "property", + "name": "vaultCertificates", + "serializedName": "vaultCertificates", + "doc": "The list of key vault references in SourceVault which contain certificates.", + "type": { + "$id": "1860", + "kind": "array", + "name": "ArrayVaultCertificate", + "valueType": { + "$id": "1861", + "kind": "model", + "name": "NodeTypeVaultCertificate", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultCertificate", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM.", + "decorators": [], + "properties": [ + { + "$id": "1862", + "kind": "property", + "name": "certificateUrl", + "serializedName": "certificateUrl", + "doc": "This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add).", + "type": { + "$id": "1863", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultCertificate.certificateUrl", + "serializationOptions": { + "$id": "1864", + "json": { + "$id": "1865", + "name": "certificateUrl" + } + } + }, + { + "$id": "1866", + "kind": "property", + "name": "certificateStore", + "serializedName": "certificateStore", + "doc": "For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted.", + "type": { + "$id": "1867", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultCertificate.certificateStore", + "serializationOptions": { + "$id": "1868", + "json": { + "$id": "1869", + "name": "certificateStore" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultSecretGroup.vaultCertificates", + "serializationOptions": { + "$id": "1870", + "json": { + "$id": "1871", + "name": "vaultCertificates" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmSecrets", + "serializationOptions": { + "$id": "1872", + "json": { + "$id": "1873", + "name": "vmSecrets" + } + } + }, + { + "$id": "1874", + "kind": "property", + "name": "vmExtensions", + "serializedName": "vmExtensions", + "doc": "Set of extensions that should be installed onto the virtual machines.", + "type": { + "$id": "1875", + "kind": "array", + "name": "ArrayVmssExtension", + "valueType": { + "$id": "1876", + "kind": "model", + "name": "NodeTypeVmssExtension", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtension", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies set of extensions that should be installed onto the virtual machines.", + "decorators": [], + "properties": [ + { + "$id": "1877", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the extension.", + "type": { + "$id": "1878", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtension.name", + "serializationOptions": { + "$id": "1879", + "json": { + "$id": "1880", + "name": "name" + } + } + }, + { + "$id": "1881", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Describes the properties of a Virtual Machine Scale Set Extension.", + "type": { + "$id": "1882", + "kind": "model", + "name": "VmssExtensionProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the properties of a Virtual Machine Scale Set Extension.", + "decorators": [], + "properties": [ + { + "$id": "1883", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The name of the extension handler publisher.", + "type": { + "$id": "1884", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.publisher", + "serializationOptions": { + "$id": "1885", + "json": { + "$id": "1886", + "name": "publisher" + } + } + }, + { + "$id": "1887", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Specifies the type of the extension; an example is \"CustomScriptExtension\".", + "type": { + "$id": "1888", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.type", + "serializationOptions": { + "$id": "1889", + "json": { + "$id": "1890", + "name": "type" + } + } + }, + { + "$id": "1891", + "kind": "property", + "name": "typeHandlerVersion", + "serializedName": "typeHandlerVersion", + "doc": "Specifies the version of the script handler.", + "type": { + "$id": "1892", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.typeHandlerVersion", + "serializationOptions": { + "$id": "1893", + "json": { + "$id": "1894", + "name": "typeHandlerVersion" + } + } + }, + { + "$id": "1895", + "kind": "property", + "name": "autoUpgradeMinorVersion", + "serializedName": "autoUpgradeMinorVersion", + "doc": "Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.", + "type": { + "$id": "1896", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.autoUpgradeMinorVersion", + "serializationOptions": { + "$id": "1897", + "json": { + "$id": "1898", + "name": "autoUpgradeMinorVersion" + } + } + }, + { + "$id": "1899", + "kind": "property", + "name": "settings", + "serializedName": "settings", + "doc": "Json formatted public settings for the extension.", + "type": { + "$id": "1900", + "kind": "model", + "name": "VMSSExtensionPropertiesSettings", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.settings.anonymous", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.settings", + "serializationOptions": { + "$id": "1901", + "json": { + "$id": "1902", + "name": "settings" + } + } + }, + { + "$id": "1903", + "kind": "property", + "name": "protectedSettings", + "serializedName": "protectedSettings", + "doc": "The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.", + "type": { + "$id": "1904", + "kind": "model", + "name": "VMSSExtensionPropertiesProtectedSettings", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.protectedSettings.anonymous", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.protectedSettings", + "serializationOptions": { + "$id": "1905", + "json": { + "$id": "1906", + "name": "protectedSettings" + } + } + }, + { + "$id": "1907", + "kind": "property", + "name": "forceUpdateTag", + "serializedName": "forceUpdateTag", + "doc": "If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed.", + "type": { + "$id": "1908", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.forceUpdateTag", + "serializationOptions": { + "$id": "1909", + "json": { + "$id": "1910", + "name": "forceUpdateTag" + } + } + }, + { + "$id": "1911", + "kind": "property", + "name": "provisionAfterExtensions", + "serializedName": "provisionAfterExtensions", + "doc": "Collection of extension names after which this extension needs to be provisioned.", + "type": { + "$id": "1912", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1913", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.provisionAfterExtensions", + "serializationOptions": { + "$id": "1914", + "json": { + "$id": "1915", + "name": "provisionAfterExtensions" + } + } + }, + { + "$id": "1916", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state, which only appears in the response.", + "type": { + "$id": "1917", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.provisioningState", + "serializationOptions": { + "$id": "1918", + "json": { + "$id": "1919", + "name": "provisioningState" + } + } + }, + { + "$id": "1920", + "kind": "property", + "name": "IsAutomaticUpgradeEnabled", + "serializedName": "enableAutomaticUpgrade", + "doc": "Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.", + "type": { + "$id": "1921", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.enableAutomaticUpgrade", + "serializationOptions": { + "$id": "1922", + "json": { + "$id": "1923", + "name": "enableAutomaticUpgrade" + } + } + }, + { + "$id": "1924", + "kind": "property", + "name": "setupOrder", + "serializedName": "setupOrder", + "doc": "Indicates the setup order for the extension.", + "type": { + "$id": "1925", + "kind": "array", + "name": "ArrayVmssExtensionSetupOrder", + "valueType": { + "$ref": "300" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.setupOrder", + "serializationOptions": { + "$id": "1926", + "json": { + "$id": "1927", + "name": "setupOrder" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtension.properties", + "serializationOptions": { + "$id": "1928", + "json": { + "$id": "1929", + "name": "properties" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmExtensions", + "serializationOptions": { + "$id": "1930", + "json": { + "$id": "1931", + "name": "vmExtensions" + } + } + }, + { + "$id": "1932", + "kind": "property", + "name": "vmManagedIdentity", + "serializedName": "vmManagedIdentity", + "doc": "Identities to assign to the virtual machine scale set under the node type.", + "type": { + "$id": "1933", + "kind": "model", + "name": "VmManagedIdentity", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmManagedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Identities for the virtual machine scale set under the node type.", + "decorators": [], + "properties": [ + { + "$id": "1934", + "kind": "property", + "name": "-|arm-id", + "serializedName": "userAssignedIdentities", + "doc": "The list of user identities associated with the virtual machine scale set under the node type. Each entry will be an ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", + "type": { + "$id": "1935", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1936", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmManagedIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "1937", + "json": { + "$id": "1938", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmManagedIdentity", + "serializationOptions": { + "$id": "1939", + "json": { + "$id": "1940", + "name": "vmManagedIdentity" + } + } + }, + { + "$id": "1941", + "kind": "property", + "name": "isStateless", + "serializedName": "isStateless", + "doc": "Indicates if the node type can only host Stateless workloads.", + "type": { + "$id": "1942", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.isStateless", + "serializationOptions": { + "$id": "1943", + "json": { + "$id": "1944", + "name": "isStateless" + } + } + }, + { + "$id": "1945", + "kind": "property", + "name": "HasMultiplePlacementGroups", + "serializedName": "multiplePlacementGroups", + "doc": "Indicates if scale set associated with the node type can be composed of multiple placement groups.", + "type": { + "$id": "1946", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.multiplePlacementGroups", + "serializationOptions": { + "$id": "1947", + "json": { + "$id": "1948", + "name": "multiplePlacementGroups" + } + } + }, + { + "$id": "1949", + "kind": "property", + "name": "frontendConfigurations", + "serializedName": "frontendConfigurations", + "doc": "Indicates the node type uses its own frontend configurations instead of the default one for the cluster. This setting can only be specified for non-primary node types and can not be added or removed after the node type is created.", + "type": { + "$id": "1950", + "kind": "array", + "name": "ArrayFrontendConfiguration", + "valueType": { + "$id": "1951", + "kind": "model", + "name": "NodeTypeFrontendConfiguration", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the frontend configurations for the node type.", + "decorators": [], + "properties": [ + { + "$id": "1952", + "kind": "property", + "name": "ipAddressType", + "serializedName": "ipAddressType", + "doc": "The IP address type of this frontend configuration. If omitted the default value is IPv4.", + "type": { + "$ref": "304" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration.ipAddressType", + "serializationOptions": { + "$id": "1953", + "json": { + "$id": "1954", + "name": "ipAddressType" + } + } + }, + { + "$id": "1955", + "kind": "property", + "name": "loadBalancerBackendAddressPoolId", + "serializedName": "loadBalancerBackendAddressPoolId", + "doc": "The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'.", + "type": { + "$id": "1956", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1957", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration.loadBalancerBackendAddressPoolId", + "serializationOptions": { + "$id": "1958", + "json": { + "$id": "1959", + "name": "loadBalancerBackendAddressPoolId" + } + } + }, + { + "$id": "1960", + "kind": "property", + "name": "loadBalancerInboundNatPoolId", + "serializedName": "loadBalancerInboundNatPoolId", + "doc": "The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'.", + "type": { + "$id": "1961", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1962", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration.loadBalancerInboundNatPoolId", + "serializationOptions": { + "$id": "1963", + "json": { + "$id": "1964", + "name": "loadBalancerInboundNatPoolId" + } + } + }, + { + "$id": "1965", + "kind": "property", + "name": "applicationGatewayBackendAddressPoolId", + "serializedName": "applicationGatewayBackendAddressPoolId", + "doc": "The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions//resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'.", + "type": { + "$id": "1966", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1967", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration.applicationGatewayBackendAddressPoolId", + "serializationOptions": { + "$id": "1968", + "json": { + "$id": "1969", + "name": "applicationGatewayBackendAddressPoolId" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.frontendConfigurations", + "serializationOptions": { + "$id": "1970", + "json": { + "$id": "1971", + "name": "frontendConfigurations" + } + } + }, + { + "$id": "1972", + "kind": "property", + "name": "networkSecurityRules", + "serializedName": "networkSecurityRules", + "doc": "The Network Security Rules for this node type. This setting can only be specified for node types that are configured with frontend configurations.", + "type": { + "$id": "1973", + "kind": "array", + "name": "ArrayNetworkSecurityRule", + "valueType": { + "$ref": "1264" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.networkSecurityRules", + "serializationOptions": { + "$id": "1974", + "json": { + "$id": "1975", + "name": "networkSecurityRules" + } + } + }, + { + "$id": "1976", + "kind": "property", + "name": "additionalDataDisks", + "serializedName": "additionalDataDisks", + "doc": "Additional managed data disks.", + "type": { + "$id": "1977", + "kind": "array", + "name": "ArrayVmssDataDisk", + "valueType": { + "$id": "1978", + "kind": "model", + "name": "NodeTypeVmssDataDisk", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Managed data disk description.", + "decorators": [], + "properties": [ + { + "$id": "1979", + "kind": "property", + "name": "lun", + "serializedName": "lun", + "doc": "Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. Lun 0 is reserved for the service fabric data disk.", + "type": { + "$id": "1980", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk.lun", + "serializationOptions": { + "$id": "1981", + "json": { + "$id": "1982", + "name": "lun" + } + } + }, + { + "$id": "1983", + "kind": "property", + "name": "DiskSizeInGB", + "serializedName": "diskSizeGB", + "doc": "Disk size for each vm in the node type in GBs.", + "type": { + "$id": "1984", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk.diskSizeGB", + "serializationOptions": { + "$id": "1985", + "json": { + "$id": "1986", + "name": "diskSizeGB" + } + } + }, + { + "$id": "1987", + "kind": "property", + "name": "diskType", + "serializedName": "diskType", + "doc": "Managed data disk type. Specifies the storage account type for the managed disk", + "type": { + "$ref": "286" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk.diskType", + "serializationOptions": { + "$id": "1988", + "json": { + "$id": "1989", + "name": "diskType" + } + } + }, + { + "$id": "1990", + "kind": "property", + "name": "diskLetter", + "serializedName": "diskLetter", + "doc": "Managed data disk letter. It can not use the reserved letter C or D and it can not change after created.", + "type": { + "$id": "1991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk.diskLetter", + "serializationOptions": { + "$id": "1992", + "json": { + "$id": "1993", + "name": "diskLetter" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.additionalDataDisks", + "serializationOptions": { + "$id": "1994", + "json": { + "$id": "1995", + "name": "additionalDataDisks" + } + } + }, + { + "$id": "1996", + "kind": "property", + "name": "IsEncryptionAtHostEnabled", + "serializedName": "enableEncryptionAtHost", + "doc": "Enable or disable the Host Encryption for the virtual machines on the node type. This will enable the encryption for all the disks including Resource/Temp disk at host itself. Default: The Encryption at host will be disabled unless this property is set to true for the resource.", + "type": { + "$id": "1997", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableEncryptionAtHost", + "serializationOptions": { + "$id": "1998", + "json": { + "$id": "1999", + "name": "enableEncryptionAtHost" + } + } + }, + { + "$id": "2000", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state of the node type resource.", + "type": { + "$ref": "176" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.provisioningState", + "serializationOptions": { + "$id": "2001", + "json": { + "$id": "2002", + "name": "provisioningState" + } + } + }, + { + "$id": "2003", + "kind": "property", + "name": "IsAcceleratedNetworkingEnabled", + "serializedName": "enableAcceleratedNetworking", + "doc": "Specifies whether the network interface is accelerated networking-enabled.", + "type": { + "$id": "2004", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableAcceleratedNetworking", + "serializationOptions": { + "$id": "2005", + "json": { + "$id": "2006", + "name": "enableAcceleratedNetworking" + } + } + }, + { + "$id": "2007", + "kind": "property", + "name": "useDefaultPublicLoadBalancer", + "serializedName": "useDefaultPublicLoadBalancer", + "doc": "Specifies whether the use public load balancer. If not specified and the node type doesn't have its own frontend configuration, it will be attached to the default load balancer. If the node type uses its own Load balancer and useDefaultPublicLoadBalancer is true, then the frontend has to be an Internal Load Balancer. If the node type uses its own Load balancer and useDefaultPublicLoadBalancer is false or not set, then the custom load balancer must include a public load balancer to provide outbound connectivity.", + "type": { + "$id": "2008", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.useDefaultPublicLoadBalancer", + "serializationOptions": { + "$id": "2009", + "json": { + "$id": "2010", + "name": "useDefaultPublicLoadBalancer" + } + } + }, + { + "$id": "2011", + "kind": "property", + "name": "useTempDataDisk", + "serializedName": "useTempDataDisk", + "doc": "Specifies whether to use the temporary disk for the service fabric data root, in which case no managed data disk will be attached and the temporary disk will be used. It is only allowed for stateless node types.", + "type": { + "$id": "2012", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.useTempDataDisk", + "serializationOptions": { + "$id": "2013", + "json": { + "$id": "2014", + "name": "useTempDataDisk" + } + } + }, + { + "$id": "2015", + "kind": "property", + "name": "IsOverProvisioningEnabled", + "serializedName": "enableOverProvisioning", + "doc": "Specifies whether the node type should be overprovisioned. It is only allowed for stateless node types.", + "type": { + "$id": "2016", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableOverProvisioning", + "serializationOptions": { + "$id": "2017", + "json": { + "$id": "2018", + "name": "enableOverProvisioning" + } + } + }, + { + "$id": "2019", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Specifies the availability zones where the node type would span across. If the cluster is not spanning across availability zones, initiates az migration for the cluster.", + "type": { + "$id": "2020", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.zones", + "serializationOptions": { + "$id": "2022", + "json": { + "$id": "2023", + "name": "zones" + } + } + }, + { + "$id": "2024", + "kind": "property", + "name": "isSpotVM", + "serializedName": "isSpotVM", + "doc": "Indicates whether the node type will be Spot Virtual Machines. Azure will allocate the VMs if there is capacity available and the VMs can be evicted at any time.", + "type": { + "$id": "2025", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.isSpotVM", + "serializationOptions": { + "$id": "2026", + "json": { + "$id": "2027", + "name": "isSpotVM" + } + } + }, + { + "$id": "2028", + "kind": "property", + "name": "hostGroupId", + "serializedName": "hostGroupId", + "doc": "Specifies the full host group resource Id. This property is used for deploying on azure dedicated hosts.", + "type": { + "$id": "2029", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.hostGroupId", + "serializationOptions": { + "$id": "2030", + "json": { + "$id": "2031", + "name": "hostGroupId" + } + } + }, + { + "$id": "2032", + "kind": "property", + "name": "useEphemeralOSDisk", + "serializedName": "useEphemeralOSDisk", + "doc": "Indicates whether to use ephemeral os disk. The sku selected on the vmSize property needs to support this feature.", + "type": { + "$id": "2033", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.useEphemeralOSDisk", + "serializationOptions": { + "$id": "2034", + "json": { + "$id": "2035", + "name": "useEphemeralOSDisk" + } + } + }, + { + "$id": "2036", + "kind": "property", + "name": "spotRestoreTimeout", + "serializedName": "spotRestoreTimeout", + "doc": "Indicates the time duration after which the platform will not try to restore the VMSS SPOT instances specified as ISO 8601.", + "type": { + "$id": "2037", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.spotRestoreTimeout", + "serializationOptions": { + "$id": "2038", + "json": { + "$id": "2039", + "name": "spotRestoreTimeout" + } + } + }, + { + "$id": "2040", + "kind": "property", + "name": "evictionPolicy", + "serializedName": "evictionPolicy", + "doc": "Specifies the eviction policy for virtual machines in a SPOT node type. Default is Delete.", + "type": { + "$ref": "310" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.evictionPolicy", + "serializationOptions": { + "$id": "2041", + "json": { + "$id": "2042", + "name": "evictionPolicy" + } + } + }, + { + "$id": "2043", + "kind": "property", + "name": "vmImageResourceId", + "serializedName": "vmImageResourceId", + "doc": "Indicates the resource id of the vm image. This parameter is used for custom vm image.", + "type": { + "$id": "2044", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2045", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImageResourceId", + "serializationOptions": { + "$id": "2046", + "json": { + "$id": "2047", + "name": "vmImageResourceId" + } + } + }, + { + "$id": "2048", + "kind": "property", + "name": "subnetId", + "serializedName": "subnetId", + "doc": "Indicates the resource id of the subnet for the node type.", + "type": { + "$id": "2049", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2050", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.subnetId", + "serializationOptions": { + "$id": "2051", + "json": { + "$id": "2052", + "name": "subnetId" + } + } + }, + { + "$id": "2053", + "kind": "property", + "name": "vmSetupActions", + "serializedName": "vmSetupActions", + "doc": "Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime.", + "type": { + "$id": "2054", + "kind": "array", + "name": "ArrayVmSetupAction", + "valueType": { + "$ref": "316" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmSetupActions", + "serializationOptions": { + "$id": "2055", + "json": { + "$id": "2056", + "name": "vmSetupActions" + } + } + }, + { + "$id": "2057", + "kind": "property", + "name": "securityType", + "serializedName": "securityType", + "doc": "Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported", + "type": { + "$ref": "322" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.securityType", + "serializationOptions": { + "$id": "2058", + "json": { + "$id": "2059", + "name": "securityType" + } + } + }, + { + "$id": "2060", + "kind": "property", + "name": "IsSecureBootEnabled", + "serializedName": "secureBootEnabled", + "doc": "Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType", + "type": { + "$id": "2061", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.secureBootEnabled", + "serializationOptions": { + "$id": "2062", + "json": { + "$id": "2063", + "name": "secureBootEnabled" + } + } + }, + { + "$id": "2064", + "kind": "property", + "name": "IsNodePublicIPEnabled", + "serializedName": "enableNodePublicIP", + "doc": "Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers.", + "type": { + "$id": "2065", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableNodePublicIP", + "serializationOptions": { + "$id": "2066", + "json": { + "$id": "2067", + "name": "enableNodePublicIP" + } + } + }, + { + "$id": "2068", + "kind": "property", + "name": "IsNodePublicIPv6Enabled", + "serializedName": "enableNodePublicIPv6", + "doc": "Specifies whether each node is allocated its own public IPv6 address. This is only supported on secondary node types with custom Load Balancers.", + "type": { + "$id": "2069", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableNodePublicIPv6", + "serializationOptions": { + "$id": "2070", + "json": { + "$id": "2071", + "name": "enableNodePublicIPv6" + } + } + }, + { + "$id": "2072", + "kind": "property", + "name": "vmSharedGalleryImageId", + "serializedName": "vmSharedGalleryImageId", + "doc": "Indicates the resource id of the vm shared galleries image. This parameter is used for custom vm image.", + "type": { + "$id": "2073", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2074", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmSharedGalleryImageId", + "serializationOptions": { + "$id": "2075", + "json": { + "$id": "2076", + "name": "vmSharedGalleryImageId" + } + } + }, + { + "$id": "2077", + "kind": "property", + "name": "natGatewayId", + "serializedName": "natGatewayId", + "doc": "Specifies the resource id of a NAT Gateway to attach to the subnet of this node type. Node type must use custom load balancer.", + "type": { + "$id": "2078", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2079", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.natGatewayId", + "serializationOptions": { + "$id": "2080", + "json": { + "$id": "2081", + "name": "natGatewayId" + } + } + }, + { + "$id": "2082", + "kind": "property", + "name": "natConfigurations", + "serializedName": "natConfigurations", + "doc": "Specifies the NAT configuration on default public Load Balancer for the node type. This is only supported for node types use the default public Load Balancer.", + "type": { + "$id": "2083", + "kind": "array", + "name": "ArrayNodeTypeNatConfig", + "valueType": { + "$id": "2084", + "kind": "model", + "name": "NodeTypeNatConfig", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeNatConfig", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Provides information about NAT configuration on the default public Load Balancer for the node type.", + "decorators": [], + "properties": [ + { + "$id": "2085", + "kind": "property", + "name": "backendPort", + "serializedName": "backendPort", + "doc": "The internal port for the NAT configuration.", + "type": { + "$id": "2086", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeNatConfig.backendPort", + "serializationOptions": { + "$id": "2087", + "json": { + "$id": "2088", + "name": "backendPort" + } + } + }, + { + "$id": "2089", + "kind": "property", + "name": "frontendPortRangeStart", + "serializedName": "frontendPortRangeStart", + "doc": "The port range start for the external endpoint.", + "type": { + "$id": "2090", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeNatConfig.frontendPortRangeStart", + "serializationOptions": { + "$id": "2091", + "json": { + "$id": "2092", + "name": "frontendPortRangeStart" + } + } + }, + { + "$id": "2093", + "kind": "property", + "name": "frontendPortRangeEnd", + "serializedName": "frontendPortRangeEnd", + "doc": "The port range end for the external endpoint.", + "type": { + "$id": "2094", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeNatConfig.frontendPortRangeEnd", + "serializationOptions": { + "$id": "2095", + "json": { + "$id": "2096", + "name": "frontendPortRangeEnd" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.natConfigurations", + "serializationOptions": { + "$id": "2097", + "json": { + "$id": "2098", + "name": "natConfigurations" + } + } + }, + { + "$id": "2099", + "kind": "property", + "name": "vmImagePlan", + "serializedName": "vmImagePlan", + "doc": "Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.", + "type": { + "$id": "2100", + "kind": "model", + "name": "VmImagePlan", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started. Enter any required information and then click Save.", + "decorators": [], + "properties": [ + { + "$id": "2101", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The plan ID.", + "type": { + "$id": "2102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan.name", + "serializationOptions": { + "$id": "2103", + "json": { + "$id": "2104", + "name": "name" + } + } + }, + { + "$id": "2105", + "kind": "property", + "name": "product", + "serializedName": "product", + "doc": "Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.", + "type": { + "$id": "2106", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan.product", + "serializationOptions": { + "$id": "2107", + "json": { + "$id": "2108", + "name": "product" + } + } + }, + { + "$id": "2109", + "kind": "property", + "name": "promotionCode", + "serializedName": "promotionCode", + "doc": "The promotion code.", + "type": { + "$id": "2110", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan.promotionCode", + "serializationOptions": { + "$id": "2111", + "json": { + "$id": "2112", + "name": "promotionCode" + } + } + }, + { + "$id": "2113", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The publisher ID.", + "type": { + "$id": "2114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan.publisher", + "serializationOptions": { + "$id": "2115", + "json": { + "$id": "2116", + "name": "publisher" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImagePlan", + "serializationOptions": { + "$id": "2117", + "json": { + "$id": "2118", + "name": "vmImagePlan" + } + } + }, + { + "$id": "2119", + "kind": "property", + "name": "serviceArtifactReferenceId", + "serializedName": "serviceArtifactReferenceId", + "doc": "Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version.", + "type": { + "$id": "2120", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.serviceArtifactReferenceId", + "serializationOptions": { + "$id": "2122", + "json": { + "$id": "2123", + "name": "serviceArtifactReferenceId" + } + } + }, + { + "$id": "2124", + "kind": "property", + "name": "dscpConfigurationId", + "serializedName": "dscpConfigurationId", + "doc": "Specifies the resource id of the DSCP configuration to apply to the node type network interface.", + "type": { + "$id": "2125", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2126", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.dscpConfigurationId", + "serializationOptions": { + "$id": "2127", + "json": { + "$id": "2128", + "name": "dscpConfigurationId" + } + } + }, + { + "$id": "2129", + "kind": "property", + "name": "additionalNetworkInterfaceConfigurations", + "serializedName": "additionalNetworkInterfaceConfigurations", + "doc": "Specifies the settings for any additional secondary network interfaces to attach to the node type.", + "type": { + "$id": "2130", + "kind": "array", + "name": "ArrayAdditionalNetworkInterfaceConfiguration", + "valueType": { + "$id": "2131", + "kind": "model", + "name": "AdditionalNetworkInterfaceConfiguration", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies the settings for a network interface to attach to the node type.", + "decorators": [], + "properties": [ + { + "$id": "2132", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the network interface.", + "type": { + "$id": "2133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration.name", + "serializationOptions": { + "$id": "2134", + "json": { + "$id": "2135", + "name": "name" + } + } + }, + { + "$id": "2136", + "kind": "property", + "name": "enableAcceleratedNetworking", + "serializedName": "enableAcceleratedNetworking", + "doc": "Specifies whether the network interface is accelerated networking-enabled.", + "type": { + "$id": "2137", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration.enableAcceleratedNetworking", + "serializationOptions": { + "$id": "2138", + "json": { + "$id": "2139", + "name": "enableAcceleratedNetworking" + } + } + }, + { + "$id": "2140", + "kind": "property", + "name": "dscpConfiguration", + "serializedName": "dscpConfiguration", + "doc": "Specifies the DSCP configuration to apply to the network interface.", + "type": { + "$ref": "1852" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration.dscpConfiguration", + "serializationOptions": { + "$id": "2141", + "json": { + "$id": "2142", + "name": "dscpConfiguration" + } + } + }, + { + "$id": "2143", + "kind": "property", + "name": "ipConfigurations", + "serializedName": "ipConfigurations", + "doc": "Specifies the IP configurations of the network interface.", + "type": { + "$id": "2144", + "kind": "array", + "name": "ArrayIpConfiguration", + "valueType": { + "$id": "2145", + "kind": "model", + "name": "ServiceFabricManagedClusterIPConfiguration", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies an IP configuration of the network interface.", + "decorators": [], + "properties": [ + { + "$id": "2146", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the network interface.", + "type": { + "$id": "2147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.name", + "serializationOptions": { + "$id": "2148", + "json": { + "$id": "2149", + "name": "name" + } + } + }, + { + "$id": "2150", + "kind": "property", + "name": "applicationGatewayBackendAddressPools", + "serializedName": "applicationGatewayBackendAddressPools", + "doc": "Specifies an array of references to backend address pools of application gateways. A node type can reference backend address pools of multiple application gateways. Multiple node types cannot use the same application gateway.", + "type": { + "$id": "2151", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "1852" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.applicationGatewayBackendAddressPools", + "serializationOptions": { + "$id": "2152", + "json": { + "$id": "2153", + "name": "applicationGatewayBackendAddressPools" + } + } + }, + { + "$id": "2154", + "kind": "property", + "name": "loadBalancerBackendAddressPools", + "serializedName": "loadBalancerBackendAddressPools", + "doc": "Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer.", + "type": { + "$id": "2155", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "1852" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.loadBalancerBackendAddressPools", + "serializationOptions": { + "$id": "2156", + "json": { + "$id": "2157", + "name": "loadBalancerBackendAddressPools" + } + } + }, + { + "$id": "2158", + "kind": "property", + "name": "loadBalancerInboundNatPools", + "serializedName": "loadBalancerInboundNatPools", + "doc": "Specifies an array of references to inbound Nat pools of the load balancers. A node type can reference inbound nat pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer.", + "type": { + "$id": "2159", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "1852" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.loadBalancerInboundNatPools", + "serializationOptions": { + "$id": "2160", + "json": { + "$id": "2161", + "name": "loadBalancerInboundNatPools" + } + } + }, + { + "$id": "2162", + "kind": "property", + "name": "subnet", + "serializedName": "subnet", + "doc": "Specifies the subnet of the network interface.", + "type": { + "$ref": "1852" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.subnet", + "serializationOptions": { + "$id": "2163", + "json": { + "$id": "2164", + "name": "subnet" + } + } + }, + { + "$id": "2165", + "kind": "property", + "name": "privateIPAddressVersion", + "serializedName": "privateIPAddressVersion", + "doc": "Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4.", + "type": { + "$ref": "328" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.privateIPAddressVersion", + "serializationOptions": { + "$id": "2166", + "json": { + "$id": "2167", + "name": "privateIPAddressVersion" + } + } + }, + { + "$id": "2168", + "kind": "property", + "name": "publicIPAddressConfiguration", + "serializedName": "publicIPAddressConfiguration", + "doc": "The public IP address configuration of the network interface.", + "type": { + "$id": "2169", + "kind": "model", + "name": "ServiceFabricManagedClusterPublicIPAddressConfiguration", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The public IP address configuration of the network interface.", + "decorators": [], + "properties": [ + { + "$id": "2170", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the network interface.", + "type": { + "$id": "2171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressConfiguration.name", + "serializationOptions": { + "$id": "2172", + "json": { + "$id": "2173", + "name": "name" + } + } + }, + { + "$id": "2174", + "kind": "property", + "name": "ipTags", + "serializedName": "ipTags", + "doc": "Specifies the list of IP tags associated with the public IP address.", + "type": { + "$id": "2175", + "kind": "array", + "name": "ArrayIpTag", + "valueType": { + "$ref": "1427" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressConfiguration.ipTags", + "serializationOptions": { + "$id": "2176", + "json": { + "$id": "2177", + "name": "ipTags" + } + } + }, + { + "$id": "2178", + "kind": "property", + "name": "publicIPAddressVersion", + "serializedName": "publicIPAddressVersion", + "doc": "Specifies whether the IP configuration's public IP is IPv4 or IPv6. Default is IPv4.", + "type": { + "$ref": "334" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressConfiguration.publicIPAddressVersion", + "serializationOptions": { + "$id": "2179", + "json": { + "$id": "2180", + "name": "publicIPAddressVersion" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.publicIPAddressConfiguration", + "serializationOptions": { + "$id": "2181", + "json": { + "$id": "2182", + "name": "publicIPAddressConfiguration" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration.ipConfigurations", + "serializationOptions": { + "$id": "2183", + "json": { + "$id": "2184", + "name": "ipConfigurations" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.additionalNetworkInterfaceConfigurations", + "serializationOptions": { + "$id": "2185", + "json": { + "$id": "2186", + "name": "additionalNetworkInterfaceConfigurations" + } + } + }, + { + "$id": "2187", + "kind": "property", + "name": "computerNamePrefix", + "serializedName": "computerNamePrefix", + "doc": "Specifies the computer name prefix. Limited to 9 characters. If specified, allows for a longer name to be specified for the node type name.", + "type": { + "$id": "2188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.computerNamePrefix", + "serializationOptions": { + "$id": "2189", + "json": { + "$id": "2190", + "name": "computerNamePrefix" + } + } + }, + { + "$id": "2191", + "kind": "property", + "name": "vmApplications", + "serializedName": "vmApplications", + "doc": "Specifies the gallery applications that should be made available to the underlying VMSS.", + "type": { + "$id": "2192", + "kind": "array", + "name": "ArrayVmApplication", + "valueType": { + "$id": "2193", + "kind": "model", + "name": "ServiceFabricManagedVmApplication", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies the gallery application that should be made available to the underlying VMSS.", + "decorators": [], + "properties": [ + { + "$id": "2194", + "kind": "property", + "name": "configurationReference", + "serializedName": "configurationReference", + "doc": "Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided.", + "type": { + "$id": "2195", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.configurationReference", + "serializationOptions": { + "$id": "2196", + "json": { + "$id": "2197", + "name": "configurationReference" + } + } + }, + { + "$id": "2198", + "kind": "property", + "name": "enableAutomaticUpgrade", + "serializedName": "enableAutomaticUpgrade", + "doc": "If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated for the underlying VMSS.", + "type": { + "$id": "2199", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.enableAutomaticUpgrade", + "serializationOptions": { + "$id": "2200", + "json": { + "$id": "2201", + "name": "enableAutomaticUpgrade" + } + } + }, + { + "$id": "2202", + "kind": "property", + "name": "order", + "serializedName": "order", + "doc": "Optional, Specifies the order in which the packages have to be installed.", + "type": { + "$id": "2203", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.order", + "serializationOptions": { + "$id": "2204", + "json": { + "$id": "2205", + "name": "order" + } + } + }, + { + "$id": "2206", + "kind": "property", + "name": "packageReferenceId", + "serializedName": "packageReferenceId", + "doc": "Specifies the GalleryApplicationVersion resource id on the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}.", + "type": { + "$id": "2207", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2208", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.packageReferenceId", + "serializationOptions": { + "$id": "2209", + "json": { + "$id": "2210", + "name": "packageReferenceId" + } + } + }, + { + "$id": "2211", + "kind": "property", + "name": "vmGalleryTags", + "serializedName": "vmGalleryTags", + "doc": "Optional, Specifies a passthrough value for more generic context. Accepts a JSON-formatted string e.g. '{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}'.", + "type": { + "$id": "2212", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.vmGalleryTags", + "serializationOptions": { + "$id": "2213", + "json": { + "$id": "2214", + "name": "vmGalleryTags" + } + } + }, + { + "$id": "2215", + "kind": "property", + "name": "treatFailureAsDeploymentFailure", + "serializedName": "treatFailureAsDeploymentFailure", + "doc": "Optional, If true, any failure for any operation in the VmApplication will fail the deployment.", + "type": { + "$id": "2216", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.treatFailureAsDeploymentFailure", + "serializationOptions": { + "$id": "2217", + "json": { + "$id": "2218", + "name": "treatFailureAsDeploymentFailure" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmApplications", + "serializationOptions": { + "$id": "2219", + "json": { + "$id": "2220", + "name": "vmApplications" + } + } + }, + { + "$id": "2221", + "kind": "property", + "name": "zoneBalance", + "serializedName": "zoneBalance", + "doc": "Setting this to true allows stateless node types to scale out without equal distribution across zones.", + "type": { + "$id": "2222", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.zoneBalance", + "serializationOptions": { + "$id": "2223", + "json": { + "$id": "2224", + "name": "zoneBalance" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType.properties", + "serializationOptions": { + "$id": "2225", + "json": { + "$id": "2226", + "name": "properties" + } + } + }, + { + "$id": "2227", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "2228", + "kind": "dict", + "keyType": { + "$id": "2229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2230", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType.tags", + "serializationOptions": { + "$id": "2231", + "json": { + "$id": "2232", + "name": "tags" + } + } + }, + { + "$id": "2233", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The node type sku.", + "type": { + "$id": "2234", + "kind": "model", + "name": "NodeTypeSku", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSku", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a node type sku.", + "decorators": [], + "properties": [ + { + "$id": "2235", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The sku name. Name is internally generated and is used in auto-scale scenarios. Property does not allow to be changed to other values than generated. To avoid deployment errors please omit the property.", + "type": { + "$id": "2236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSku.name", + "serializationOptions": { + "$id": "2237", + "json": { + "$id": "2238", + "name": "name" + } + } + }, + { + "$id": "2239", + "kind": "property", + "name": "tier", + "serializedName": "tier", + "doc": "Specifies the tier of the node type. Possible Values: **Standard**", + "type": { + "$id": "2240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSku.tier", + "serializationOptions": { + "$id": "2241", + "json": { + "$id": "2242", + "name": "tier" + } + } + }, + { + "$id": "2243", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "doc": "The number of nodes in the node type. If present in request it will override properties.vmInstanceCount.", + "type": { + "$id": "2244", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSku.capacity", + "serializationOptions": { + "$id": "2245", + "json": { + "$id": "2246", + "name": "capacity" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType.sku", + "serializationOptions": { + "$id": "2247", + "json": { + "$id": "2248", + "name": "sku" + } + } + } + ] + }, + { + "$ref": "1781" + }, + { + "$ref": "1814" + }, + { + "$ref": "1850" + }, + { + "$ref": "1852" + }, + { + "$ref": "1861" + }, + { + "$ref": "1876" + }, + { + "$ref": "1882" + }, + { + "$ref": "1900" + }, + { + "$ref": "1904" + }, + { + "$ref": "1933" + }, + { + "$ref": "1951" + }, + { + "$ref": "1978" + }, + { + "$ref": "2084" + }, + { + "$ref": "2100" + }, + { + "$ref": "2131" + }, + { + "$ref": "2145" + }, + { + "$ref": "2169" + }, + { + "$ref": "2193" + }, + { + "$ref": "2234" + }, + { + "$id": "2249", + "kind": "model", + "name": "NodeTypeUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeUpdateParameters", + "usage": "Input,Json", + "doc": "Node type update request", + "decorators": [], + "properties": [ + { + "$id": "2250", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Node type update parameters", + "type": { + "$id": "2251", + "kind": "dict", + "keyType": { + "$id": "2252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeUpdateParameters.tags", + "serializationOptions": { + "$id": "2254", + "json": { + "$id": "2255", + "name": "tags" + } + } + }, + { + "$id": "2256", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The node type sku.", + "type": { + "$ref": "2234" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeUpdateParameters.sku", + "serializationOptions": { + "$id": "2257", + "json": { + "$id": "2258", + "name": "sku" + } + } + } + ] + }, + { + "$id": "2259", + "kind": "model", + "name": "NodeTypeListResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a NodeType list operation.", + "decorators": [], + "properties": [ + { + "$id": "2260", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The NodeType items on this page", + "type": { + "$id": "2261", + "kind": "array", + "name": "ArrayNodeType", + "valueType": { + "$ref": "1779" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "2262", + "json": { + "$id": "2263", + "name": "value" + } + } + }, + { + "$id": "2264", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "2265", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2266", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "2267", + "json": { + "$id": "2268", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "2269", + "kind": "model", + "name": "NodeTypeActionContent", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeActionParameters", + "usage": "Input,Json", + "doc": "Parameters for Node type action. If nodes are not specified on the parameters, the operation will be performed in all nodes of the node type one upgrade domain at a time.", + "decorators": [], + "properties": [ + { + "$id": "2270", + "kind": "property", + "name": "nodes", + "serializedName": "nodes", + "doc": "List of node names from the node type.", + "type": { + "$id": "2271", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2272", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeActionParameters.nodes", + "serializationOptions": { + "$id": "2273", + "json": { + "$id": "2274", + "name": "nodes" + } + } + }, + { + "$id": "2275", + "kind": "property", + "name": "IsForced", + "serializedName": "force", + "doc": "Force the action to go through.", + "type": { + "$id": "2276", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeActionParameters.force", + "serializationOptions": { + "$id": "2277", + "json": { + "$id": "2278", + "name": "force" + } + } + }, + { + "$id": "2279", + "kind": "property", + "name": "updateType", + "serializedName": "updateType", + "doc": "Specifies the way the operation will be performed.", + "type": { + "$ref": "340" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeActionParameters.updateType", + "serializationOptions": { + "$id": "2280", + "json": { + "$id": "2281", + "name": "updateType" + } + } + } + ] + }, + { + "$id": "2282", + "kind": "model", + "name": "NodeTypeListSkuResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeListSkuResult", + "usage": "Output,Json", + "doc": "Node type available sku list results", + "decorators": [], + "properties": [ + { + "$id": "2283", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The NodeTypeAvailableSku items on this page", + "type": { + "$id": "2284", + "kind": "array", + "name": "ArrayNodeTypeAvailableSku", + "valueType": { + "$id": "2285", + "kind": "model", + "name": "NodeTypeAvailableSku", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeAvailableSku", + "usage": "Output,Json", + "doc": "Defines the type of sku available for a node type", + "decorators": [], + "properties": [ + { + "$id": "2286", + "kind": "property", + "name": "-|resource-type", + "serializedName": "resourceType", + "doc": "The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes.", + "type": { + "$id": "2287", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "2288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeAvailableSku.resourceType", + "serializationOptions": { + "$id": "2289", + "json": { + "$id": "2290", + "name": "resourceType" + } + } + }, + { + "$id": "2291", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The supported SKU for a for node type.", + "type": { + "$id": "2292", + "kind": "model", + "name": "NodeTypeSupportedSku", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSupportedSku", + "usage": "Output,Json", + "doc": "Describes a node type supported sku.", + "decorators": [], + "properties": [ + { + "$id": "2293", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The sku name.", + "type": { + "$id": "2294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSupportedSku.name", + "serializationOptions": { + "$id": "2295", + "json": { + "$id": "2296", + "name": "name" + } + } + }, + { + "$id": "2297", + "kind": "property", + "name": "tier", + "serializedName": "tier", + "doc": "Specifies the tier of the node type. Possible Values: **Standard**", + "type": { + "$id": "2298", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSupportedSku.tier", + "serializationOptions": { + "$id": "2299", + "json": { + "$id": "2300", + "name": "tier" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeAvailableSku.sku", + "serializationOptions": { + "$id": "2301", + "json": { + "$id": "2302", + "name": "sku" + } + } + }, + { + "$id": "2303", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "doc": "Provides information about how the node count can be scaled.", + "type": { + "$id": "2304", + "kind": "model", + "name": "NodeTypeSkuCapacity", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity", + "usage": "Output,Json", + "doc": "Provides information about how node type can be scaled.", + "decorators": [], + "properties": [ + { + "$id": "2305", + "kind": "property", + "name": "minimum", + "serializedName": "minimum", + "doc": "Lowest permitted node count in a node type.", + "type": { + "$id": "2306", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity.minimum", + "serializationOptions": { + "$id": "2307", + "json": { + "$id": "2308", + "name": "minimum" + } + } + }, + { + "$id": "2309", + "kind": "property", + "name": "maximum", + "serializedName": "maximum", + "doc": "Highest permitted node count in a node type.", + "type": { + "$id": "2310", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity.maximum", + "serializationOptions": { + "$id": "2311", + "json": { + "$id": "2312", + "name": "maximum" + } + } + }, + { + "$id": "2313", + "kind": "property", + "name": "default", + "serializedName": "default", + "doc": "Default node count in a node type.", + "type": { + "$id": "2314", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity.default", + "serializationOptions": { + "$id": "2315", + "json": { + "$id": "2316", + "name": "default" + } + } + }, + { + "$id": "2317", + "kind": "property", + "name": "scaleType", + "serializedName": "scaleType", + "doc": "Node type capacity scale type.", + "type": { + "$ref": "346" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity.scaleType", + "serializationOptions": { + "$id": "2318", + "json": { + "$id": "2319", + "name": "scaleType" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeAvailableSku.capacity", + "serializationOptions": { + "$id": "2320", + "json": { + "$id": "2321", + "name": "capacity" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeListSkuResult.value", + "serializationOptions": { + "$id": "2322", + "json": { + "$id": "2323", + "name": "value" + } + } + }, + { + "$id": "2324", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "2325", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2326", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeListSkuResult.nextLink", + "serializationOptions": { + "$id": "2327", + "json": { + "$id": "2328", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "2285" + }, + { + "$ref": "2292" + }, + { + "$ref": "2304" + }, + { + "$id": "2329", + "kind": "model", + "name": "LongRunningOperationResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult", + "usage": "Output,Json", + "doc": "Long running operation result.", + "decorators": [], + "properties": [ + { + "$id": "2330", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation.", + "type": { + "$id": "2331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.name", + "serializationOptions": { + "$id": "2332", + "json": { + "$id": "2333", + "name": "name" + } + } + }, + { + "$id": "2334", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "The start time of the operation.", + "type": { + "$id": "2335", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "2336", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.startTime", + "serializationOptions": { + "$id": "2337", + "json": { + "$id": "2338", + "name": "startTime" + } + } + }, + { + "$id": "2339", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "The end time of the operation.", + "type": { + "$id": "2340", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "2341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.endTime", + "serializationOptions": { + "$id": "2342", + "json": { + "$id": "2343", + "name": "endTime" + } + } + }, + { + "$id": "2344", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The completion percentage of the operation.", + "type": { + "$id": "2345", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.percentComplete", + "serializationOptions": { + "$id": "2346", + "json": { + "$id": "2347", + "name": "percentComplete" + } + } + }, + { + "$id": "2348", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the operation.", + "type": { + "$id": "2349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.status", + "serializationOptions": { + "$id": "2350", + "json": { + "$id": "2351", + "name": "status" + } + } + }, + { + "$id": "2352", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The operation error.", + "type": { + "$id": "2353", + "kind": "model", + "name": "ErrorModelError", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ErrorModelError", + "usage": "Output,Json", + "doc": "The error details.", + "decorators": [], + "properties": [ + { + "$id": "2354", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "2355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ErrorModelError.code", + "serializationOptions": { + "$id": "2356", + "json": { + "$id": "2357", + "name": "code" + } + } + }, + { + "$id": "2358", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "2359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ErrorModelError.message", + "serializationOptions": { + "$id": "2360", + "json": { + "$id": "2361", + "name": "message" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.error", + "serializationOptions": { + "$id": "2362", + "json": { + "$id": "2363", + "name": "error" + } + } + } + ] + }, + { + "$ref": "2353" + } + ], + "clients": [ + { + "$id": "2364", + "kind": "client", + "name": "ServiceFabricClient", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Service Fabric Managed Clusters Management Client", + "operations": [], + "parameters": [ + { + "$id": "2365", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2366", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "2367", + "type": { + "$id": "2368", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2369", + "name": "TypeSpec.@service", + "arguments": { + "$id": "2370", + "options": { + "$id": "2371", + "title": "ServiceFabricManagedClustersManagementClient" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "children": [ + { + "$id": "2372", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "2373", + "name": "list", + "resourceName": "Operations", + "summary": "Lists all of the available Service Fabric resource provider API operations.", + "doc": "Get the list of available Service Fabric resource provider API operations.", + "accessibility": "public", + "parameters": [ + { + "$id": "2374", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2376", + "type": { + "$id": "2377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2378", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2379", + "kind": "constant", + "valueType": { + "$id": "2380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2381", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "360" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.ServiceFabric/operations", + "bufferResponse": true, + "paging": { + "$id": "2382", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2383", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "2384", + "kind": "http", + "name": "List the operations for the provider", + "description": "List the operations for the provider", + "filePath": "2025-03-01-preview/OperationsList_example.json", + "parameters": [ + { + "$id": "2385", + "parameter": { + "$ref": "2374" + }, + "value": { + "$id": "2386", + "kind": "string", + "type": { + "$ref": "2375" + }, + "value": "2025-03-01-preview" + } + } + ], + "responses": [ + { + "$id": "2387", + "response": { + "$ref": "2381" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2388", + "kind": "model", + "type": { + "$ref": "360" + }, + "value": { + "$id": "2389", + "value": { + "$id": "2390", + "kind": "array", + "type": { + "$ref": "362" + }, + "value": [ + { + "$id": "2391", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2392", + "name": { + "$id": "2393", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/managedClusters/read" + }, + "display": { + "$id": "2394", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2395", + "provider": { + "$id": "2396", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2397", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "managedClusters" + }, + "operation": { + "$id": "2398", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Read Cluster" + }, + "description": { + "$id": "2399", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Read any Cluster" + } + } + } + } + }, + { + "$id": "2400", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2401", + "name": { + "$id": "2402", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/managedClusters/write" + }, + "display": { + "$id": "2403", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2404", + "provider": { + "$id": "2405", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2406", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "managedClusters" + }, + "operation": { + "$id": "2407", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Create or Update Cluster" + }, + "description": { + "$id": "2408", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Create or Update any Cluster" + } + } + } + } + }, + { + "$id": "2409", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2410", + "name": { + "$id": "2411", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/managedClusters/delete" + }, + "display": { + "$id": "2412", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2413", + "provider": { + "$id": "2414", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2415", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "managedClusters" + }, + "operation": { + "$id": "2416", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Delete Cluster" + }, + "description": { + "$id": "2417", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Delete any Cluster" + } + } + } + } + }, + { + "$id": "2418", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2419", + "name": { + "$id": "2420", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/read" + }, + "display": { + "$id": "2421", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2422", + "provider": { + "$id": "2423", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2424", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2425", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Read Node type" + }, + "description": { + "$id": "2426", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Read any Node type" + } + } + } + } + }, + { + "$id": "2427", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2428", + "name": { + "$id": "2429", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/write" + }, + "display": { + "$id": "2430", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2431", + "provider": { + "$id": "2432", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2433", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2434", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Create or Update Node type" + }, + "description": { + "$id": "2435", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Create or Update any Node type" + } + } + } + } + }, + { + "$id": "2436", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2437", + "name": { + "$id": "2438", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/delete" + }, + "display": { + "$id": "2439", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2440", + "provider": { + "$id": "2441", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2442", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2443", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Delete Node type" + }, + "description": { + "$id": "2444", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Delete any Node type" + } + } + } + } + }, + { + "$id": "2445", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2446", + "name": { + "$id": "2447", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/restart/action" + }, + "display": { + "$id": "2448", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2449", + "provider": { + "$id": "2450", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2451", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2452", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Restart nodes from Node type" + }, + "description": { + "$id": "2453", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Restart nodes from Node type" + } + } + } + } + }, + { + "$id": "2454", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2455", + "name": { + "$id": "2456", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/reimage/action" + }, + "display": { + "$id": "2457", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2458", + "provider": { + "$id": "2459", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2460", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2461", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Reimage nodes from Node type" + }, + "description": { + "$id": "2462", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Reimage nodes from Node type" + } + } + } + } + }, + { + "$id": "2463", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2464", + "name": { + "$id": "2465", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/deleteNode/action" + }, + "display": { + "$id": "2466", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2467", + "provider": { + "$id": "2468", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2469", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2470", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Delete nodes from Node type" + }, + "description": { + "$id": "2471", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Delete nodes from Node type" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "2472", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2473", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "2474", + "type": { + "$id": "2475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2476", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2477" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Operations", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "2478", + "kind": "client", + "name": "Applications", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "2479", + "name": "get", + "resourceName": "ApplicationResource", + "doc": "Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2480", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2481", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2482", + "type": { + "$id": "2483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2484", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2486", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2488", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2490", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2492", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2493", + "kind": "constant", + "valueType": { + "$id": "2494", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2495", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "441" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.get", + "decorators": [], + "examples": [ + { + "$id": "2496", + "kind": "http", + "name": "Get an application", + "description": "Get an application", + "filePath": "2025-03-01-preview/ApplicationGetOperation_example.json", + "parameters": [ + { + "$id": "2497", + "parameter": { + "$ref": "2480" + }, + "value": { + "$id": "2498", + "kind": "string", + "type": { + "$ref": "2481" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2499", + "parameter": { + "$ref": "2490" + }, + "value": { + "$id": "2500", + "kind": "string", + "type": { + "$ref": "2491" + }, + "value": "myApp" + } + }, + { + "$id": "2501", + "parameter": { + "$ref": "2488" + }, + "value": { + "$id": "2502", + "kind": "string", + "type": { + "$ref": "2489" + }, + "value": "myCluster" + } + }, + { + "$id": "2503", + "parameter": { + "$ref": "2486" + }, + "value": { + "$id": "2504", + "kind": "string", + "type": { + "$ref": "2487" + }, + "value": "resRg" + } + }, + { + "$id": "2505", + "parameter": { + "$ref": "2484" + }, + "value": { + "$id": "2506", + "kind": "string", + "type": { + "$ref": "2485" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2507", + "response": { + "$ref": "2495" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2508", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2509", + "name": { + "$id": "2510", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myApp" + }, + "type": { + "$id": "2511", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2512", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "location": { + "$id": "2513", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "eastus" + }, + "properties": { + "$id": "2514", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2515", + "parameters": { + "$id": "2516", + "kind": "dict", + "type": { + "$ref": "496" + }, + "value": { + "$id": "2517", + "param1": { + "$id": "2518", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2519", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Updating" + }, + "upgradePolicy": { + "$id": "2520", + "kind": "model", + "type": { + "$ref": "502" + }, + "value": { + "$id": "2521", + "applicationHealthPolicy": { + "$id": "2522", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2523", + "considerWarningAsError": { + "$id": "2524", + "kind": "boolean", + "type": { + "$ref": "506" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2525", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2526", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2527", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2528", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2529", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2530", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2531", + "kind": "dict", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2532", + "service1": { + "$id": "2533", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2534", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2535", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2536", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2537", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2538", + "kind": "boolean", + "type": { + "$ref": "537" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2539", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2540", + "kind": "boolean", + "type": { + "$ref": "579" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2541", + "kind": "model", + "type": { + "$ref": "541" + }, + "value": { + "$id": "2542", + "failureAction": { + "$id": "2543", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2544", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2545", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2546", + "kind": "string", + "type": { + "$ref": "546" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2547", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2548", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2549", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2550", + "kind": "number", + "type": { + "$ref": "575" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2551", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + }, + "tags": { + "$id": "2552", + "kind": "dict", + "type": { + "$ref": "600" + }, + "value": { + "$id": "2553" + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2554", + "name": "createOrUpdate", + "resourceName": "ApplicationResource", + "doc": "Create or update a Service Fabric managed application resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "2555", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2557", + "type": { + "$id": "2558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2559", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2560", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2561", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2563", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2565", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2567", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2568", + "kind": "constant", + "valueType": { + "$id": "2569", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2570", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2571", + "kind": "constant", + "valueType": { + "$id": "2572", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2573", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application resource.", + "type": { + "$ref": "441" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2574", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "441" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "2575", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "441" + }, + "headers": [ + { + "$id": "2576", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "2577", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2578", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "2579", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2580", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "2581", + "finalStateVia": 1, + "finalResponse": { + "$id": "2582", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "441" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "2583", + "kind": "http", + "name": "Put an application with maximum parameters", + "description": "Put an application with maximum parameters", + "filePath": "2025-03-01-preview/ApplicationPutOperation_example_max.json", + "parameters": [ + { + "$id": "2584", + "parameter": { + "$ref": "2555" + }, + "value": { + "$id": "2585", + "kind": "string", + "type": { + "$ref": "2556" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2586", + "parameter": { + "$ref": "2565" + }, + "value": { + "$id": "2587", + "kind": "string", + "type": { + "$ref": "2566" + }, + "value": "myApp" + } + }, + { + "$id": "2588", + "parameter": { + "$ref": "2563" + }, + "value": { + "$id": "2589", + "kind": "string", + "type": { + "$ref": "2564" + }, + "value": "myCluster" + } + }, + { + "$id": "2590", + "parameter": { + "$ref": "2561" + }, + "value": { + "$id": "2591", + "kind": "string", + "type": { + "$ref": "2562" + }, + "value": "resRg" + } + }, + { + "$id": "2592", + "parameter": { + "$ref": "2559" + }, + "value": { + "$id": "2593", + "kind": "string", + "type": { + "$ref": "2560" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2594", + "response": { + "$ref": "2574" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2595", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2596", + "name": { + "$id": "2597", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myApp" + }, + "type": { + "$id": "2598", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2599", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "location": { + "$id": "2600", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "eastus" + }, + "properties": { + "$id": "2601", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2602", + "parameters": { + "$id": "2603", + "kind": "dict", + "type": { + "$ref": "496" + }, + "value": { + "$id": "2604", + "param1": { + "$id": "2605", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2606", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Creating" + }, + "upgradePolicy": { + "$id": "2607", + "kind": "model", + "type": { + "$ref": "502" + }, + "value": { + "$id": "2608", + "applicationHealthPolicy": { + "$id": "2609", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2610", + "considerWarningAsError": { + "$id": "2611", + "kind": "boolean", + "type": { + "$ref": "506" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2612", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2613", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2614", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2615", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2616", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2617", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2618", + "kind": "dict", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2619", + "service1": { + "$id": "2620", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2621", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2622", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2623", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2624", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2625", + "kind": "boolean", + "type": { + "$ref": "537" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2626", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2627", + "kind": "boolean", + "type": { + "$ref": "579" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2628", + "kind": "model", + "type": { + "$ref": "541" + }, + "value": { + "$id": "2629", + "failureAction": { + "$id": "2630", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2631", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2632", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2633", + "kind": "string", + "type": { + "$ref": "546" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2634", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2635", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2636", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2637", + "kind": "number", + "type": { + "$ref": "575" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2638", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + }, + "tags": { + "$id": "2639", + "kind": "dict", + "type": { + "$ref": "600" + }, + "value": { + "$id": "2640", + "a": { + "$id": "2641", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "b" + } + } + } + } + } + }, + { + "$id": "2642", + "response": { + "$ref": "2575" + }, + "statusCode": 202, + "bodyValue": { + "$id": "2643", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2644", + "name": { + "$id": "2645", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myApp" + }, + "type": { + "$id": "2646", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2647", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "properties": { + "$id": "2648", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2649", + "parameters": { + "$id": "2650", + "kind": "dict", + "type": { + "$ref": "496" + }, + "value": { + "$id": "2651", + "param1": { + "$id": "2652", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2653", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Updating" + }, + "upgradePolicy": { + "$id": "2654", + "kind": "model", + "type": { + "$ref": "502" + }, + "value": { + "$id": "2655", + "applicationHealthPolicy": { + "$id": "2656", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2657", + "considerWarningAsError": { + "$id": "2658", + "kind": "boolean", + "type": { + "$ref": "506" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2659", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2660", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2661", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2662", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2663", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2664", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2665", + "kind": "dict", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2666", + "service1": { + "$id": "2667", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2668", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2669", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2670", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2671", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2672", + "kind": "boolean", + "type": { + "$ref": "537" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2673", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2674", + "kind": "boolean", + "type": { + "$ref": "579" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2675", + "kind": "model", + "type": { + "$ref": "541" + }, + "value": { + "$id": "2676", + "failureAction": { + "$id": "2677", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2678", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2679", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2680", + "kind": "string", + "type": { + "$ref": "546" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2681", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2682", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2683", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2684", + "kind": "number", + "type": { + "$ref": "575" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2685", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + }, + "tags": { + "$id": "2686", + "kind": "dict", + "type": { + "$ref": "600" + }, + "value": { + "$id": "2687", + "a": { + "$id": "2688", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "b" + } + } + } + } + } + } + ] + }, + { + "$id": "2689", + "kind": "http", + "name": "Put an application with minimum parameters", + "description": "Put an application with minimum parameters", + "filePath": "2025-03-01-preview/ApplicationPutOperation_example_min.json", + "parameters": [ + { + "$id": "2690", + "parameter": { + "$ref": "2555" + }, + "value": { + "$id": "2691", + "kind": "string", + "type": { + "$ref": "2556" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2692", + "parameter": { + "$ref": "2565" + }, + "value": { + "$id": "2693", + "kind": "string", + "type": { + "$ref": "2566" + }, + "value": "myApp" + } + }, + { + "$id": "2694", + "parameter": { + "$ref": "2563" + }, + "value": { + "$id": "2695", + "kind": "string", + "type": { + "$ref": "2564" + }, + "value": "myCluster" + } + }, + { + "$id": "2696", + "parameter": { + "$ref": "2561" + }, + "value": { + "$id": "2697", + "kind": "string", + "type": { + "$ref": "2562" + }, + "value": "resRg" + } + }, + { + "$id": "2698", + "parameter": { + "$ref": "2559" + }, + "value": { + "$id": "2699", + "kind": "string", + "type": { + "$ref": "2560" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2700", + "response": { + "$ref": "2574" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2701", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2702", + "name": { + "$id": "2703", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myApp" + }, + "type": { + "$id": "2704", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2705", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "location": { + "$id": "2706", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "eastus" + }, + "properties": { + "$id": "2707", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2708", + "parameters": { + "$id": "2709", + "kind": "dict", + "type": { + "$ref": "496" + }, + "value": { + "$id": "2710", + "param1": { + "$id": "2711", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2712", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Updating" + }, + "upgradePolicy": { + "$id": "2713", + "kind": "model", + "type": { + "$ref": "502" + }, + "value": { + "$id": "2714", + "applicationHealthPolicy": { + "$id": "2715", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2716", + "considerWarningAsError": { + "$id": "2717", + "kind": "boolean", + "type": { + "$ref": "506" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2718", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2719", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2720", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2721", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2722", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2723", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2724", + "kind": "dict", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2725", + "service1": { + "$id": "2726", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2727", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2728", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2729", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2730", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2731", + "kind": "boolean", + "type": { + "$ref": "537" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2732", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2733", + "kind": "boolean", + "type": { + "$ref": "579" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2734", + "kind": "model", + "type": { + "$ref": "541" + }, + "value": { + "$id": "2735", + "failureAction": { + "$id": "2736", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2737", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2738", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2739", + "kind": "string", + "type": { + "$ref": "546" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2740", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2741", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2742", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2743", + "kind": "number", + "type": { + "$ref": "575" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2744", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + } + } + } + }, + { + "$id": "2745", + "response": { + "$ref": "2575" + }, + "statusCode": 202, + "bodyValue": { + "$id": "2746", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2747", + "name": { + "$id": "2748", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "2749", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2750", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "properties": { + "$id": "2751", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2752", + "provisioningState": { + "$id": "2753", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Updating" + }, + "version": { + "$id": "2754", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2755", + "name": "update", + "resourceName": "ApplicationResource", + "doc": "Updates the tags of an application resource of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "2756", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2757", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2758", + "type": { + "$id": "2759", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2760", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2761", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2762", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2763", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2764", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2765", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2766", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2768", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2769", + "kind": "constant", + "valueType": { + "$id": "2770", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2771", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2772", + "kind": "constant", + "valueType": { + "$id": "2773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2774", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application resource updated tags.", + "type": { + "$ref": "663" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2775", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "441" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.update", + "decorators": [], + "examples": [ + { + "$id": "2776", + "kind": "http", + "name": "Patch an application", + "description": "Patch an application", + "filePath": "2025-03-01-preview/ApplicationPatchOperation_example.json", + "parameters": [ + { + "$id": "2777", + "parameter": { + "$ref": "2756" + }, + "value": { + "$id": "2778", + "kind": "string", + "type": { + "$ref": "2757" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2779", + "parameter": { + "$ref": "2766" + }, + "value": { + "$id": "2780", + "kind": "string", + "type": { + "$ref": "2767" + }, + "value": "myApp" + } + }, + { + "$id": "2781", + "parameter": { + "$ref": "2764" + }, + "value": { + "$id": "2782", + "kind": "string", + "type": { + "$ref": "2765" + }, + "value": "myCluster" + } + }, + { + "$id": "2783", + "parameter": { + "$ref": "2762" + }, + "value": { + "$id": "2784", + "kind": "string", + "type": { + "$ref": "2763" + }, + "value": "resRg" + } + }, + { + "$id": "2785", + "parameter": { + "$ref": "2760" + }, + "value": { + "$id": "2786", + "kind": "string", + "type": { + "$ref": "2761" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2787", + "response": { + "$ref": "2775" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2788", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2789", + "name": { + "$id": "2790", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myApp" + }, + "type": { + "$id": "2791", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2792", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "location": { + "$id": "2793", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "eastus" + }, + "properties": { + "$id": "2794", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2795", + "parameters": { + "$id": "2796", + "kind": "dict", + "type": { + "$ref": "496" + }, + "value": { + "$id": "2797", + "param1": { + "$id": "2798", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2799", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Succeeded" + }, + "upgradePolicy": { + "$id": "2800", + "kind": "model", + "type": { + "$ref": "502" + }, + "value": { + "$id": "2801", + "applicationHealthPolicy": { + "$id": "2802", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2803", + "considerWarningAsError": { + "$id": "2804", + "kind": "boolean", + "type": { + "$ref": "506" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2805", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2806", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2807", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2808", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2809", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2810", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2811", + "kind": "dict", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2812", + "service1": { + "$id": "2813", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2814", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2815", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2816", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2817", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2818", + "kind": "boolean", + "type": { + "$ref": "537" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2819", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2820", + "kind": "boolean", + "type": { + "$ref": "579" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2821", + "kind": "model", + "type": { + "$ref": "541" + }, + "value": { + "$id": "2822", + "failureAction": { + "$id": "2823", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2824", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2825", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2826", + "kind": "string", + "type": { + "$ref": "546" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2827", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2828", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2829", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2830", + "kind": "number", + "type": { + "$ref": "575" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2831", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + }, + "tags": { + "$id": "2832", + "kind": "dict", + "type": { + "$ref": "600" + }, + "value": { + "$id": "2833", + "a": { + "$id": "2834", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2835", + "name": "delete", + "resourceName": "ApplicationResource", + "doc": "Delete a Service Fabric managed application resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "2836", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2837", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2838", + "type": { + "$id": "2839", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2840", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2841", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2842", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2843", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2844", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2845", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2846", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2848", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2849", + "kind": "constant", + "valueType": { + "$id": "2850", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2851", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2852", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "2853", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2854", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "2855", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2856", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "2857", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + "bufferResponse": true, + "longRunning": { + "$id": "2858", + "finalStateVia": 1, + "finalResponse": { + "$id": "2859", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.delete", + "decorators": [], + "examples": [ + { + "$id": "2860", + "kind": "http", + "name": "Delete an application", + "description": "Delete an application", + "filePath": "2025-03-01-preview/ApplicationDeleteOperation_example.json", + "parameters": [ + { + "$id": "2861", + "parameter": { + "$ref": "2836" + }, + "value": { + "$id": "2862", + "kind": "string", + "type": { + "$ref": "2837" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2863", + "parameter": { + "$ref": "2846" + }, + "value": { + "$id": "2864", + "kind": "string", + "type": { + "$ref": "2847" + }, + "value": "myApp" + } + }, + { + "$id": "2865", + "parameter": { + "$ref": "2844" + }, + "value": { + "$id": "2866", + "kind": "string", + "type": { + "$ref": "2845" + }, + "value": "myCluster" + } + }, + { + "$id": "2867", + "parameter": { + "$ref": "2842" + }, + "value": { + "$id": "2868", + "kind": "string", + "type": { + "$ref": "2843" + }, + "value": "resRg" + } + }, + { + "$id": "2869", + "parameter": { + "$ref": "2840" + }, + "value": { + "$id": "2870", + "kind": "string", + "type": { + "$ref": "2841" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2871", + "response": { + "$ref": "2851" + }, + "statusCode": 202 + }, + { + "$id": "2872", + "response": { + "$ref": "2857" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "2873", + "name": "list", + "resourceName": "ApplicationResource", + "doc": "Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2874", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2875", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2876", + "type": { + "$id": "2877", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2878", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2880", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2881", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2882", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2884", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2885", + "kind": "constant", + "valueType": { + "$id": "2886", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2887", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "670" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications", + "bufferResponse": true, + "paging": { + "$id": "2888", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2889", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.list", + "decorators": [], + "examples": [ + { + "$id": "2890", + "kind": "http", + "name": "Get a list of application resources", + "description": "Get a list of application resources", + "filePath": "2025-03-01-preview/ApplicationListOperation_example.json", + "parameters": [ + { + "$id": "2891", + "parameter": { + "$ref": "2874" + }, + "value": { + "$id": "2892", + "kind": "string", + "type": { + "$ref": "2875" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2893", + "parameter": { + "$ref": "2882" + }, + "value": { + "$id": "2894", + "kind": "string", + "type": { + "$ref": "2883" + }, + "value": "myCluster" + } + }, + { + "$id": "2895", + "parameter": { + "$ref": "2880" + }, + "value": { + "$id": "2896", + "kind": "string", + "type": { + "$ref": "2881" + }, + "value": "resRg" + } + }, + { + "$id": "2897", + "parameter": { + "$ref": "2878" + }, + "value": { + "$id": "2898", + "kind": "string", + "type": { + "$ref": "2879" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2899", + "response": { + "$ref": "2887" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2900", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "2901", + "nextLink": { + "$id": "2902", + "kind": "string", + "type": { + "$ref": "676" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "2903", + "kind": "array", + "type": { + "$ref": "672" + }, + "value": [ + { + "$id": "2904", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2905", + "name": { + "$id": "2906", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myApp" + }, + "type": { + "$id": "2907", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2908", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "properties": { + "$id": "2909", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2910", + "provisioningState": { + "$id": "2911", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Updating" + }, + "version": { + "$id": "2912", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "2913", + "name": "readUpgrade", + "resourceName": "Applications", + "doc": "Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade.", + "accessibility": "public", + "parameters": [ + { + "$id": "2914", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2915", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2916", + "type": { + "$id": "2917", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2918", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2919", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2920", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2921", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2922", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2924", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2925", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2926", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2927", + "kind": "constant", + "valueType": { + "$id": "2928", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2929", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2930", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "2931", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2932", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "2933", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2934", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/fetchUpgradeStatus", + "bufferResponse": true, + "longRunning": { + "$id": "2935", + "finalStateVia": 1, + "finalResponse": { + "$id": "2936", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.readUpgrade", + "decorators": [], + "examples": [ + { + "$id": "2937", + "kind": "http", + "name": "Get an application upgrade", + "description": "Get an application upgrade", + "filePath": "2025-03-01-preview/ApplicationActionGetUpgrade_example.json", + "parameters": [ + { + "$id": "2938", + "parameter": { + "$ref": "2914" + }, + "value": { + "$id": "2939", + "kind": "string", + "type": { + "$ref": "2915" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2940", + "parameter": { + "$ref": "2924" + }, + "value": { + "$id": "2941", + "kind": "string", + "type": { + "$ref": "2925" + }, + "value": "myApp" + } + }, + { + "$id": "2942", + "parameter": { + "$ref": "2922" + }, + "value": { + "$id": "2943", + "kind": "string", + "type": { + "$ref": "2923" + }, + "value": "myCluster" + } + }, + { + "$id": "2944", + "parameter": { + "$ref": "2920" + }, + "value": { + "$id": "2945", + "kind": "string", + "type": { + "$ref": "2921" + }, + "value": "resRg" + } + }, + { + "$id": "2946", + "parameter": { + "$ref": "2918" + }, + "value": { + "$id": "2947", + "kind": "string", + "type": { + "$ref": "2919" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2948", + "response": { + "$ref": "2929" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "2949", + "name": "resumeUpgrade", + "resourceName": "Applications", + "doc": "Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused.", + "accessibility": "public", + "parameters": [ + { + "$id": "2950", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2951", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2952", + "type": { + "$id": "2953", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2954", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2955", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2956", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2957", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2958", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2959", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2960", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2961", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2962", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2963", + "kind": "constant", + "valueType": { + "$id": "2964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2965", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2966", + "kind": "constant", + "valueType": { + "$id": "2967", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2968", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The parameters for resuming an application upgrade.", + "type": { + "$ref": "680" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2969", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2970", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "2971", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2972", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "2973", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2974", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "2975", + "finalStateVia": 1, + "finalResponse": { + "$id": "2976", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.resumeUpgrade", + "decorators": [], + "examples": [ + { + "$id": "2977", + "kind": "http", + "name": "Resume upgrade", + "description": "Resume upgrade", + "filePath": "2025-03-01-preview/ApplicationActionResumeUpgrade_example.json", + "parameters": [ + { + "$id": "2978", + "parameter": { + "$ref": "2950" + }, + "value": { + "$id": "2979", + "kind": "string", + "type": { + "$ref": "2951" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2980", + "parameter": { + "$ref": "2960" + }, + "value": { + "$id": "2981", + "kind": "string", + "type": { + "$ref": "2961" + }, + "value": "myApp" + } + }, + { + "$id": "2982", + "parameter": { + "$ref": "2958" + }, + "value": { + "$id": "2983", + "kind": "string", + "type": { + "$ref": "2959" + }, + "value": "myCluster" + } + }, + { + "$id": "2984", + "parameter": { + "$ref": "2956" + }, + "value": { + "$id": "2985", + "kind": "string", + "type": { + "$ref": "2957" + }, + "value": "resRg" + } + }, + { + "$id": "2986", + "parameter": { + "$ref": "2954" + }, + "value": { + "$id": "2987", + "kind": "string", + "type": { + "$ref": "2955" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2988", + "response": { + "$ref": "2969" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "2989", + "name": "startRollback", + "resourceName": "Applications", + "doc": "Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version.", + "accessibility": "public", + "parameters": [ + { + "$id": "2990", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2992", + "type": { + "$id": "2993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2994", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2995", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2996", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2998", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3000", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3002", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3003", + "kind": "constant", + "valueType": { + "$id": "3004", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3005", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3006", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3007", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3008", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3009", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3010", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback", + "bufferResponse": true, + "longRunning": { + "$id": "3011", + "finalStateVia": 1, + "finalResponse": { + "$id": "3012", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.startRollback", + "decorators": [], + "examples": [ + { + "$id": "3013", + "kind": "http", + "name": "Start an application upgrade rollback", + "description": "Start an application upgrade rollback", + "filePath": "2025-03-01-preview/ApplicationActionStartRollback_example.json", + "parameters": [ + { + "$id": "3014", + "parameter": { + "$ref": "2990" + }, + "value": { + "$id": "3015", + "kind": "string", + "type": { + "$ref": "2991" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3016", + "parameter": { + "$ref": "3000" + }, + "value": { + "$id": "3017", + "kind": "string", + "type": { + "$ref": "3001" + }, + "value": "myApp" + } + }, + { + "$id": "3018", + "parameter": { + "$ref": "2998" + }, + "value": { + "$id": "3019", + "kind": "string", + "type": { + "$ref": "2999" + }, + "value": "myCluster" + } + }, + { + "$id": "3020", + "parameter": { + "$ref": "2996" + }, + "value": { + "$id": "3021", + "kind": "string", + "type": { + "$ref": "2997" + }, + "value": "resRg" + } + }, + { + "$id": "3022", + "parameter": { + "$ref": "2994" + }, + "value": { + "$id": "3023", + "kind": "string", + "type": { + "$ref": "2995" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3024", + "response": { + "$ref": "3005" + }, + "statusCode": 202 + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "3025", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "3026", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "3027", + "type": { + "$id": "3028", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "3029", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "3030" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "3031", + "kind": "client", + "name": "ApplicationTypes", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "3032", + "name": "get", + "resourceName": "ApplicationTypeResource", + "doc": "Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3033", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3035", + "type": { + "$id": "3036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3037", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3038", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3039", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3040", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3041", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3042", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3043", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3044", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3045", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3046", + "kind": "constant", + "valueType": { + "$id": "3047", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3048", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "685" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.get", + "decorators": [], + "examples": [ + { + "$id": "3049", + "kind": "http", + "name": "Get an application type", + "description": "Get an application type", + "filePath": "2025-03-01-preview/ApplicationTypeNameGetOperation_example.json", + "parameters": [ + { + "$id": "3050", + "parameter": { + "$ref": "3033" + }, + "value": { + "$id": "3051", + "kind": "string", + "type": { + "$ref": "3034" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3052", + "parameter": { + "$ref": "3043" + }, + "value": { + "$id": "3053", + "kind": "string", + "type": { + "$ref": "3044" + }, + "value": "myAppType" + } + }, + { + "$id": "3054", + "parameter": { + "$ref": "3041" + }, + "value": { + "$id": "3055", + "kind": "string", + "type": { + "$ref": "3042" + }, + "value": "myCluster" + } + }, + { + "$id": "3056", + "parameter": { + "$ref": "3039" + }, + "value": { + "$id": "3057", + "kind": "string", + "type": { + "$ref": "3040" + }, + "value": "resRg" + } + }, + { + "$id": "3058", + "parameter": { + "$ref": "3037" + }, + "value": { + "$id": "3059", + "kind": "string", + "type": { + "$ref": "3038" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3060", + "response": { + "$ref": "3048" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3061", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "3062", + "name": { + "$id": "3063", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myAppType" + }, + "type": { + "$id": "3064", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes" + }, + "id": { + "$id": "3065", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType" + }, + "properties": { + "$id": "3066", + "kind": "model", + "type": { + "$ref": "687" + }, + "value": { + "$id": "3067", + "provisioningState": { + "$id": "3068", + "kind": "string", + "type": { + "$ref": "689" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3069", + "name": "createOrUpdate", + "resourceName": "ApplicationTypeResource", + "doc": "Create or update a Service Fabric managed application type name resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3070", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3071", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3072", + "type": { + "$id": "3073", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3074", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3075", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3076", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3078", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3079", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3080", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3081", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3082", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3083", + "kind": "constant", + "valueType": { + "$id": "3084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3085", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3086", + "kind": "constant", + "valueType": { + "$id": "3087", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3088", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application type name resource.", + "type": { + "$ref": "685" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3089", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "685" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "3090", + "kind": "http", + "name": "Put an application type", + "description": "Put an application type", + "filePath": "2025-03-01-preview/ApplicationTypeNamePutOperation_example.json", + "parameters": [ + { + "$id": "3091", + "parameter": { + "$ref": "3070" + }, + "value": { + "$id": "3092", + "kind": "string", + "type": { + "$ref": "3071" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3093", + "parameter": { + "$ref": "3080" + }, + "value": { + "$id": "3094", + "kind": "string", + "type": { + "$ref": "3081" + }, + "value": "myAppType" + } + }, + { + "$id": "3095", + "parameter": { + "$ref": "3078" + }, + "value": { + "$id": "3096", + "kind": "string", + "type": { + "$ref": "3079" + }, + "value": "myCluster" + } + }, + { + "$id": "3097", + "parameter": { + "$ref": "3076" + }, + "value": { + "$id": "3098", + "kind": "string", + "type": { + "$ref": "3077" + }, + "value": "resRg" + } + }, + { + "$id": "3099", + "parameter": { + "$ref": "3074" + }, + "value": { + "$id": "3100", + "kind": "string", + "type": { + "$ref": "3075" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3101", + "response": { + "$ref": "3089" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3102", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "3103", + "name": { + "$id": "3104", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myAppType" + }, + "type": { + "$id": "3105", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes" + }, + "id": { + "$id": "3106", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType" + }, + "properties": { + "$id": "3107", + "kind": "model", + "type": { + "$ref": "687" + }, + "value": { + "$id": "3108", + "provisioningState": { + "$id": "3109", + "kind": "string", + "type": { + "$ref": "689" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3110", + "name": "update", + "resourceName": "ApplicationTypeResource", + "doc": "Updates the tags of an application type resource of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "3111", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3113", + "type": { + "$id": "3114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3115", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3116", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3117", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3118", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3119", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3120", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3121", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3123", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3124", + "kind": "constant", + "valueType": { + "$id": "3125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3126", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3127", + "kind": "constant", + "valueType": { + "$id": "3128", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3129", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application type resource updated tags.", + "type": { + "$ref": "704" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3130", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "685" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.update", + "decorators": [], + "examples": [ + { + "$id": "3131", + "kind": "http", + "name": "Patch an application type", + "description": "Patch an application type", + "filePath": "2025-03-01-preview/ApplicationTypeNamePatchOperation_example.json", + "parameters": [ + { + "$id": "3132", + "parameter": { + "$ref": "3111" + }, + "value": { + "$id": "3133", + "kind": "string", + "type": { + "$ref": "3112" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3134", + "parameter": { + "$ref": "3121" + }, + "value": { + "$id": "3135", + "kind": "string", + "type": { + "$ref": "3122" + }, + "value": "myAppType" + } + }, + { + "$id": "3136", + "parameter": { + "$ref": "3119" + }, + "value": { + "$id": "3137", + "kind": "string", + "type": { + "$ref": "3120" + }, + "value": "myCluster" + } + }, + { + "$id": "3138", + "parameter": { + "$ref": "3117" + }, + "value": { + "$id": "3139", + "kind": "string", + "type": { + "$ref": "3118" + }, + "value": "resRg" + } + }, + { + "$id": "3140", + "parameter": { + "$ref": "3115" + }, + "value": { + "$id": "3141", + "kind": "string", + "type": { + "$ref": "3116" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3142", + "response": { + "$ref": "3130" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3143", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "3144", + "name": { + "$id": "3145", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myAppType" + }, + "type": { + "$id": "3146", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes" + }, + "id": { + "$id": "3147", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType" + }, + "properties": { + "$id": "3148", + "kind": "model", + "type": { + "$ref": "687" + }, + "value": { + "$id": "3149", + "provisioningState": { + "$id": "3150", + "kind": "string", + "type": { + "$ref": "689" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "3151", + "kind": "dict", + "type": { + "$ref": "695" + }, + "value": { + "$id": "3152", + "a": { + "$id": "3153", + "kind": "string", + "type": { + "$ref": "697" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3154", + "name": "delete", + "resourceName": "ApplicationTypeResource", + "doc": "Delete a Service Fabric managed application type name resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3155", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3156", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3157", + "type": { + "$id": "3158", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3159", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3160", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3161", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3162", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3163", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3164", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3165", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3166", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3167", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3168", + "kind": "constant", + "valueType": { + "$id": "3169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3170", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3171", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3172", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3173", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3174", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "3176", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + "bufferResponse": true, + "longRunning": { + "$id": "3177", + "finalStateVia": 1, + "finalResponse": { + "$id": "3178", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.delete", + "decorators": [], + "examples": [ + { + "$id": "3179", + "kind": "http", + "name": "Delete an application type", + "description": "Delete an application type", + "filePath": "2025-03-01-preview/ApplicationTypeNameDeleteOperation_example.json", + "parameters": [ + { + "$id": "3180", + "parameter": { + "$ref": "3155" + }, + "value": { + "$id": "3181", + "kind": "string", + "type": { + "$ref": "3156" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3182", + "parameter": { + "$ref": "3165" + }, + "value": { + "$id": "3183", + "kind": "string", + "type": { + "$ref": "3166" + }, + "value": "myAppType" + } + }, + { + "$id": "3184", + "parameter": { + "$ref": "3163" + }, + "value": { + "$id": "3185", + "kind": "string", + "type": { + "$ref": "3164" + }, + "value": "myCluster" + } + }, + { + "$id": "3186", + "parameter": { + "$ref": "3161" + }, + "value": { + "$id": "3187", + "kind": "string", + "type": { + "$ref": "3162" + }, + "value": "resRg" + } + }, + { + "$id": "3188", + "parameter": { + "$ref": "3159" + }, + "value": { + "$id": "3189", + "kind": "string", + "type": { + "$ref": "3160" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3190", + "response": { + "$ref": "3170" + }, + "statusCode": 202 + }, + { + "$id": "3191", + "response": { + "$ref": "3176" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "3192", + "name": "list", + "resourceName": "ApplicationTypeResource", + "doc": "Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3193", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3194", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3195", + "type": { + "$id": "3196", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3197", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3198", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3199", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3200", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3201", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3202", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3203", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3204", + "kind": "constant", + "valueType": { + "$id": "3205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3206", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "711" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes", + "bufferResponse": true, + "paging": { + "$id": "3207", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "3208", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.list", + "decorators": [], + "examples": [ + { + "$id": "3209", + "kind": "http", + "name": "Get a list of application type name resources", + "description": "Get a list of application type name resources", + "filePath": "2025-03-01-preview/ApplicationTypeNameListOperation_example.json", + "parameters": [ + { + "$id": "3210", + "parameter": { + "$ref": "3193" + }, + "value": { + "$id": "3211", + "kind": "string", + "type": { + "$ref": "3194" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3212", + "parameter": { + "$ref": "3201" + }, + "value": { + "$id": "3213", + "kind": "string", + "type": { + "$ref": "3202" + }, + "value": "myCluster" + } + }, + { + "$id": "3214", + "parameter": { + "$ref": "3199" + }, + "value": { + "$id": "3215", + "kind": "string", + "type": { + "$ref": "3200" + }, + "value": "resRg" + } + }, + { + "$id": "3216", + "parameter": { + "$ref": "3197" + }, + "value": { + "$id": "3217", + "kind": "string", + "type": { + "$ref": "3198" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3218", + "response": { + "$ref": "3206" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3219", + "kind": "model", + "type": { + "$ref": "711" + }, + "value": { + "$id": "3220", + "nextLink": { + "$id": "3221", + "kind": "string", + "type": { + "$ref": "717" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "3222", + "kind": "array", + "type": { + "$ref": "713" + }, + "value": [ + { + "$id": "3223", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "3224", + "name": { + "$id": "3225", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myAppType" + }, + "type": { + "$id": "3226", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes" + }, + "id": { + "$id": "3227", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType" + }, + "properties": { + "$id": "3228", + "kind": "model", + "type": { + "$ref": "687" + }, + "value": { + "$id": "3229", + "provisioningState": { + "$id": "3230", + "kind": "string", + "type": { + "$ref": "689" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "3231", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "3232", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "3233", + "type": { + "$id": "3234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "3235", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "3236" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "3237", + "kind": "client", + "name": "ApplicationTypeVersions", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "3238", + "name": "get", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3239", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3241", + "type": { + "$id": "3242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3243", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3245", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3247", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3249", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3251", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3253", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3254", + "kind": "constant", + "valueType": { + "$id": "3255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3256", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "721" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.get", + "decorators": [], + "examples": [ + { + "$id": "3257", + "kind": "http", + "name": "Get an application type version", + "description": "Get an application type version", + "filePath": "2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json", + "parameters": [ + { + "$id": "3258", + "parameter": { + "$ref": "3239" + }, + "value": { + "$id": "3259", + "kind": "string", + "type": { + "$ref": "3240" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3260", + "parameter": { + "$ref": "3249" + }, + "value": { + "$id": "3261", + "kind": "string", + "type": { + "$ref": "3250" + }, + "value": "myAppType" + } + }, + { + "$id": "3262", + "parameter": { + "$ref": "3247" + }, + "value": { + "$id": "3263", + "kind": "string", + "type": { + "$ref": "3248" + }, + "value": "myCluster" + } + }, + { + "$id": "3264", + "parameter": { + "$ref": "3245" + }, + "value": { + "$id": "3265", + "kind": "string", + "type": { + "$ref": "3246" + }, + "value": "resRg" + } + }, + { + "$id": "3266", + "parameter": { + "$ref": "3243" + }, + "value": { + "$id": "3267", + "kind": "string", + "type": { + "$ref": "3244" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3268", + "parameter": { + "$ref": "3251" + }, + "value": { + "$id": "3269", + "kind": "string", + "type": { + "$ref": "3252" + }, + "value": "1.0" + } + } + ], + "responses": [ + { + "$id": "3270", + "response": { + "$ref": "3256" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3271", + "kind": "model", + "type": { + "$ref": "721" + }, + "value": { + "$id": "3272", + "name": { + "$id": "3273", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1.0" + }, + "type": { + "$id": "3274", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3275", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3276", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3277", + "appPackageUrl": { + "$id": "3278", + "kind": "string", + "type": { + "$ref": "729" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3279", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "Updating" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3280", + "name": "createOrUpdate", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Create or update a Service Fabric managed application type version resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3281", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3282", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3283", + "type": { + "$id": "3284", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3285", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3287", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3289", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3291", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3292", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3293", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3295", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3296", + "kind": "constant", + "valueType": { + "$id": "3297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3298", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3299", + "kind": "constant", + "valueType": { + "$id": "3300", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3301", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application type version resource.", + "type": { + "$ref": "721" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3302", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "721" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "3303", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "721" + }, + "headers": [ + { + "$id": "3304", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3305", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3306", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3307", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3308", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "3309", + "finalStateVia": 1, + "finalResponse": { + "$id": "3310", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "721" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "3311", + "kind": "http", + "name": "Put an application type version", + "description": "Put an application type version", + "filePath": "2025-03-01-preview/ApplicationTypeVersionPutOperation_example.json", + "parameters": [ + { + "$id": "3312", + "parameter": { + "$ref": "3281" + }, + "value": { + "$id": "3313", + "kind": "string", + "type": { + "$ref": "3282" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3314", + "parameter": { + "$ref": "3291" + }, + "value": { + "$id": "3315", + "kind": "string", + "type": { + "$ref": "3292" + }, + "value": "myAppType" + } + }, + { + "$id": "3316", + "parameter": { + "$ref": "3289" + }, + "value": { + "$id": "3317", + "kind": "string", + "type": { + "$ref": "3290" + }, + "value": "myCluster" + } + }, + { + "$id": "3318", + "parameter": { + "$ref": "3287" + }, + "value": { + "$id": "3319", + "kind": "string", + "type": { + "$ref": "3288" + }, + "value": "resRg" + } + }, + { + "$id": "3320", + "parameter": { + "$ref": "3285" + }, + "value": { + "$id": "3321", + "kind": "string", + "type": { + "$ref": "3286" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3322", + "parameter": { + "$ref": "3293" + }, + "value": { + "$id": "3323", + "kind": "string", + "type": { + "$ref": "3294" + }, + "value": "1.0" + } + } + ], + "responses": [ + { + "$id": "3324", + "response": { + "$ref": "3302" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3325", + "kind": "model", + "type": { + "$ref": "721" + }, + "value": { + "$id": "3326", + "name": { + "$id": "3327", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1.0" + }, + "type": { + "$id": "3328", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3329", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3330", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3331", + "appPackageUrl": { + "$id": "3332", + "kind": "string", + "type": { + "$ref": "729" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3333", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "Creating" + } + } + } + } + } + }, + { + "$id": "3334", + "response": { + "$ref": "3303" + }, + "statusCode": 202, + "bodyValue": { + "$id": "3335", + "kind": "model", + "type": { + "$ref": "721" + }, + "value": { + "$id": "3336", + "name": { + "$id": "3337", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1.0" + }, + "type": { + "$id": "3338", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3339", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3340", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3341", + "appPackageUrl": { + "$id": "3342", + "kind": "string", + "type": { + "$ref": "729" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3343", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "Updating" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3344", + "name": "update", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Updates the tags of an application type version resource of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "3345", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3346", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3347", + "type": { + "$id": "3348", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3349", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3351", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3353", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3354", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3355", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3356", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3357", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3358", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3359", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3360", + "kind": "constant", + "valueType": { + "$id": "3361", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3362", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3363", + "kind": "constant", + "valueType": { + "$id": "3364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3365", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application type version resource updated tags.", + "type": { + "$ref": "744" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3366", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "721" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.update", + "decorators": [], + "examples": [ + { + "$id": "3367", + "kind": "http", + "name": "Patch an application type version", + "description": "Patch an application type version", + "filePath": "2025-03-01-preview/ApplicationTypeVersionPatchOperation_example.json", + "parameters": [ + { + "$id": "3368", + "parameter": { + "$ref": "3345" + }, + "value": { + "$id": "3369", + "kind": "string", + "type": { + "$ref": "3346" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3370", + "parameter": { + "$ref": "3355" + }, + "value": { + "$id": "3371", + "kind": "string", + "type": { + "$ref": "3356" + }, + "value": "myAppType" + } + }, + { + "$id": "3372", + "parameter": { + "$ref": "3353" + }, + "value": { + "$id": "3373", + "kind": "string", + "type": { + "$ref": "3354" + }, + "value": "myCluster" + } + }, + { + "$id": "3374", + "parameter": { + "$ref": "3351" + }, + "value": { + "$id": "3375", + "kind": "string", + "type": { + "$ref": "3352" + }, + "value": "resRg" + } + }, + { + "$id": "3376", + "parameter": { + "$ref": "3349" + }, + "value": { + "$id": "3377", + "kind": "string", + "type": { + "$ref": "3350" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3378", + "parameter": { + "$ref": "3357" + }, + "value": { + "$id": "3379", + "kind": "string", + "type": { + "$ref": "3358" + }, + "value": "1.0" + } + } + ], + "responses": [ + { + "$id": "3380", + "response": { + "$ref": "3366" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3381", + "kind": "model", + "type": { + "$ref": "721" + }, + "value": { + "$id": "3382", + "name": { + "$id": "3383", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1.0" + }, + "type": { + "$id": "3384", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3385", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3386", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3387", + "appPackageUrl": { + "$id": "3388", + "kind": "string", + "type": { + "$ref": "729" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3389", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "3390", + "kind": "dict", + "type": { + "$ref": "735" + }, + "value": { + "$id": "3391", + "a": { + "$id": "3392", + "kind": "string", + "type": { + "$ref": "737" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3393", + "name": "delete", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Delete a Service Fabric managed application type version resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3394", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3396", + "type": { + "$id": "3397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3398", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3399", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3400", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3402", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3404", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3406", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3408", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3409", + "kind": "constant", + "valueType": { + "$id": "3410", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3411", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3412", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3413", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3414", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3415", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3416", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "3417", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + "bufferResponse": true, + "longRunning": { + "$id": "3418", + "finalStateVia": 1, + "finalResponse": { + "$id": "3419", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.delete", + "decorators": [], + "examples": [ + { + "$id": "3420", + "kind": "http", + "name": "Delete an application type version", + "description": "Delete an application type version", + "filePath": "2025-03-01-preview/ApplicationTypeVersionDeleteOperation_example.json", + "parameters": [ + { + "$id": "3421", + "parameter": { + "$ref": "3394" + }, + "value": { + "$id": "3422", + "kind": "string", + "type": { + "$ref": "3395" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3423", + "parameter": { + "$ref": "3404" + }, + "value": { + "$id": "3424", + "kind": "string", + "type": { + "$ref": "3405" + }, + "value": "myAppType" + } + }, + { + "$id": "3425", + "parameter": { + "$ref": "3402" + }, + "value": { + "$id": "3426", + "kind": "string", + "type": { + "$ref": "3403" + }, + "value": "myCluster" + } + }, + { + "$id": "3427", + "parameter": { + "$ref": "3400" + }, + "value": { + "$id": "3428", + "kind": "string", + "type": { + "$ref": "3401" + }, + "value": "resRg" + } + }, + { + "$id": "3429", + "parameter": { + "$ref": "3398" + }, + "value": { + "$id": "3430", + "kind": "string", + "type": { + "$ref": "3399" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3431", + "parameter": { + "$ref": "3406" + }, + "value": { + "$id": "3432", + "kind": "string", + "type": { + "$ref": "3407" + }, + "value": "1.0" + } + } + ], + "responses": [ + { + "$id": "3433", + "response": { + "$ref": "3411" + }, + "statusCode": 202 + }, + { + "$id": "3434", + "response": { + "$ref": "3417" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "3435", + "name": "listByApplicationTypes", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3436", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3438", + "type": { + "$id": "3439", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3440", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3442", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3444", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3446", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3447", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3448", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3449", + "kind": "constant", + "valueType": { + "$id": "3450", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3451", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "751" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions", + "bufferResponse": true, + "paging": { + "$id": "3452", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "3453", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.listByApplicationTypes", + "decorators": [], + "examples": [ + { + "$id": "3454", + "kind": "http", + "name": "Get a list of application type version resources", + "description": "Get a list of application type version resources", + "filePath": "2025-03-01-preview/ApplicationTypeVersionListOperation_example.json", + "parameters": [ + { + "$id": "3455", + "parameter": { + "$ref": "3436" + }, + "value": { + "$id": "3456", + "kind": "string", + "type": { + "$ref": "3437" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3457", + "parameter": { + "$ref": "3446" + }, + "value": { + "$id": "3458", + "kind": "string", + "type": { + "$ref": "3447" + }, + "value": "myAppType" + } + }, + { + "$id": "3459", + "parameter": { + "$ref": "3444" + }, + "value": { + "$id": "3460", + "kind": "string", + "type": { + "$ref": "3445" + }, + "value": "myCluster" + } + }, + { + "$id": "3461", + "parameter": { + "$ref": "3442" + }, + "value": { + "$id": "3462", + "kind": "string", + "type": { + "$ref": "3443" + }, + "value": "resRg" + } + }, + { + "$id": "3463", + "parameter": { + "$ref": "3440" + }, + "value": { + "$id": "3464", + "kind": "string", + "type": { + "$ref": "3441" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3465", + "response": { + "$ref": "3451" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3466", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "3467", + "nextLink": { + "$id": "3468", + "kind": "string", + "type": { + "$ref": "757" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "3469", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "3470", + "kind": "model", + "type": { + "$ref": "721" + }, + "value": { + "$id": "3471", + "name": { + "$id": "3472", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1.0" + }, + "type": { + "$id": "3473", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3474", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3475", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3476", + "appPackageUrl": { + "$id": "3477", + "kind": "string", + "type": { + "$ref": "729" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3478", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "Updating" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "3479", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "3480", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "3481", + "type": { + "$id": "3482", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "3483", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "3484" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "3485", + "kind": "client", + "name": "Services", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "3486", + "name": "get", + "resourceName": "ServiceResource", + "doc": "Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3487", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3488", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3489", + "type": { + "$id": "3490", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3491", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3492", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3493", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3494", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3495", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3496", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3497", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3499", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "3500", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3501", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3502", + "kind": "constant", + "valueType": { + "$id": "3503", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3504", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "761" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.get", + "decorators": [], + "examples": [ + { + "$id": "3505", + "kind": "http", + "name": "Get a service", + "description": "Get a service", + "filePath": "2025-03-01-preview/ServiceGetOperation_example.json", + "parameters": [ + { + "$id": "3506", + "parameter": { + "$ref": "3487" + }, + "value": { + "$id": "3507", + "kind": "string", + "type": { + "$ref": "3488" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3508", + "parameter": { + "$ref": "3497" + }, + "value": { + "$id": "3509", + "kind": "string", + "type": { + "$ref": "3498" + }, + "value": "myApp" + } + }, + { + "$id": "3510", + "parameter": { + "$ref": "3495" + }, + "value": { + "$id": "3511", + "kind": "string", + "type": { + "$ref": "3496" + }, + "value": "myCluster" + } + }, + { + "$id": "3512", + "parameter": { + "$ref": "3493" + }, + "value": { + "$id": "3513", + "kind": "string", + "type": { + "$ref": "3494" + }, + "value": "resRg" + } + }, + { + "$id": "3514", + "parameter": { + "$ref": "3499" + }, + "value": { + "$id": "3515", + "kind": "string", + "type": { + "$ref": "3500" + }, + "value": "myService" + } + }, + { + "$id": "3516", + "parameter": { + "$ref": "3491" + }, + "value": { + "$id": "3517", + "kind": "string", + "type": { + "$ref": "3492" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3518", + "response": { + "$ref": "3504" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3519", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "3520", + "name": { + "$id": "3521", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "3522", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3523", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3524", + "kind": "model", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "3525", + "defaultMoveCost": { + "$id": "3526", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "Medium" + }, + "instanceCount": { + "$id": "3527", + "kind": "number", + "type": { + "$ref": "1066" + }, + "value": 5 + }, + "partitionDescription": { + "$id": "3528", + "kind": "model", + "type": { + "$ref": "1003" + }, + "value": { + "$id": "3529", + "partitionScheme": { + "$id": "3530", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "Singleton" + } + } + }, + "placementConstraints": { + "$id": "3531", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "NodeType==frontend" + }, + "provisioningState": { + "$id": "3532", + "kind": "string", + "type": { + "$ref": "972" + }, + "value": "Updating" + }, + "serviceKind": { + "$id": "3533", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "3534", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3535", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3536", + "name": { + "$id": "3537", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "metric1" + }, + "weight": { + "$id": "3538", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "3539", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "servicePlacementPolicies": { + "$id": "3540", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [] + }, + "serviceTypeName": { + "$id": "3541", + "kind": "string", + "type": { + "$ref": "976" + }, + "value": "myServiceType" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3542", + "name": "createOrUpdate", + "resourceName": "ServiceResource", + "doc": "Create or update a Service Fabric managed service resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3543", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3545", + "type": { + "$id": "3546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3547", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3549", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3550", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3551", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3553", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3555", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "3556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3557", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3558", + "kind": "constant", + "valueType": { + "$id": "3559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3560", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3561", + "kind": "constant", + "valueType": { + "$id": "3562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3563", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The service resource.", + "type": { + "$ref": "761" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3564", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "761" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "3565", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "761" + }, + "headers": [ + { + "$id": "3566", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3567", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3568", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3569", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "3571", + "finalStateVia": 1, + "finalResponse": { + "$id": "3572", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "761" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "3573", + "kind": "http", + "name": "Put a service with maximum parameters", + "description": "Put a service with maximum parameters", + "filePath": "2025-03-01-preview/ServicePutOperation_example_max.json", + "parameters": [ + { + "$id": "3574", + "parameter": { + "$ref": "3543" + }, + "value": { + "$id": "3575", + "kind": "string", + "type": { + "$ref": "3544" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3576", + "parameter": { + "$ref": "3553" + }, + "value": { + "$id": "3577", + "kind": "string", + "type": { + "$ref": "3554" + }, + "value": "myApp" + } + }, + { + "$id": "3578", + "parameter": { + "$ref": "3551" + }, + "value": { + "$id": "3579", + "kind": "string", + "type": { + "$ref": "3552" + }, + "value": "myCluster" + } + }, + { + "$id": "3580", + "parameter": { + "$ref": "3549" + }, + "value": { + "$id": "3581", + "kind": "string", + "type": { + "$ref": "3550" + }, + "value": "resRg" + } + }, + { + "$id": "3582", + "parameter": { + "$ref": "3555" + }, + "value": { + "$id": "3583", + "kind": "string", + "type": { + "$ref": "3556" + }, + "value": "myService" + } + }, + { + "$id": "3584", + "parameter": { + "$ref": "3547" + }, + "value": { + "$id": "3585", + "kind": "string", + "type": { + "$ref": "3548" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3586", + "response": { + "$ref": "3564" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3587", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "3588", + "name": { + "$id": "3589", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "3590", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3591", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3592", + "kind": "model", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "3593", + "correlationScheme": { + "$id": "3594", + "kind": "array", + "type": { + "$ref": "773" + }, + "value": [ + { + "$id": "3595", + "kind": "model", + "type": { + "$ref": "774" + }, + "value": { + "$id": "3596", + "scheme": { + "$id": "3597", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "AlignedAffinity" + }, + "serviceName": { + "$id": "3598", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1" + } + } + } + ] + }, + "defaultMoveCost": { + "$id": "3599", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "Medium" + }, + "instanceCount": { + "$id": "3600", + "kind": "number", + "type": { + "$ref": "1066" + }, + "value": 5 + }, + "minInstanceCount": { + "$id": "3601", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 3 + }, + "minInstancePercentage": { + "$id": "3602", + "kind": "number", + "type": { + "$ref": "1074" + }, + "value": 30 + }, + "partitionDescription": { + "$id": "3603", + "kind": "model", + "type": { + "$ref": "1003" + }, + "value": { + "$id": "3604", + "partitionScheme": { + "$id": "3605", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "Singleton" + } + } + }, + "placementConstraints": { + "$id": "3606", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "NodeType==frontend" + }, + "provisioningState": { + "$id": "3607", + "kind": "string", + "type": { + "$ref": "972" + }, + "value": "Creating" + }, + "scalingPolicies": { + "$id": "3608", + "kind": "array", + "type": { + "$ref": "867" + }, + "value": [ + { + "$id": "3609", + "kind": "model", + "type": { + "$ref": "868" + }, + "value": { + "$id": "3610", + "scalingMechanism": { + "$id": "3611", + "kind": "model", + "type": { + "$ref": "893" + }, + "value": { + "$id": "3612", + "kind": { + "$id": "3613", + "kind": "string", + "type": { + "$ref": "907" + }, + "value": "ScalePartitionInstanceCount" + }, + "maxInstanceCount": { + "$id": "3614", + "kind": "number", + "type": { + "$ref": "899" + }, + "value": 9 + }, + "minInstanceCount": { + "$id": "3615", + "kind": "number", + "type": { + "$ref": "895" + }, + "value": 3 + }, + "scaleIncrement": { + "$id": "3616", + "kind": "number", + "type": { + "$ref": "903" + }, + "value": 2 + } + } + }, + "scalingTrigger": { + "$id": "3617", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "3618", + "kind": { + "$id": "3619", + "kind": "string", + "type": { + "$ref": "937" + }, + "value": "AveragePartitionLoadTrigger" + }, + "lowerLoadThreshold": { + "$id": "3620", + "kind": "number", + "type": { + "$ref": "925" + }, + "value": 2 + }, + "metricName": { + "$id": "3621", + "kind": "string", + "type": { + "$ref": "921" + }, + "value": "metricName" + }, + "scaleInterval": { + "$id": "3622", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "00:01:00" + }, + "upperLoadThreshold": { + "$id": "3623", + "kind": "number", + "type": { + "$ref": "929" + }, + "value": 8 + } + } + } + } + } + ] + }, + "serviceDnsName": { + "$id": "3624", + "kind": "string", + "type": { + "$ref": "1026" + }, + "value": "myservicednsname.myApp" + }, + "serviceKind": { + "$id": "3625", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "3626", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3627", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3628", + "name": { + "$id": "3629", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "metric1" + }, + "defaultLoad": { + "$id": "3630", + "kind": "number", + "type": { + "$ref": "803" + }, + "value": 3 + }, + "weight": { + "$id": "3631", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "3632", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "servicePlacementPolicies": { + "$id": "3633", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [ + { + "$id": "3634", + "kind": "model", + "type": { + "$ref": "855" + }, + "value": { + "$id": "3635", + "type": { + "$id": "3636", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "NonPartiallyPlaceService" + } + } + } + ] + }, + "serviceTypeName": { + "$id": "3637", + "kind": "string", + "type": { + "$ref": "976" + }, + "value": "myServiceType" + } + } + }, + "tags": { + "$id": "3638", + "kind": "dict", + "type": { + "$ref": "1085" + }, + "value": { + "$id": "3639", + "a": { + "$id": "3640", + "kind": "string", + "type": { + "$ref": "1087" + }, + "value": "b" + } + } + } + } + } + }, + { + "$id": "3641", + "response": { + "$ref": "3565" + }, + "statusCode": 202, + "bodyValue": { + "$id": "3642", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "3643", + "name": { + "$id": "3644", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "3645", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3646", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3647", + "kind": "model", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "3648", + "correlationScheme": { + "$id": "3649", + "kind": "array", + "type": { + "$ref": "773" + }, + "value": [ + { + "$id": "3650", + "kind": "model", + "type": { + "$ref": "774" + }, + "value": { + "$id": "3651", + "scheme": { + "$id": "3652", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "AlignedAffinity" + }, + "serviceName": { + "$id": "3653", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1" + } + } + } + ] + }, + "defaultMoveCost": { + "$id": "3654", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "Medium" + }, + "instanceCount": { + "$id": "3655", + "kind": "number", + "type": { + "$ref": "1066" + }, + "value": 5 + }, + "minInstanceCount": { + "$id": "3656", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 3 + }, + "minInstancePercentage": { + "$id": "3657", + "kind": "number", + "type": { + "$ref": "1074" + }, + "value": 30 + }, + "partitionDescription": { + "$id": "3658", + "kind": "model", + "type": { + "$ref": "1003" + }, + "value": { + "$id": "3659", + "partitionScheme": { + "$id": "3660", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "Singleton" + } + } + }, + "placementConstraints": { + "$id": "3661", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "NodeType==frontend" + }, + "provisioningState": { + "$id": "3662", + "kind": "string", + "type": { + "$ref": "972" + }, + "value": "Updating" + }, + "scalingPolicies": { + "$id": "3663", + "kind": "array", + "type": { + "$ref": "867" + }, + "value": [ + { + "$id": "3664", + "kind": "model", + "type": { + "$ref": "868" + }, + "value": { + "$id": "3665", + "scalingMechanism": { + "$id": "3666", + "kind": "model", + "type": { + "$ref": "893" + }, + "value": { + "$id": "3667", + "kind": { + "$id": "3668", + "kind": "string", + "type": { + "$ref": "907" + }, + "value": "ScalePartitionInstanceCount" + }, + "maxInstanceCount": { + "$id": "3669", + "kind": "number", + "type": { + "$ref": "899" + }, + "value": 9 + }, + "minInstanceCount": { + "$id": "3670", + "kind": "number", + "type": { + "$ref": "895" + }, + "value": 3 + }, + "scaleIncrement": { + "$id": "3671", + "kind": "number", + "type": { + "$ref": "903" + }, + "value": 2 + } + } + }, + "scalingTrigger": { + "$id": "3672", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "3673", + "kind": { + "$id": "3674", + "kind": "string", + "type": { + "$ref": "937" + }, + "value": "AveragePartitionLoadTrigger" + }, + "lowerLoadThreshold": { + "$id": "3675", + "kind": "number", + "type": { + "$ref": "925" + }, + "value": 2 + }, + "metricName": { + "$id": "3676", + "kind": "string", + "type": { + "$ref": "921" + }, + "value": "metricName" + }, + "scaleInterval": { + "$id": "3677", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "00:01:00" + }, + "upperLoadThreshold": { + "$id": "3678", + "kind": "number", + "type": { + "$ref": "929" + }, + "value": 8 + } + } + } + } + } + ] + }, + "serviceDnsName": { + "$id": "3679", + "kind": "string", + "type": { + "$ref": "1026" + }, + "value": "myservicednsname.myApp" + }, + "serviceKind": { + "$id": "3680", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "3681", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3682", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3683", + "name": { + "$id": "3684", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "metric1" + }, + "defaultLoad": { + "$id": "3685", + "kind": "number", + "type": { + "$ref": "803" + }, + "value": 3 + }, + "weight": { + "$id": "3686", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "3687", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "servicePlacementPolicies": { + "$id": "3688", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [ + { + "$id": "3689", + "kind": "model", + "type": { + "$ref": "855" + }, + "value": { + "$id": "3690", + "type": { + "$id": "3691", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "NonPartiallyPlaceService" + } + } + } + ] + }, + "serviceTypeName": { + "$id": "3692", + "kind": "string", + "type": { + "$ref": "976" + }, + "value": "myServiceType" + } + } + }, + "tags": { + "$id": "3693", + "kind": "dict", + "type": { + "$ref": "1085" + }, + "value": { + "$id": "3694", + "a": { + "$id": "3695", + "kind": "string", + "type": { + "$ref": "1087" + }, + "value": "b" + } + } + } + } + } + } + ] + }, + { + "$id": "3696", + "kind": "http", + "name": "Put a service with minimum parameters", + "description": "Put a service with minimum parameters", + "filePath": "2025-03-01-preview/ServicePutOperation_example_min.json", + "parameters": [ + { + "$id": "3697", + "parameter": { + "$ref": "3543" + }, + "value": { + "$id": "3698", + "kind": "string", + "type": { + "$ref": "3544" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3699", + "parameter": { + "$ref": "3553" + }, + "value": { + "$id": "3700", + "kind": "string", + "type": { + "$ref": "3554" + }, + "value": "myApp" + } + }, + { + "$id": "3701", + "parameter": { + "$ref": "3551" + }, + "value": { + "$id": "3702", + "kind": "string", + "type": { + "$ref": "3552" + }, + "value": "myCluster" + } + }, + { + "$id": "3703", + "parameter": { + "$ref": "3549" + }, + "value": { + "$id": "3704", + "kind": "string", + "type": { + "$ref": "3550" + }, + "value": "resRg" + } + }, + { + "$id": "3705", + "parameter": { + "$ref": "3555" + }, + "value": { + "$id": "3706", + "kind": "string", + "type": { + "$ref": "3556" + }, + "value": "myService" + } + }, + { + "$id": "3707", + "parameter": { + "$ref": "3547" + }, + "value": { + "$id": "3708", + "kind": "string", + "type": { + "$ref": "3548" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3709", + "response": { + "$ref": "3564" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3710", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "3711", + "name": { + "$id": "3712", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "3713", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3714", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3715", + "kind": "model", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "3716", + "instanceCount": { + "$id": "3717", + "kind": "number", + "type": { + "$ref": "1066" + }, + "value": 1 + }, + "partitionDescription": { + "$id": "3718", + "kind": "model", + "type": { + "$ref": "1003" + }, + "value": { + "$id": "3719", + "partitionScheme": { + "$id": "3720", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "Singleton" + } + } + }, + "provisioningState": { + "$id": "3721", + "kind": "string", + "type": { + "$ref": "972" + }, + "value": "Creating" + }, + "serviceKind": { + "$id": "3722", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "Stateless" + }, + "serviceTypeName": { + "$id": "3723", + "kind": "string", + "type": { + "$ref": "976" + }, + "value": "myServiceType" + } + } + } + } + } + }, + { + "$id": "3724", + "response": { + "$ref": "3565" + }, + "statusCode": 202, + "bodyValue": { + "$id": "3725", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "3726", + "name": { + "$id": "3727", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "3728", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3729", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3730", + "kind": "model", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "3731", + "instanceCount": { + "$id": "3732", + "kind": "number", + "type": { + "$ref": "1066" + }, + "value": 1 + }, + "partitionDescription": { + "$id": "3733", + "kind": "model", + "type": { + "$ref": "1003" + }, + "value": { + "$id": "3734", + "partitionScheme": { + "$id": "3735", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "Singleton" + } + } + }, + "provisioningState": { + "$id": "3736", + "kind": "string", + "type": { + "$ref": "972" + }, + "value": "Updating" + }, + "serviceKind": { + "$id": "3737", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "Stateless" + }, + "serviceTypeName": { + "$id": "3738", + "kind": "string", + "type": { + "$ref": "976" + }, + "value": "myServiceType" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3739", + "name": "update", + "resourceName": "ServiceResource", + "doc": "Updates the tags of a service resource of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "3740", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3742", + "type": { + "$id": "3743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3744", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3746", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3747", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3748", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3749", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3750", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3751", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3752", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "3753", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3754", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3755", + "kind": "constant", + "valueType": { + "$id": "3756", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3757", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3758", + "kind": "constant", + "valueType": { + "$id": "3759", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3760", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The service resource updated tags.", + "type": { + "$ref": "1094" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3761", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "761" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.update", + "decorators": [], + "examples": [ + { + "$id": "3762", + "kind": "http", + "name": "Patch a service", + "description": "Patch a service", + "filePath": "2025-03-01-preview/ServicePatchOperation_example.json", + "parameters": [ + { + "$id": "3763", + "parameter": { + "$ref": "3740" + }, + "value": { + "$id": "3764", + "kind": "string", + "type": { + "$ref": "3741" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3765", + "parameter": { + "$ref": "3750" + }, + "value": { + "$id": "3766", + "kind": "string", + "type": { + "$ref": "3751" + }, + "value": "myApp" + } + }, + { + "$id": "3767", + "parameter": { + "$ref": "3748" + }, + "value": { + "$id": "3768", + "kind": "string", + "type": { + "$ref": "3749" + }, + "value": "myCluster" + } + }, + { + "$id": "3769", + "parameter": { + "$ref": "3746" + }, + "value": { + "$id": "3770", + "kind": "string", + "type": { + "$ref": "3747" + }, + "value": "resRg" + } + }, + { + "$id": "3771", + "parameter": { + "$ref": "3752" + }, + "value": { + "$id": "3772", + "kind": "string", + "type": { + "$ref": "3753" + }, + "value": "myService" + } + }, + { + "$id": "3773", + "parameter": { + "$ref": "3744" + }, + "value": { + "$id": "3774", + "kind": "string", + "type": { + "$ref": "3745" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3775", + "response": { + "$ref": "3761" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3776", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "3777", + "name": { + "$id": "3778", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "3779", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3780", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3781", + "kind": "model", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "3782", + "correlationScheme": { + "$id": "3783", + "kind": "array", + "type": { + "$ref": "773" + }, + "value": [ + { + "$id": "3784", + "kind": "model", + "type": { + "$ref": "774" + }, + "value": { + "$id": "3785", + "scheme": { + "$id": "3786", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "AlignedAffinity" + }, + "serviceName": { + "$id": "3787", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1" + } + } + } + ] + }, + "defaultMoveCost": { + "$id": "3788", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "Medium" + }, + "instanceCount": { + "$id": "3789", + "kind": "number", + "type": { + "$ref": "1066" + }, + "value": 5 + }, + "minInstanceCount": { + "$id": "3790", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 3 + }, + "minInstancePercentage": { + "$id": "3791", + "kind": "number", + "type": { + "$ref": "1074" + }, + "value": 30 + }, + "partitionDescription": { + "$id": "3792", + "kind": "model", + "type": { + "$ref": "1003" + }, + "value": { + "$id": "3793", + "partitionScheme": { + "$id": "3794", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "Singleton" + } + } + }, + "placementConstraints": { + "$id": "3795", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "NodeType==frontend" + }, + "provisioningState": { + "$id": "3796", + "kind": "string", + "type": { + "$ref": "972" + }, + "value": "Succeeded" + }, + "scalingPolicies": { + "$id": "3797", + "kind": "array", + "type": { + "$ref": "867" + }, + "value": [ + { + "$id": "3798", + "kind": "model", + "type": { + "$ref": "868" + }, + "value": { + "$id": "3799", + "scalingMechanism": { + "$id": "3800", + "kind": "model", + "type": { + "$ref": "893" + }, + "value": { + "$id": "3801", + "kind": { + "$id": "3802", + "kind": "string", + "type": { + "$ref": "907" + }, + "value": "ScalePartitionInstanceCount" + }, + "maxInstanceCount": { + "$id": "3803", + "kind": "number", + "type": { + "$ref": "899" + }, + "value": 9 + }, + "minInstanceCount": { + "$id": "3804", + "kind": "number", + "type": { + "$ref": "895" + }, + "value": 3 + }, + "scaleIncrement": { + "$id": "3805", + "kind": "number", + "type": { + "$ref": "903" + }, + "value": 2 + } + } + }, + "scalingTrigger": { + "$id": "3806", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "3807", + "kind": { + "$id": "3808", + "kind": "string", + "type": { + "$ref": "937" + }, + "value": "AveragePartitionLoadTrigger" + }, + "lowerLoadThreshold": { + "$id": "3809", + "kind": "number", + "type": { + "$ref": "925" + }, + "value": 2 + }, + "metricName": { + "$id": "3810", + "kind": "string", + "type": { + "$ref": "921" + }, + "value": "metricName" + }, + "scaleInterval": { + "$id": "3811", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "00:01:00" + }, + "upperLoadThreshold": { + "$id": "3812", + "kind": "number", + "type": { + "$ref": "929" + }, + "value": 8 + } + } + } + } + } + ] + }, + "serviceKind": { + "$id": "3813", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "3814", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3815", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3816", + "name": { + "$id": "3817", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "metric1" + }, + "defaultLoad": { + "$id": "3818", + "kind": "number", + "type": { + "$ref": "803" + }, + "value": 3 + }, + "weight": { + "$id": "3819", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "3820", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "servicePlacementPolicies": { + "$id": "3821", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [ + { + "$id": "3822", + "kind": "model", + "type": { + "$ref": "855" + }, + "value": { + "$id": "3823", + "type": { + "$id": "3824", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "NonPartiallyPlaceService" + } + } + } + ] + }, + "serviceTypeName": { + "$id": "3825", + "kind": "string", + "type": { + "$ref": "976" + }, + "value": "myServiceType" + } + } + }, + "tags": { + "$id": "3826", + "kind": "dict", + "type": { + "$ref": "1085" + }, + "value": { + "$id": "3827", + "a": { + "$id": "3828", + "kind": "string", + "type": { + "$ref": "1087" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3829", + "name": "delete", + "resourceName": "ServiceResource", + "doc": "Delete a Service Fabric managed service resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3830", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3831", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3832", + "type": { + "$id": "3833", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3834", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3836", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3837", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3838", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3839", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3840", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3841", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3842", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "3843", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3844", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3845", + "kind": "constant", + "valueType": { + "$id": "3846", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3847", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3848", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3849", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3850", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3851", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3852", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "3853", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + "bufferResponse": true, + "longRunning": { + "$id": "3854", + "finalStateVia": 1, + "finalResponse": { + "$id": "3855", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.delete", + "decorators": [], + "examples": [ + { + "$id": "3856", + "kind": "http", + "name": "Delete a service", + "description": "Delete a service", + "filePath": "2025-03-01-preview/ServiceDeleteOperation_example.json", + "parameters": [ + { + "$id": "3857", + "parameter": { + "$ref": "3830" + }, + "value": { + "$id": "3858", + "kind": "string", + "type": { + "$ref": "3831" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3859", + "parameter": { + "$ref": "3840" + }, + "value": { + "$id": "3860", + "kind": "string", + "type": { + "$ref": "3841" + }, + "value": "myApp" + } + }, + { + "$id": "3861", + "parameter": { + "$ref": "3838" + }, + "value": { + "$id": "3862", + "kind": "string", + "type": { + "$ref": "3839" + }, + "value": "myCluster" + } + }, + { + "$id": "3863", + "parameter": { + "$ref": "3836" + }, + "value": { + "$id": "3864", + "kind": "string", + "type": { + "$ref": "3837" + }, + "value": "resRg" + } + }, + { + "$id": "3865", + "parameter": { + "$ref": "3842" + }, + "value": { + "$id": "3866", + "kind": "string", + "type": { + "$ref": "3843" + }, + "value": "myService" + } + }, + { + "$id": "3867", + "parameter": { + "$ref": "3834" + }, + "value": { + "$id": "3868", + "kind": "string", + "type": { + "$ref": "3835" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3869", + "response": { + "$ref": "3847" + }, + "statusCode": 202 + }, + { + "$id": "3870", + "response": { + "$ref": "3853" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "3871", + "name": "listByApplications", + "resourceName": "ServiceResource", + "doc": "Gets all service resources created or in the process of being created in the Service Fabric managed application resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3872", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3873", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3874", + "type": { + "$id": "3875", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3876", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3877", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3878", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3880", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3881", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3882", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3884", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3885", + "kind": "constant", + "valueType": { + "$id": "3886", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3887", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1101" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services", + "bufferResponse": true, + "paging": { + "$id": "3888", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "3889", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.listByApplications", + "decorators": [], + "examples": [ + { + "$id": "3890", + "kind": "http", + "name": "Get a list of service resources", + "description": "Get a list of service resources", + "filePath": "2025-03-01-preview/ServiceListOperation_example.json", + "parameters": [ + { + "$id": "3891", + "parameter": { + "$ref": "3872" + }, + "value": { + "$id": "3892", + "kind": "string", + "type": { + "$ref": "3873" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3893", + "parameter": { + "$ref": "3882" + }, + "value": { + "$id": "3894", + "kind": "string", + "type": { + "$ref": "3883" + }, + "value": "myApp" + } + }, + { + "$id": "3895", + "parameter": { + "$ref": "3880" + }, + "value": { + "$id": "3896", + "kind": "string", + "type": { + "$ref": "3881" + }, + "value": "myCluster" + } + }, + { + "$id": "3897", + "parameter": { + "$ref": "3878" + }, + "value": { + "$id": "3898", + "kind": "string", + "type": { + "$ref": "3879" + }, + "value": "resRg" + } + }, + { + "$id": "3899", + "parameter": { + "$ref": "3876" + }, + "value": { + "$id": "3900", + "kind": "string", + "type": { + "$ref": "3877" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3901", + "response": { + "$ref": "3887" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3902", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "3903", + "nextLink": { + "$id": "3904", + "kind": "string", + "type": { + "$ref": "1107" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "3905", + "kind": "array", + "type": { + "$ref": "1103" + }, + "value": [ + { + "$id": "3906", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "3907", + "name": { + "$id": "3908", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "3909", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3910", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3911", + "kind": "model", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "3912", + "instanceCount": { + "$id": "3913", + "kind": "number", + "type": { + "$ref": "1066" + }, + "value": 1 + }, + "partitionDescription": { + "$id": "3914", + "kind": "model", + "type": { + "$ref": "1003" + }, + "value": { + "$id": "3915", + "partitionScheme": { + "$id": "3916", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "Singleton" + } + } + }, + "provisioningState": { + "$id": "3917", + "kind": "string", + "type": { + "$ref": "972" + }, + "value": "Updating" + }, + "serviceKind": { + "$id": "3918", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "3919", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3920", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3921", + "name": { + "$id": "3922", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "metric1" + }, + "weight": { + "$id": "3923", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "3924", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "serviceTypeName": { + "$id": "3925", + "kind": "string", + "type": { + "$ref": "976" + }, + "value": "myServiceType" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "3926", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "3927", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "3928", + "type": { + "$id": "3929", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "3930", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "3931" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "3932", + "kind": "client", + "name": "ManagedClusterVersion", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "3933", + "name": "get", + "resourceName": "ManagedClusterVersion", + "summary": "Gets information about a Service Fabric managed cluster code version available in the specified location.", + "doc": "Gets information about an available Service Fabric managed cluster code version.", + "accessibility": "public", + "parameters": [ + { + "$id": "3934", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3935", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3936", + "type": { + "$id": "3937", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3938", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3939", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3940", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "3941", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3942", + "name": "clusterVersion", + "nameInRequest": "clusterVersion", + "doc": "The cluster code version.", + "type": { + "$id": "3943", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3944", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3945", + "kind": "constant", + "valueType": { + "$id": "3946", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3947", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1111" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.get", + "decorators": [], + "examples": [ + { + "$id": "3948", + "kind": "http", + "name": "Get cluster version", + "description": "Get cluster version", + "filePath": "2025-03-01-preview/ManagedClusterVersionGet_example.json", + "parameters": [ + { + "$id": "3949", + "parameter": { + "$ref": "3934" + }, + "value": { + "$id": "3950", + "kind": "string", + "type": { + "$ref": "3935" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3951", + "parameter": { + "$ref": "3942" + }, + "value": { + "$id": "3952", + "kind": "string", + "type": { + "$ref": "3943" + }, + "value": "7.2.477.9590" + } + }, + { + "$id": "3953", + "parameter": { + "$ref": "3940" + }, + "value": { + "$id": "3954", + "kind": "string", + "type": { + "$ref": "3941" + }, + "value": "eastus" + } + }, + { + "$id": "3955", + "parameter": { + "$ref": "3938" + }, + "value": { + "$id": "3956", + "kind": "string", + "type": { + "$ref": "3939" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3957", + "response": { + "$ref": "3947" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3958", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "3959", + "name": { + "$id": "3960", + "kind": "string", + "type": { + "$ref": "1117" + }, + "value": "7.2.477.9590" + }, + "type": { + "$id": "3961", + "kind": "string", + "type": { + "$ref": "1121" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "3962", + "kind": "string", + "type": { + "$ref": "1113" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.477.9590" + }, + "properties": { + "$id": "3963", + "kind": "model", + "type": { + "$ref": "1125" + }, + "value": { + "$id": "3964", + "clusterCodeVersion": { + "$id": "3965", + "kind": "string", + "type": { + "$ref": "1127" + }, + "value": "7.2.477.9590" + }, + "osType": { + "$id": "3966", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "3967", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3968", + "name": "list", + "resourceName": "ManagedClusterVersion", + "summary": "Gets the list of Service Fabric cluster code versions available for the specified location.", + "doc": "Gets all available code versions for Service Fabric cluster resources by location.", + "accessibility": "public", + "parameters": [ + { + "$id": "3969", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3970", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3971", + "type": { + "$id": "3972", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3973", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3974", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3975", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "3976", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3977", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3978", + "kind": "constant", + "valueType": { + "$id": "3979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3980", + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "3981", + "kind": "array", + "name": "ArrayManagedClusterCodeVersionResult", + "valueType": { + "$ref": "1111" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.list", + "decorators": [], + "examples": [ + { + "$id": "3982", + "kind": "http", + "name": "List cluster versions", + "description": "List cluster versions", + "filePath": "2025-03-01-preview/ManagedClusterVersionList_example.json", + "parameters": [ + { + "$id": "3983", + "parameter": { + "$ref": "3969" + }, + "value": { + "$id": "3984", + "kind": "string", + "type": { + "$ref": "3970" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3985", + "parameter": { + "$ref": "3975" + }, + "value": { + "$id": "3986", + "kind": "string", + "type": { + "$ref": "3976" + }, + "value": "eastus" + } + }, + { + "$id": "3987", + "parameter": { + "$ref": "3973" + }, + "value": { + "$id": "3988", + "kind": "string", + "type": { + "$ref": "3974" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3989", + "response": { + "$ref": "3980" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3990", + "kind": "array", + "type": { + "$ref": "3981" + }, + "value": [ + { + "$id": "3991", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "3992", + "name": { + "$id": "3993", + "kind": "string", + "type": { + "$ref": "1117" + }, + "value": "7.2.457.9590" + }, + "type": { + "$id": "3994", + "kind": "string", + "type": { + "$ref": "1121" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "3995", + "kind": "string", + "type": { + "$ref": "1113" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.457.9590" + }, + "properties": { + "$id": "3996", + "kind": "model", + "type": { + "$ref": "1125" + }, + "value": { + "$id": "3997", + "clusterCodeVersion": { + "$id": "3998", + "kind": "string", + "type": { + "$ref": "1127" + }, + "value": "7.2.457.9590" + }, + "osType": { + "$id": "3999", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4000", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + }, + { + "$id": "4001", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "4002", + "name": { + "$id": "4003", + "kind": "string", + "type": { + "$ref": "1117" + }, + "value": "7.2.477.9590" + }, + "type": { + "$id": "4004", + "kind": "string", + "type": { + "$ref": "1121" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4005", + "kind": "string", + "type": { + "$ref": "1113" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.477.9590" + }, + "properties": { + "$id": "4006", + "kind": "model", + "type": { + "$ref": "1125" + }, + "value": { + "$id": "4007", + "clusterCodeVersion": { + "$id": "4008", + "kind": "string", + "type": { + "$ref": "1127" + }, + "value": "7.2.477.9590" + }, + "osType": { + "$id": "4009", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4010", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + } + ] + } + } + ] + } + ] + }, + { + "$id": "4011", + "name": "GetManagedClusterVersionByEnvironment", + "resourceName": "ManagedClusterVersion", + "summary": "Gets information about a Service Fabric cluster code version available for the specified environment.", + "doc": "Gets information about an available Service Fabric cluster code version by environment.", + "accessibility": "public", + "parameters": [ + { + "$id": "4012", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4013", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4014", + "type": { + "$id": "4015", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4016", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4018", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4020", + "name": "environment", + "nameInRequest": "environment", + "doc": "The operating system of the cluster.", + "type": { + "$ref": "116" + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4021", + "name": "clusterVersion", + "nameInRequest": "clusterVersion", + "doc": "The cluster code version.", + "type": { + "$id": "4022", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4023", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4024", + "kind": "constant", + "valueType": { + "$id": "4025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4026", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1111" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment", + "decorators": [], + "examples": [ + { + "$id": "4027", + "kind": "http", + "name": "Get cluster version by environment", + "description": "Get cluster version by environment", + "filePath": "2025-03-01-preview/ManagedClusterVersionGetByEnvironment_example.json", + "parameters": [ + { + "$id": "4028", + "parameter": { + "$ref": "4012" + }, + "value": { + "$id": "4029", + "kind": "string", + "type": { + "$ref": "4013" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4030", + "parameter": { + "$ref": "4021" + }, + "value": { + "$id": "4031", + "kind": "string", + "type": { + "$ref": "4022" + }, + "value": "7.2.477.9590" + } + }, + { + "$id": "4032", + "parameter": { + "$ref": "4020" + }, + "value": { + "$id": "4033", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "Windows" + } + }, + { + "$id": "4034", + "parameter": { + "$ref": "4018" + }, + "value": { + "$id": "4035", + "kind": "string", + "type": { + "$ref": "4019" + }, + "value": "eastus" + } + }, + { + "$id": "4036", + "parameter": { + "$ref": "4016" + }, + "value": { + "$id": "4037", + "kind": "string", + "type": { + "$ref": "4017" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4038", + "response": { + "$ref": "4026" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4039", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "4040", + "name": { + "$id": "4041", + "kind": "string", + "type": { + "$ref": "1117" + }, + "value": "7.2.477.9590" + }, + "type": { + "$id": "4042", + "kind": "string", + "type": { + "$ref": "1121" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4043", + "kind": "string", + "type": { + "$ref": "1113" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.477.9590" + }, + "properties": { + "$id": "4044", + "kind": "model", + "type": { + "$ref": "1125" + }, + "value": { + "$id": "4045", + "clusterCodeVersion": { + "$id": "4046", + "kind": "string", + "type": { + "$ref": "1127" + }, + "value": "7.2.477.9590" + }, + "osType": { + "$id": "4047", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4048", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "4049", + "name": "listByEnvironment", + "resourceName": "ManagedClusterVersion", + "summary": "Gets the list of Service Fabric cluster code versions available for the specified environment.", + "doc": "Gets all available code versions for Service Fabric cluster resources by environment.", + "accessibility": "public", + "parameters": [ + { + "$id": "4050", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4051", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4052", + "type": { + "$id": "4053", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4054", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4055", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4056", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4057", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4058", + "name": "environment", + "nameInRequest": "environment", + "doc": "The operating system of the cluster.", + "type": { + "$ref": "116" + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4059", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4060", + "kind": "constant", + "valueType": { + "$id": "4061", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4062", + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "4063", + "kind": "array", + "name": "ArrayManagedClusterCodeVersionResult", + "valueType": { + "$ref": "1111" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment", + "decorators": [], + "examples": [ + { + "$id": "4064", + "kind": "http", + "name": "List cluster versions by environment", + "description": "List cluster versions by environment", + "filePath": "2025-03-01-preview/ManagedClusterVersionListByEnvironment.json", + "parameters": [ + { + "$id": "4065", + "parameter": { + "$ref": "4050" + }, + "value": { + "$id": "4066", + "kind": "string", + "type": { + "$ref": "4051" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4067", + "parameter": { + "$ref": "4058" + }, + "value": { + "$id": "4068", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "Windows" + } + }, + { + "$id": "4069", + "parameter": { + "$ref": "4056" + }, + "value": { + "$id": "4070", + "kind": "string", + "type": { + "$ref": "4057" + }, + "value": "eastus" + } + }, + { + "$id": "4071", + "parameter": { + "$ref": "4054" + }, + "value": { + "$id": "4072", + "kind": "string", + "type": { + "$ref": "4055" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4073", + "response": { + "$ref": "4062" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4074", + "kind": "array", + "type": { + "$ref": "4063" + }, + "value": [ + { + "$id": "4075", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "4076", + "name": { + "$id": "4077", + "kind": "string", + "type": { + "$ref": "1117" + }, + "value": "7.2.457.9590" + }, + "type": { + "$id": "4078", + "kind": "string", + "type": { + "$ref": "1121" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4079", + "kind": "string", + "type": { + "$ref": "1113" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.457.9590" + }, + "properties": { + "$id": "4080", + "kind": "model", + "type": { + "$ref": "1125" + }, + "value": { + "$id": "4081", + "clusterCodeVersion": { + "$id": "4082", + "kind": "string", + "type": { + "$ref": "1127" + }, + "value": "7.2.457.9590" + }, + "osType": { + "$id": "4083", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4084", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + }, + { + "$id": "4085", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "4086", + "name": { + "$id": "4087", + "kind": "string", + "type": { + "$ref": "1117" + }, + "value": "7.2.477.9590" + }, + "type": { + "$id": "4088", + "kind": "string", + "type": { + "$ref": "1121" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4089", + "kind": "string", + "type": { + "$ref": "1113" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.477.9590" + }, + "properties": { + "$id": "4090", + "kind": "model", + "type": { + "$ref": "1125" + }, + "value": { + "$id": "4091", + "clusterCodeVersion": { + "$id": "4092", + "kind": "string", + "type": { + "$ref": "1127" + }, + "value": "7.2.477.9590" + }, + "osType": { + "$id": "4093", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4094", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + } + ] + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "4095", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "4096", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "4097", + "type": { + "$id": "4098", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "4099", + "kind": "client", + "name": "ManagedUnsupportedVMSizes", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "4100", + "name": "GetManagedUnsupportedVmSize", + "resourceName": "ManagedUnsupportedVMSizes", + "doc": "Get unsupported vm size for Service Fabric Managed Clusters.", + "accessibility": "public", + "parameters": [ + { + "$id": "4101", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4103", + "type": { + "$id": "4104", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4105", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4106", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4107", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4109", + "name": "vmSize", + "nameInRequest": "vmSize", + "doc": "VM Size name.", + "type": { + "$id": "4110", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4111", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4112", + "kind": "constant", + "valueType": { + "$id": "4113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4114", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1140" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get", + "decorators": [], + "examples": [ + { + "$id": "4115", + "kind": "http", + "name": "Get unsupported vm sizes", + "description": "Get unsupported vm sizes", + "filePath": "2025-03-01-preview/managedUnsupportedVMSizesGet_example.json", + "parameters": [ + { + "$id": "4116", + "parameter": { + "$ref": "4101" + }, + "value": { + "$id": "4117", + "kind": "string", + "type": { + "$ref": "4102" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4118", + "parameter": { + "$ref": "4107" + }, + "value": { + "$id": "4119", + "kind": "string", + "type": { + "$ref": "4108" + }, + "value": "eastus" + } + }, + { + "$id": "4120", + "parameter": { + "$ref": "4105" + }, + "value": { + "$id": "4121", + "kind": "string", + "type": { + "$ref": "4106" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "4122", + "parameter": { + "$ref": "4109" + }, + "value": { + "$id": "4123", + "kind": "string", + "type": { + "$ref": "4110" + }, + "value": "Standard_B1ls1" + } + } + ], + "responses": [ + { + "$id": "4124", + "response": { + "$ref": "4114" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4125", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4126", + "name": { + "$id": "4127", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B1ls1" + }, + "type": { + "$id": "4128", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4129", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B1ls1" + }, + "properties": { + "$id": "4130", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4131", + "size": { + "$id": "4132", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_B1ls1" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "4133", + "name": "GetManagedUnsupportedVmSizes", + "resourceName": "ManagedUnsupportedVMSizes", + "doc": "Get the lists of unsupported vm sizes for Service Fabric Managed Clusters.", + "accessibility": "public", + "parameters": [ + { + "$id": "4134", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4136", + "type": { + "$id": "4137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4138", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4140", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4142", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4143", + "kind": "constant", + "valueType": { + "$id": "4144", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4145", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1161" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes", + "bufferResponse": true, + "paging": { + "$id": "4146", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "4147", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.list", + "decorators": [], + "examples": [ + { + "$id": "4148", + "kind": "http", + "name": "List unsupported vm sizes", + "description": "List unsupported vm sizes", + "filePath": "2025-03-01-preview/managedUnsupportedVMSizesList_example.json", + "parameters": [ + { + "$id": "4149", + "parameter": { + "$ref": "4134" + }, + "value": { + "$id": "4150", + "kind": "string", + "type": { + "$ref": "4135" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4151", + "parameter": { + "$ref": "4140" + }, + "value": { + "$id": "4152", + "kind": "string", + "type": { + "$ref": "4141" + }, + "value": "eastus" + } + }, + { + "$id": "4153", + "parameter": { + "$ref": "4138" + }, + "value": { + "$id": "4154", + "kind": "string", + "type": { + "$ref": "4139" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4155", + "response": { + "$ref": "4145" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4156", + "kind": "model", + "type": { + "$ref": "1161" + }, + "value": { + "$id": "4157", + "value": { + "$id": "4158", + "kind": "array", + "type": { + "$ref": "1163" + }, + "value": [ + { + "$id": "4159", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4160", + "name": { + "$id": "4161", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B1ls1" + }, + "type": { + "$id": "4162", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4163", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B1ls1" + }, + "properties": { + "$id": "4164", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4165", + "size": { + "$id": "4166", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_B1ls1" + } + } + } + } + }, + { + "$id": "4167", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4168", + "name": { + "$id": "4169", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B1s" + }, + "type": { + "$id": "4170", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4171", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B1s" + }, + "properties": { + "$id": "4172", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4173", + "size": { + "$id": "4174", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_B1s" + } + } + } + } + }, + { + "$id": "4175", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4176", + "name": { + "$id": "4177", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B1ms" + }, + "type": { + "$id": "4178", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4179", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B1ms" + }, + "properties": { + "$id": "4180", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4181", + "size": { + "$id": "4182", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_B1ms" + } + } + } + } + }, + { + "$id": "4183", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4184", + "name": { + "$id": "4185", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B2s" + }, + "type": { + "$id": "4186", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4187", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B2s" + }, + "properties": { + "$id": "4188", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4189", + "size": { + "$id": "4190", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_B2s" + } + } + } + } + }, + { + "$id": "4191", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4192", + "name": { + "$id": "4193", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B2ms" + }, + "type": { + "$id": "4194", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4195", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B2ms" + }, + "properties": { + "$id": "4196", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4197", + "size": { + "$id": "4198", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_B2ms" + } + } + } + } + }, + { + "$id": "4199", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4200", + "name": { + "$id": "4201", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B4ms" + }, + "type": { + "$id": "4202", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4203", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B4ms" + }, + "properties": { + "$id": "4204", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4205", + "size": { + "$id": "4206", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_B4ms" + } + } + } + } + }, + { + "$id": "4207", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4208", + "name": { + "$id": "4209", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B8ms" + }, + "type": { + "$id": "4210", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4211", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B8ms" + }, + "properties": { + "$id": "4212", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4213", + "size": { + "$id": "4214", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_B8ms" + } + } + } + } + }, + { + "$id": "4215", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4216", + "name": { + "$id": "4217", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A1_v2" + }, + "type": { + "$id": "4218", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4219", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A1_v2" + }, + "properties": { + "$id": "4220", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4221", + "size": { + "$id": "4222", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_A1_v2" + } + } + } + } + }, + { + "$id": "4223", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4224", + "name": { + "$id": "4225", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A2_v2" + }, + "type": { + "$id": "4226", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4227", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A2_v2" + }, + "properties": { + "$id": "4228", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4229", + "size": { + "$id": "4230", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_A2_v2" + } + } + } + } + }, + { + "$id": "4231", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4232", + "name": { + "$id": "4233", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A4_v2" + }, + "type": { + "$id": "4234", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4235", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A4_v2" + }, + "properties": { + "$id": "4236", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4237", + "size": { + "$id": "4238", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_A4_v2" + } + } + } + } + }, + { + "$id": "4239", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4240", + "name": { + "$id": "4241", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A8_v2" + }, + "type": { + "$id": "4242", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4243", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A8_v2" + }, + "properties": { + "$id": "4244", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4245", + "size": { + "$id": "4246", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_A8_v2" + } + } + } + } + }, + { + "$id": "4247", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4248", + "name": { + "$id": "4249", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A2m_v2" + }, + "type": { + "$id": "4250", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4251", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A2m_v2" + }, + "properties": { + "$id": "4252", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4253", + "size": { + "$id": "4254", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_A2m_v2" + } + } + } + } + }, + { + "$id": "4255", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4256", + "name": { + "$id": "4257", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A4m_v2" + }, + "type": { + "$id": "4258", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4259", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A4m_v2" + }, + "properties": { + "$id": "4260", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4261", + "size": { + "$id": "4262", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_A4m_v2" + } + } + } + } + }, + { + "$id": "4263", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4264", + "name": { + "$id": "4265", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A8m_v2" + }, + "type": { + "$id": "4266", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4267", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A8m_v2" + }, + "properties": { + "$id": "4268", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4269", + "size": { + "$id": "4270", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_A8m_v2" + } + } + } + } + }, + { + "$id": "4271", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4272", + "name": { + "$id": "4273", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Basic_A0" + }, + "type": { + "$id": "4274", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4275", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A0" + }, + "properties": { + "$id": "4276", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4277", + "size": { + "$id": "4278", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Basic_A0" + } + } + } + } + }, + { + "$id": "4279", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4280", + "name": { + "$id": "4281", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Basic_A1" + }, + "type": { + "$id": "4282", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4283", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A1" + }, + "properties": { + "$id": "4284", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4285", + "size": { + "$id": "4286", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Basic_A1" + } + } + } + } + }, + { + "$id": "4287", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4288", + "name": { + "$id": "4289", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Basic_A2" + }, + "type": { + "$id": "4290", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4291", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A2" + }, + "properties": { + "$id": "4292", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4293", + "size": { + "$id": "4294", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Basic_A2" + } + } + } + } + }, + { + "$id": "4295", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4296", + "name": { + "$id": "4297", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Basic_A3" + }, + "type": { + "$id": "4298", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4299", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A3" + }, + "properties": { + "$id": "4300", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4301", + "size": { + "$id": "4302", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Basic_A3" + } + } + } + } + }, + { + "$id": "4303", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4304", + "name": { + "$id": "4305", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Basic_A4" + }, + "type": { + "$id": "4306", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4307", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A4" + }, + "properties": { + "$id": "4308", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4309", + "size": { + "$id": "4310", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Basic_A4" + } + } + } + } + }, + { + "$id": "4311", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4312", + "name": { + "$id": "4313", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A0" + }, + "type": { + "$id": "4314", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4315", + "kind": "string", + "type": { + "$ref": "1150" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A0" + }, + "properties": { + "$id": "4316", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4317", + "size": { + "$id": "4318", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "Standard_A0" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "4319", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "4320", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "4321", + "type": { + "$id": "4322", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "4323", + "kind": "client", + "name": "ManagedClusters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "4324", + "name": "get", + "resourceName": "ManagedCluster", + "doc": "Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group.", + "accessibility": "public", + "parameters": [ + { + "$id": "4325", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4327", + "type": { + "$id": "4328", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4329", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4330", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4331", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4332", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4333", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4334", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4335", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4336", + "kind": "constant", + "valueType": { + "$id": "4337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4338", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1171" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.get", + "decorators": [], + "examples": [ + { + "$id": "4339", + "kind": "http", + "name": "Get a cluster", + "description": "Get a cluster", + "filePath": "2025-03-01-preview/ManagedClusterGetOperation_example.json", + "parameters": [ + { + "$id": "4340", + "parameter": { + "$ref": "4325" + }, + "value": { + "$id": "4341", + "kind": "string", + "type": { + "$ref": "4326" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4342", + "parameter": { + "$ref": "4333" + }, + "value": { + "$id": "4343", + "kind": "string", + "type": { + "$ref": "4334" + }, + "value": "myCluster" + } + }, + { + "$id": "4344", + "parameter": { + "$ref": "4331" + }, + "value": { + "$id": "4345", + "kind": "string", + "type": { + "$ref": "4332" + }, + "value": "resRg" + } + }, + { + "$id": "4346", + "parameter": { + "$ref": "4329" + }, + "value": { + "$id": "4347", + "kind": "string", + "type": { + "$ref": "4330" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4348", + "response": { + "$ref": "4338" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4349", + "kind": "model", + "type": { + "$ref": "1171" + }, + "value": { + "$id": "4350", + "name": { + "$id": "4351", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "4352", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "4353", + "kind": "string", + "type": { + "$ref": "1593" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "4354", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "4355", + "kind": "string", + "type": { + "$ref": "1180" + }, + "value": "eastus" + }, + "properties": { + "$id": "4356", + "kind": "model", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "4357", + "adminUserName": { + "$id": "4358", + "kind": "string", + "type": { + "$ref": "1220" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "4359", + "kind": "number", + "type": { + "$ref": "1212" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "4360", + "kind": "array", + "type": { + "$ref": "1207" + }, + "value": [ + { + "$id": "4361", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "4362", + "kind": "string", + "type": { + "$ref": "1388" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "4363", + "kind": "string", + "type": { + "$ref": "1199" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "4364", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "4365", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "4366", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "4367", + "kind": "string", + "type": { + "$ref": "1186" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "4368", + "kind": "array", + "type": { + "$ref": "1363" + }, + "value": [ + { + "$id": "4369", + "kind": "model", + "type": { + "$ref": "1364" + }, + "value": { + "$id": "4370", + "name": { + "$id": "4371", + "kind": "string", + "type": { + "$ref": "1366" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "4372", + "kind": "array", + "type": { + "$ref": "1370" + }, + "value": [ + { + "$id": "4373", + "kind": "model", + "type": { + "$ref": "1371" + }, + "value": { + "$id": "4374", + "name": { + "$id": "4375", + "kind": "string", + "type": { + "$ref": "1373" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "4376", + "kind": "string", + "type": { + "$ref": "1377" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "4377", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "4378", + "kind": "number", + "type": { + "$ref": "1216" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "4379", + "kind": "array", + "type": { + "$ref": "1228" + }, + "value": [ + { + "$id": "4380", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4381", + "backendPort": { + "$id": "4382", + "kind": "number", + "type": { + "$ref": "1235" + }, + "value": 80 + }, + "frontendPort": { + "$id": "4383", + "kind": "number", + "type": { + "$ref": "1231" + }, + "value": 80 + }, + "probePort": { + "$id": "4384", + "kind": "number", + "type": { + "$ref": "1242" + }, + "value": 80 + }, + "probeProtocol": { + "$id": "4385", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4386", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4387", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4388", + "backendPort": { + "$id": "4389", + "kind": "number", + "type": { + "$ref": "1235" + }, + "value": 443 + }, + "frontendPort": { + "$id": "4390", + "kind": "number", + "type": { + "$ref": "1231" + }, + "value": 443 + }, + "probePort": { + "$id": "4391", + "kind": "number", + "type": { + "$ref": "1242" + }, + "value": 443 + }, + "probeProtocol": { + "$id": "4392", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4393", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4394", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4395", + "backendPort": { + "$id": "4396", + "kind": "number", + "type": { + "$ref": "1235" + }, + "value": 10000 + }, + "frontendPort": { + "$id": "4397", + "kind": "number", + "type": { + "$ref": "1231" + }, + "value": 10000 + }, + "probePort": { + "$id": "4398", + "kind": "number", + "type": { + "$ref": "1242" + }, + "value": 10000 + }, + "probeProtocol": { + "$id": "4399", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "tcp" + }, + "protocol": { + "$id": "4400", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "tcp" + } + } + } + ] + }, + "provisioningState": { + "$id": "4401", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "4402", + "kind": "model", + "type": { + "$ref": "1597" + }, + "value": { + "$id": "4403", + "name": { + "$id": "4404", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "4405", + "kind": "dict", + "type": { + "$ref": "1174" + }, + "value": { + "$id": "4406" + } + } + } + } + } + ] + } + ] + }, + { + "$id": "4407", + "name": "createOrUpdate", + "resourceName": "ManagedCluster", + "doc": "Create or update a Service Fabric managed cluster resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "4408", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4410", + "type": { + "$id": "4411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4412", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4413", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4414", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4416", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4418", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "4419", + "kind": "constant", + "valueType": { + "$id": "4420", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4421", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4422", + "kind": "constant", + "valueType": { + "$id": "4423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4424", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The cluster resource.", + "type": { + "$ref": "1171" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4425", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1171" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "4426", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "1171" + }, + "headers": [ + { + "$id": "4427", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "4428", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "4429", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "4430", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "4431", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "4432", + "finalStateVia": 1, + "finalResponse": { + "$id": "4433", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1171" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "4434", + "kind": "http", + "name": "Put a cluster with maximum parameters", + "description": "Put a cluster with maximum parameters", + "filePath": "2025-03-01-preview/ManagedClusterPutOperation_example_max.json", + "parameters": [ + { + "$id": "4435", + "parameter": { + "$ref": "4408" + }, + "value": { + "$id": "4436", + "kind": "string", + "type": { + "$ref": "4409" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4437", + "parameter": { + "$ref": "4416" + }, + "value": { + "$id": "4438", + "kind": "string", + "type": { + "$ref": "4417" + }, + "value": "mycluster" + } + }, + { + "$id": "4439", + "parameter": { + "$ref": "4414" + }, + "value": { + "$id": "4440", + "kind": "string", + "type": { + "$ref": "4415" + }, + "value": "resRg" + } + }, + { + "$id": "4441", + "parameter": { + "$ref": "4412" + }, + "value": { + "$id": "4442", + "kind": "string", + "type": { + "$ref": "4413" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4443", + "response": { + "$ref": "4425" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4444", + "kind": "model", + "type": { + "$ref": "1171" + }, + "value": { + "$id": "4445", + "name": { + "$id": "4446", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "4447", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "4448", + "kind": "string", + "type": { + "$ref": "1593" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "4449", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "4450", + "kind": "string", + "type": { + "$ref": "1180" + }, + "value": "eastus" + }, + "properties": { + "$id": "4451", + "kind": "model", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "4452", + "addonFeatures": { + "$id": "4453", + "kind": "array", + "type": { + "$ref": "1398" + }, + "value": [ + { + "$id": "4454", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "DnsService" + }, + { + "$id": "4455", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "BackupRestoreService" + }, + { + "$id": "4456", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "ResourceMonitorService" + } + ] + }, + "adminUserName": { + "$id": "4457", + "kind": "string", + "type": { + "$ref": "1220" + }, + "value": "vmadmin" + }, + "allocatedOutboundPorts": { + "$id": "4458", + "kind": "number", + "type": { + "$ref": "1583" + }, + "value": 0 + }, + "allowRdpAccess": { + "$id": "4459", + "kind": "boolean", + "type": { + "$ref": "1259" + }, + "value": true + }, + "applicationTypeVersionsCleanupPolicy": { + "$id": "4460", + "kind": "model", + "type": { + "$ref": "1410" + }, + "value": { + "$id": "4461", + "maxUnusedVersionsToKeep": { + "$id": "4462", + "kind": "number", + "type": { + "$ref": "1412" + }, + "value": 3 + } + } + }, + "autoGeneratedDomainNameLabelScope": { + "$id": "4463", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SubscriptionReuse" + }, + "auxiliarySubnets": { + "$id": "4464", + "kind": "array", + "type": { + "$ref": "1448" + }, + "value": [ + { + "$id": "4465", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "4466", + "name": { + "$id": "4467", + "kind": "string", + "type": { + "$ref": "1451" + }, + "value": "testSubnet1" + }, + "enableIpv6": { + "$id": "4468", + "kind": "boolean", + "type": { + "$ref": "1455" + }, + "value": true + }, + "networkSecurityGroupId": { + "$id": "4469", + "kind": "string", + "type": { + "$ref": "1465" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1" + }, + "privateEndpointNetworkPolicies": { + "$id": "4470", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "enabled" + }, + "privateLinkServiceNetworkPolicies": { + "$id": "4471", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "enabled" + } + } + } + ] + }, + "clientConnectionPort": { + "$id": "4472", + "kind": "number", + "type": { + "$ref": "1212" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "4473", + "kind": "array", + "type": { + "$ref": "1207" + }, + "value": [ + { + "$id": "4474", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "4475", + "kind": "string", + "type": { + "$ref": "1388" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "4476", + "kind": "string", + "type": { + "$ref": "1199" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "4477", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeMode": { + "$id": "4478", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Manual" + }, + "ddosProtectionPlanId": { + "$id": "4479", + "kind": "string", + "type": { + "$ref": "1503" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan" + }, + "dnsName": { + "$id": "4480", + "kind": "string", + "type": { + "$ref": "1186" + }, + "value": "mycluster" + }, + "enableAutoOSUpgrade": { + "$id": "4481", + "kind": "boolean", + "type": { + "$ref": "1402" + }, + "value": true + }, + "enableHttpGatewayExclusiveAuthMode": { + "$id": "4482", + "kind": "boolean", + "type": { + "$ref": "1576" + }, + "value": true + }, + "enableIpv6": { + "$id": "4483", + "kind": "boolean", + "type": { + "$ref": "1418" + }, + "value": true + }, + "enableServicePublicIP": { + "$id": "4484", + "kind": "boolean", + "type": { + "$ref": "1444" + }, + "value": true + }, + "fabricSettings": { + "$id": "4485", + "kind": "array", + "type": { + "$ref": "1363" + }, + "value": [ + { + "$id": "4486", + "kind": "model", + "type": { + "$ref": "1364" + }, + "value": { + "$id": "4487", + "name": { + "$id": "4488", + "kind": "string", + "type": { + "$ref": "1366" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "4489", + "kind": "array", + "type": { + "$ref": "1370" + }, + "value": [ + { + "$id": "4490", + "kind": "model", + "type": { + "$ref": "1371" + }, + "value": { + "$id": "4491", + "name": { + "$id": "4492", + "kind": "string", + "type": { + "$ref": "1373" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "4493", + "kind": "string", + "type": { + "$ref": "1377" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "4494", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "mycluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "4495", + "kind": "number", + "type": { + "$ref": "1216" + }, + "value": 19080 + }, + "httpGatewayTokenAuthConnectionPort": { + "$id": "4496", + "kind": "number", + "type": { + "$ref": "1572" + }, + "value": 19081 + }, + "ipTags": { + "$id": "4497", + "kind": "array", + "type": { + "$ref": "1426" + }, + "value": [ + { + "$id": "4498", + "kind": "model", + "type": { + "$ref": "1427" + }, + "value": { + "$id": "4499", + "ipTagType": { + "$id": "4500", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "FirstPartyUsage" + }, + "tag": { + "$id": "4501", + "kind": "string", + "type": { + "$ref": "1433" + }, + "value": "SQL" + } + } + } + ] + }, + "ipv6Address": { + "$id": "4502", + "kind": "string", + "type": { + "$ref": "1439" + }, + "value": "0000:0000:0000:0000:0000:0000:0000:0000" + }, + "loadBalancingRules": { + "$id": "4503", + "kind": "array", + "type": { + "$ref": "1228" + }, + "value": [ + { + "$id": "4504", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4505", + "backendPort": { + "$id": "4506", + "kind": "number", + "type": { + "$ref": "1235" + }, + "value": 80 + }, + "frontendPort": { + "$id": "4507", + "kind": "number", + "type": { + "$ref": "1231" + }, + "value": 80 + }, + "probePort": { + "$id": "4508", + "kind": "number", + "type": { + "$ref": "1242" + }, + "value": 80 + }, + "probeProtocol": { + "$id": "4509", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4510", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4511", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4512", + "backendPort": { + "$id": "4513", + "kind": "number", + "type": { + "$ref": "1235" + }, + "value": 443 + }, + "frontendPort": { + "$id": "4514", + "kind": "number", + "type": { + "$ref": "1231" + }, + "value": 443 + }, + "probePort": { + "$id": "4515", + "kind": "number", + "type": { + "$ref": "1242" + }, + "value": 443 + }, + "probeProtocol": { + "$id": "4516", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4517", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4518", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4519", + "backendPort": { + "$id": "4520", + "kind": "number", + "type": { + "$ref": "1235" + }, + "value": 10000 + }, + "frontendPort": { + "$id": "4521", + "kind": "number", + "type": { + "$ref": "1231" + }, + "value": 10000 + }, + "loadDistribution": { + "$id": "4522", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "Default" + }, + "probePort": { + "$id": "4523", + "kind": "number", + "type": { + "$ref": "1242" + }, + "value": 10000 + }, + "probeProtocol": { + "$id": "4524", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "tcp" + }, + "protocol": { + "$id": "4525", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "tcp" + } + } + } + ] + }, + "networkSecurityRules": { + "$id": "4526", + "kind": "array", + "type": { + "$ref": "1263" + }, + "value": [ + { + "$id": "4527", + "kind": "model", + "type": { + "$ref": "1264" + }, + "value": { + "$id": "4528", + "name": { + "$id": "4529", + "kind": "string", + "type": { + "$ref": "1266" + }, + "value": "TestName" + }, + "description": { + "$id": "4530", + "kind": "string", + "type": { + "$ref": "1270" + }, + "value": "Test description" + }, + "access": { + "$id": "4531", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefixes": { + "$id": "4532", + "kind": "array", + "type": { + "$ref": "1282" + }, + "value": [ + { + "$id": "4533", + "kind": "string", + "type": { + "$ref": "1283" + }, + "value": "*" + } + ] + }, + "destinationPortRanges": { + "$id": "4534", + "kind": "array", + "type": { + "$ref": "1292" + }, + "value": [ + { + "$id": "4535", + "kind": "string", + "type": { + "$ref": "1293" + }, + "value": "*" + } + ] + }, + "direction": { + "$id": "4536", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "4537", + "kind": "number", + "type": { + "$ref": "1316" + }, + "value": 1010 + }, + "sourceAddressPrefixes": { + "$id": "4538", + "kind": "array", + "type": { + "$ref": "1277" + }, + "value": [ + { + "$id": "4539", + "kind": "string", + "type": { + "$ref": "1278" + }, + "value": "*" + } + ] + }, + "sourcePortRanges": { + "$id": "4540", + "kind": "array", + "type": { + "$ref": "1287" + }, + "value": [ + { + "$id": "4541", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "*" + } + ] + }, + "protocol": { + "$id": "4542", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "tcp" + } + } + }, + { + "$id": "4543", + "kind": "model", + "type": { + "$ref": "1264" + }, + "value": { + "$id": "4544", + "name": { + "$id": "4545", + "kind": "string", + "type": { + "$ref": "1266" + }, + "value": "AllowARM" + }, + "access": { + "$id": "4546", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefix": { + "$id": "4547", + "kind": "string", + "type": { + "$ref": "1301" + }, + "value": "*" + }, + "destinationPortRange": { + "$id": "4548", + "kind": "string", + "type": { + "$ref": "1309" + }, + "value": "33500-33699" + }, + "direction": { + "$id": "4549", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "4550", + "kind": "number", + "type": { + "$ref": "1316" + }, + "value": 2002 + }, + "sourceAddressPrefix": { + "$id": "4551", + "kind": "string", + "type": { + "$ref": "1297" + }, + "value": "AzureResourceManager" + }, + "sourcePortRange": { + "$id": "4552", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "*" + }, + "protocol": { + "$id": "4553", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "*" + } + } + } + ] + }, + "provisioningState": { + "$id": "4554", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "publicIPPrefixId": { + "$id": "4555", + "kind": "string", + "type": { + "$ref": "1493" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix" + }, + "publicIPv6PrefixId": { + "$id": "4556", + "kind": "string", + "type": { + "$ref": "1498" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix" + }, + "serviceEndpoints": { + "$id": "4557", + "kind": "array", + "type": { + "$ref": "1472" + }, + "value": [ + { + "$id": "4558", + "kind": "model", + "type": { + "$ref": "1473" + }, + "value": { + "$id": "4559", + "locations": { + "$id": "4560", + "kind": "array", + "type": { + "$ref": "1479" + }, + "value": [ + { + "$id": "4561", + "kind": "string", + "type": { + "$ref": "1480" + }, + "value": "eastus2" + }, + { + "$id": "4562", + "kind": "string", + "type": { + "$ref": "1480" + }, + "value": "usnorth" + } + ] + }, + "service": { + "$id": "4563", + "kind": "string", + "type": { + "$ref": "1475" + }, + "value": "Microsoft.Storage" + } + } + } + ] + }, + "upgradeDescription": { + "$id": "4564", + "kind": "model", + "type": { + "$ref": "1508" + }, + "value": { + "$id": "4565", + "deltaHealthPolicy": { + "$id": "4566", + "kind": "model", + "type": { + "$ref": "1526" + }, + "value": { + "$id": "4567", + "maxPercentDeltaUnhealthyApplications": { + "$id": "4568", + "kind": "number", + "type": { + "$ref": "1536" + }, + "value": 40 + }, + "maxPercentDeltaUnhealthyNodes": { + "$id": "4569", + "kind": "number", + "type": { + "$ref": "1528" + }, + "value": 20 + }, + "maxPercentUpgradeDomainDeltaUnhealthyNodes": { + "$id": "4570", + "kind": "number", + "type": { + "$ref": "1532" + }, + "value": 40 + } + } + }, + "forceRestart": { + "$id": "4571", + "kind": "boolean", + "type": { + "$ref": "1510" + }, + "value": false + }, + "healthPolicy": { + "$id": "4572", + "kind": "model", + "type": { + "$ref": "1514" + }, + "value": { + "$id": "4573", + "maxPercentUnhealthyApplications": { + "$id": "4574", + "kind": "number", + "type": { + "$ref": "1520" + }, + "value": 30 + }, + "maxPercentUnhealthyNodes": { + "$id": "4575", + "kind": "number", + "type": { + "$ref": "1516" + }, + "value": 10 + } + } + }, + "monitoringPolicy": { + "$id": "4576", + "kind": "model", + "type": { + "$ref": "1542" + }, + "value": { + "$id": "4577", + "healthCheckRetryTimeout": { + "$id": "4578", + "kind": "string", + "type": { + "$ref": "1552" + }, + "value": "00:55:00" + }, + "healthCheckStableDuration": { + "$id": "4579", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "00:45:00" + }, + "healthCheckWaitDuration": { + "$id": "4580", + "kind": "string", + "type": { + "$ref": "1544" + }, + "value": "00:05:00" + }, + "upgradeDomainTimeout": { + "$id": "4581", + "kind": "string", + "type": { + "$ref": "1560" + }, + "value": "03:00:00" + }, + "upgradeTimeout": { + "$id": "4582", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "12:00:00" + } + } + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "4583", + "kind": "string", + "type": { + "$ref": "1566" + }, + "value": "49710.06:28:16" + } + } + }, + "useCustomVnet": { + "$id": "4584", + "kind": "boolean", + "type": { + "$ref": "1489" + }, + "value": true + }, + "zonalResiliency": { + "$id": "4585", + "kind": "boolean", + "type": { + "$ref": "1406" + }, + "value": true + }, + "zonalUpdateMode": { + "$id": "4586", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Fast" + } + } + }, + "sku": { + "$id": "4587", + "kind": "model", + "type": { + "$ref": "1597" + }, + "value": { + "$id": "4588", + "name": { + "$id": "4589", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Basic" + } + } + }, + "tags": { + "$id": "4590", + "kind": "dict", + "type": { + "$ref": "1174" + }, + "value": { + "$id": "4591" + } + } + } + } + }, + { + "$id": "4592", + "response": { + "$ref": "4426" + }, + "statusCode": 202, + "bodyValue": { + "$id": "4593", + "kind": "model", + "type": { + "$ref": "1171" + }, + "value": { + "$id": "4594", + "name": { + "$id": "4595", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "mycluster" + }, + "type": { + "$id": "4596", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "4597", + "kind": "string", + "type": { + "$ref": "1593" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "4598", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "4599", + "kind": "string", + "type": { + "$ref": "1180" + }, + "value": "eastus" + }, + "properties": { + "$id": "4600", + "kind": "model", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "4601", + "addonFeatures": { + "$id": "4602", + "kind": "array", + "type": { + "$ref": "1398" + }, + "value": [ + { + "$id": "4603", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "DnsService" + }, + { + "$id": "4604", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "BackupRestoreService" + }, + { + "$id": "4605", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "ResourceMonitorService" + } + ] + }, + "adminUserName": { + "$id": "4606", + "kind": "string", + "type": { + "$ref": "1220" + }, + "value": "vmadmin" + }, + "allocatedOutboundPorts": { + "$id": "4607", + "kind": "number", + "type": { + "$ref": "1583" + }, + "value": 0 + }, + "allowRdpAccess": { + "$id": "4608", + "kind": "boolean", + "type": { + "$ref": "1259" + }, + "value": true + }, + "applicationTypeVersionsCleanupPolicy": { + "$id": "4609", + "kind": "model", + "type": { + "$ref": "1410" + }, + "value": { + "$id": "4610", + "maxUnusedVersionsToKeep": { + "$id": "4611", + "kind": "number", + "type": { + "$ref": "1412" + }, + "value": 3 + } + } + }, + "autoGeneratedDomainNameLabelScope": { + "$id": "4612", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SubscriptionReuse" + }, + "auxiliarySubnets": { + "$id": "4613", + "kind": "array", + "type": { + "$ref": "1448" + }, + "value": [ + { + "$id": "4614", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "4615", + "name": { + "$id": "4616", + "kind": "string", + "type": { + "$ref": "1451" + }, + "value": "testSubnet1" + }, + "enableIpv6": { + "$id": "4617", + "kind": "boolean", + "type": { + "$ref": "1455" + }, + "value": true + }, + "networkSecurityGroupId": { + "$id": "4618", + "kind": "string", + "type": { + "$ref": "1465" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1" + }, + "privateEndpointNetworkPolicies": { + "$id": "4619", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "enabled" + }, + "privateLinkServiceNetworkPolicies": { + "$id": "4620", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "enabled" + } + } + } + ] + }, + "clientConnectionPort": { + "$id": "4621", + "kind": "number", + "type": { + "$ref": "1212" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "4622", + "kind": "array", + "type": { + "$ref": "1207" + }, + "value": [ + { + "$id": "4623", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "4624", + "kind": "string", + "type": { + "$ref": "1388" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "4625", + "kind": "string", + "type": { + "$ref": "1199" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "4626", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeMode": { + "$id": "4627", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Manual" + }, + "ddosProtectionPlanId": { + "$id": "4628", + "kind": "string", + "type": { + "$ref": "1503" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan" + }, + "dnsName": { + "$id": "4629", + "kind": "string", + "type": { + "$ref": "1186" + }, + "value": "mycluster" + }, + "enableAutoOSUpgrade": { + "$id": "4630", + "kind": "boolean", + "type": { + "$ref": "1402" + }, + "value": true + }, + "enableHttpGatewayExclusiveAuthMode": { + "$id": "4631", + "kind": "boolean", + "type": { + "$ref": "1576" + }, + "value": true + }, + "enableIpv6": { + "$id": "4632", + "kind": "boolean", + "type": { + "$ref": "1418" + }, + "value": true + }, + "enableServicePublicIP": { + "$id": "4633", + "kind": "boolean", + "type": { + "$ref": "1444" + }, + "value": true + }, + "fabricSettings": { + "$id": "4634", + "kind": "array", + "type": { + "$ref": "1363" + }, + "value": [ + { + "$id": "4635", + "kind": "model", + "type": { + "$ref": "1364" + }, + "value": { + "$id": "4636", + "name": { + "$id": "4637", + "kind": "string", + "type": { + "$ref": "1366" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "4638", + "kind": "array", + "type": { + "$ref": "1370" + }, + "value": [ + { + "$id": "4639", + "kind": "model", + "type": { + "$ref": "1371" + }, + "value": { + "$id": "4640", + "name": { + "$id": "4641", + "kind": "string", + "type": { + "$ref": "1373" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "4642", + "kind": "string", + "type": { + "$ref": "1377" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "4643", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "mycluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "4644", + "kind": "number", + "type": { + "$ref": "1216" + }, + "value": 19080 + }, + "httpGatewayTokenAuthConnectionPort": { + "$id": "4645", + "kind": "number", + "type": { + "$ref": "1572" + }, + "value": 19081 + }, + "ipTags": { + "$id": "4646", + "kind": "array", + "type": { + "$ref": "1426" + }, + "value": [ + { + "$id": "4647", + "kind": "model", + "type": { + "$ref": "1427" + }, + "value": { + "$id": "4648", + "ipTagType": { + "$id": "4649", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "FirstPartyUsage" + }, + "tag": { + "$id": "4650", + "kind": "string", + "type": { + "$ref": "1433" + }, + "value": "SQL" + } + } + } + ] + }, + "loadBalancingRules": { + "$id": "4651", + "kind": "array", + "type": { + "$ref": "1228" + }, + "value": [ + { + "$id": "4652", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4653", + "backendPort": { + "$id": "4654", + "kind": "number", + "type": { + "$ref": "1235" + }, + "value": 80 + }, + "frontendPort": { + "$id": "4655", + "kind": "number", + "type": { + "$ref": "1231" + }, + "value": 80 + }, + "probePort": { + "$id": "4656", + "kind": "number", + "type": { + "$ref": "1242" + }, + "value": 80 + }, + "probeProtocol": { + "$id": "4657", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4658", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4659", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4660", + "backendPort": { + "$id": "4661", + "kind": "number", + "type": { + "$ref": "1235" + }, + "value": 443 + }, + "frontendPort": { + "$id": "4662", + "kind": "number", + "type": { + "$ref": "1231" + }, + "value": 443 + }, + "probePort": { + "$id": "4663", + "kind": "number", + "type": { + "$ref": "1242" + }, + "value": 443 + }, + "probeProtocol": { + "$id": "4664", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4665", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4666", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4667", + "backendPort": { + "$id": "4668", + "kind": "number", + "type": { + "$ref": "1235" + }, + "value": 10000 + }, + "frontendPort": { + "$id": "4669", + "kind": "number", + "type": { + "$ref": "1231" + }, + "value": 10000 + }, + "loadDistribution": { + "$id": "4670", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "Default" + }, + "probePort": { + "$id": "4671", + "kind": "number", + "type": { + "$ref": "1242" + }, + "value": 10000 + }, + "probeProtocol": { + "$id": "4672", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "tcp" + }, + "protocol": { + "$id": "4673", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "tcp" + } + } + } + ] + }, + "networkSecurityRules": { + "$id": "4674", + "kind": "array", + "type": { + "$ref": "1263" + }, + "value": [ + { + "$id": "4675", + "kind": "model", + "type": { + "$ref": "1264" + }, + "value": { + "$id": "4676", + "name": { + "$id": "4677", + "kind": "string", + "type": { + "$ref": "1266" + }, + "value": "TestName" + }, + "description": { + "$id": "4678", + "kind": "string", + "type": { + "$ref": "1270" + }, + "value": "Test description" + }, + "access": { + "$id": "4679", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefixes": { + "$id": "4680", + "kind": "array", + "type": { + "$ref": "1282" + }, + "value": [ + { + "$id": "4681", + "kind": "string", + "type": { + "$ref": "1283" + }, + "value": "*" + } + ] + }, + "destinationPortRanges": { + "$id": "4682", + "kind": "array", + "type": { + "$ref": "1292" + }, + "value": [ + { + "$id": "4683", + "kind": "string", + "type": { + "$ref": "1293" + }, + "value": "*" + } + ] + }, + "direction": { + "$id": "4684", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "4685", + "kind": "number", + "type": { + "$ref": "1316" + }, + "value": 1010 + }, + "sourceAddressPrefixes": { + "$id": "4686", + "kind": "array", + "type": { + "$ref": "1277" + }, + "value": [ + { + "$id": "4687", + "kind": "string", + "type": { + "$ref": "1278" + }, + "value": "*" + } + ] + }, + "sourcePortRanges": { + "$id": "4688", + "kind": "array", + "type": { + "$ref": "1287" + }, + "value": [ + { + "$id": "4689", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "*" + } + ] + }, + "protocol": { + "$id": "4690", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "tcp" + } + } + }, + { + "$id": "4691", + "kind": "model", + "type": { + "$ref": "1264" + }, + "value": { + "$id": "4692", + "name": { + "$id": "4693", + "kind": "string", + "type": { + "$ref": "1266" + }, + "value": "AllowARM" + }, + "access": { + "$id": "4694", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefix": { + "$id": "4695", + "kind": "string", + "type": { + "$ref": "1301" + }, + "value": "*" + }, + "destinationPortRange": { + "$id": "4696", + "kind": "string", + "type": { + "$ref": "1309" + }, + "value": "33500-33699" + }, + "direction": { + "$id": "4697", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "4698", + "kind": "number", + "type": { + "$ref": "1316" + }, + "value": 2002 + }, + "sourceAddressPrefix": { + "$id": "4699", + "kind": "string", + "type": { + "$ref": "1297" + }, + "value": "AzureResourceManager" + }, + "sourcePortRange": { + "$id": "4700", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "*" + }, + "protocol": { + "$id": "4701", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "*" + } + } + } + ] + }, + "provisioningState": { + "$id": "4702", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "publicIPPrefixId": { + "$id": "4703", + "kind": "string", + "type": { + "$ref": "1493" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix" + }, + "publicIPv6PrefixId": { + "$id": "4704", + "kind": "string", + "type": { + "$ref": "1498" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix" + }, + "serviceEndpoints": { + "$id": "4705", + "kind": "array", + "type": { + "$ref": "1472" + }, + "value": [ + { + "$id": "4706", + "kind": "model", + "type": { + "$ref": "1473" + }, + "value": { + "$id": "4707", + "locations": { + "$id": "4708", + "kind": "array", + "type": { + "$ref": "1479" + }, + "value": [ + { + "$id": "4709", + "kind": "string", + "type": { + "$ref": "1480" + }, + "value": "eastus2" + }, + { + "$id": "4710", + "kind": "string", + "type": { + "$ref": "1480" + }, + "value": "usnorth" + } + ] + }, + "service": { + "$id": "4711", + "kind": "string", + "type": { + "$ref": "1475" + }, + "value": "Microsoft.Storage" + } + } + } + ] + }, + "upgradeDescription": { + "$id": "4712", + "kind": "model", + "type": { + "$ref": "1508" + }, + "value": { + "$id": "4713", + "deltaHealthPolicy": { + "$id": "4714", + "kind": "model", + "type": { + "$ref": "1526" + }, + "value": { + "$id": "4715", + "maxPercentDeltaUnhealthyApplications": { + "$id": "4716", + "kind": "number", + "type": { + "$ref": "1536" + }, + "value": 40 + }, + "maxPercentDeltaUnhealthyNodes": { + "$id": "4717", + "kind": "number", + "type": { + "$ref": "1528" + }, + "value": 20 + }, + "maxPercentUpgradeDomainDeltaUnhealthyNodes": { + "$id": "4718", + "kind": "number", + "type": { + "$ref": "1532" + }, + "value": 40 + } + } + }, + "forceRestart": { + "$id": "4719", + "kind": "boolean", + "type": { + "$ref": "1510" + }, + "value": false + }, + "healthPolicy": { + "$id": "4720", + "kind": "model", + "type": { + "$ref": "1514" + }, + "value": { + "$id": "4721", + "maxPercentUnhealthyApplications": { + "$id": "4722", + "kind": "number", + "type": { + "$ref": "1520" + }, + "value": 30 + }, + "maxPercentUnhealthyNodes": { + "$id": "4723", + "kind": "number", + "type": { + "$ref": "1516" + }, + "value": 10 + } + } + }, + "monitoringPolicy": { + "$id": "4724", + "kind": "model", + "type": { + "$ref": "1542" + }, + "value": { + "$id": "4725", + "healthCheckRetryTimeout": { + "$id": "4726", + "kind": "string", + "type": { + "$ref": "1552" + }, + "value": "00:55:00" + }, + "healthCheckStableDuration": { + "$id": "4727", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "00:45:00" + }, + "healthCheckWaitDuration": { + "$id": "4728", + "kind": "string", + "type": { + "$ref": "1544" + }, + "value": "00:05:00" + }, + "upgradeDomainTimeout": { + "$id": "4729", + "kind": "string", + "type": { + "$ref": "1560" + }, + "value": "03:00:00" + }, + "upgradeTimeout": { + "$id": "4730", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "12:00:00" + } + } + } + } + }, + "useCustomVnet": { + "$id": "4731", + "kind": "boolean", + "type": { + "$ref": "1489" + }, + "value": true + }, + "zonalResiliency": { + "$id": "4732", + "kind": "boolean", + "type": { + "$ref": "1406" + }, + "value": true + }, + "zonalUpdateMode": { + "$id": "4733", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Fast" + } + } + }, + "sku": { + "$id": "4734", + "kind": "model", + "type": { + "$ref": "1597" + }, + "value": { + "$id": "4735", + "name": { + "$id": "4736", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Basic" + } + } + }, + "tags": { + "$id": "4737", + "kind": "dict", + "type": { + "$ref": "1174" + }, + "value": { + "$id": "4738" + } + } + } + } + } + ] + }, + { + "$id": "4739", + "kind": "http", + "name": "Put a cluster with minimum parameters", + "description": "Put a cluster with minimum parameters", + "filePath": "2025-03-01-preview/ManagedClusterPutOperation_example_min.json", + "parameters": [ + { + "$id": "4740", + "parameter": { + "$ref": "4408" + }, + "value": { + "$id": "4741", + "kind": "string", + "type": { + "$ref": "4409" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4742", + "parameter": { + "$ref": "4416" + }, + "value": { + "$id": "4743", + "kind": "string", + "type": { + "$ref": "4417" + }, + "value": "myCluster" + } + }, + { + "$id": "4744", + "parameter": { + "$ref": "4414" + }, + "value": { + "$id": "4745", + "kind": "string", + "type": { + "$ref": "4415" + }, + "value": "resRg" + } + }, + { + "$id": "4746", + "parameter": { + "$ref": "4412" + }, + "value": { + "$id": "4747", + "kind": "string", + "type": { + "$ref": "4413" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4748", + "response": { + "$ref": "4425" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4749", + "kind": "model", + "type": { + "$ref": "1171" + }, + "value": { + "$id": "4750", + "name": { + "$id": "4751", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "4752", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "4753", + "kind": "string", + "type": { + "$ref": "1593" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "4754", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "4755", + "kind": "string", + "type": { + "$ref": "1180" + }, + "value": "eastus" + }, + "properties": { + "$id": "4756", + "kind": "model", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "4757", + "adminUserName": { + "$id": "4758", + "kind": "string", + "type": { + "$ref": "1220" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "4759", + "kind": "number", + "type": { + "$ref": "1212" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "4760", + "kind": "array", + "type": { + "$ref": "1207" + }, + "value": [ + { + "$id": "4761", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterId": { + "$id": "4762", + "kind": "string", + "type": { + "$ref": "1199" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "4763", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "4764", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave1" + }, + "clusterUpgradeMode": { + "$id": "4765", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "4766", + "kind": "string", + "type": { + "$ref": "1186" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "4767", + "kind": "array", + "type": { + "$ref": "1363" + }, + "value": [ + { + "$id": "4768", + "kind": "model", + "type": { + "$ref": "1364" + }, + "value": { + "$id": "4769", + "name": { + "$id": "4770", + "kind": "string", + "type": { + "$ref": "1366" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "4771", + "kind": "array", + "type": { + "$ref": "1370" + }, + "value": [ + { + "$id": "4772", + "kind": "model", + "type": { + "$ref": "1371" + }, + "value": { + "$id": "4773", + "name": { + "$id": "4774", + "kind": "string", + "type": { + "$ref": "1373" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "4775", + "kind": "string", + "type": { + "$ref": "1377" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "4776", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "4777", + "kind": "number", + "type": { + "$ref": "1216" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "4778", + "kind": "array", + "type": { + "$ref": "1228" + }, + "value": [] + }, + "provisioningState": { + "$id": "4779", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + } + } + }, + "sku": { + "$id": "4780", + "kind": "model", + "type": { + "$ref": "1597" + }, + "value": { + "$id": "4781", + "name": { + "$id": "4782", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Basic" + } + } + }, + "tags": { + "$id": "4783", + "kind": "dict", + "type": { + "$ref": "1174" + }, + "value": { + "$id": "4784" + } + } + } + } + }, + { + "$id": "4785", + "response": { + "$ref": "4426" + }, + "statusCode": 202, + "bodyValue": { + "$id": "4786", + "kind": "model", + "type": { + "$ref": "1171" + }, + "value": { + "$id": "4787", + "name": { + "$id": "4788", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "4789", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "4790", + "kind": "string", + "type": { + "$ref": "1593" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "4791", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "4792", + "kind": "string", + "type": { + "$ref": "1180" + }, + "value": "eastus" + }, + "properties": { + "$id": "4793", + "kind": "model", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "4794", + "adminUserName": { + "$id": "4795", + "kind": "string", + "type": { + "$ref": "1220" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "4796", + "kind": "number", + "type": { + "$ref": "1212" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "4797", + "kind": "array", + "type": { + "$ref": "1207" + }, + "value": [ + { + "$id": "4798", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterId": { + "$id": "4799", + "kind": "string", + "type": { + "$ref": "1199" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "4800", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "4801", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave1" + }, + "clusterUpgradeMode": { + "$id": "4802", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "4803", + "kind": "string", + "type": { + "$ref": "1186" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "4804", + "kind": "array", + "type": { + "$ref": "1363" + }, + "value": [ + { + "$id": "4805", + "kind": "model", + "type": { + "$ref": "1364" + }, + "value": { + "$id": "4806", + "name": { + "$id": "4807", + "kind": "string", + "type": { + "$ref": "1366" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "4808", + "kind": "array", + "type": { + "$ref": "1370" + }, + "value": [ + { + "$id": "4809", + "kind": "model", + "type": { + "$ref": "1371" + }, + "value": { + "$id": "4810", + "name": { + "$id": "4811", + "kind": "string", + "type": { + "$ref": "1373" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "4812", + "kind": "string", + "type": { + "$ref": "1377" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "4813", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "4814", + "kind": "number", + "type": { + "$ref": "1216" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "4815", + "kind": "array", + "type": { + "$ref": "1228" + }, + "value": [] + }, + "provisioningState": { + "$id": "4816", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + } + } + }, + "sku": { + "$id": "4817", + "kind": "model", + "type": { + "$ref": "1597" + }, + "value": { + "$id": "4818", + "name": { + "$id": "4819", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Basic" + } + } + }, + "tags": { + "$id": "4820", + "kind": "dict", + "type": { + "$ref": "1174" + }, + "value": { + "$id": "4821" + } + } + } + } + } + ] + } + ] + }, + { + "$id": "4822", + "name": "update", + "resourceName": "ManagedCluster", + "doc": "Update the tags of of a Service Fabric managed cluster resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "4823", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4825", + "type": { + "$id": "4826", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4827", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4828", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4829", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4830", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4831", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4832", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4833", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "4834", + "kind": "constant", + "valueType": { + "$id": "4835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4836", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4837", + "kind": "constant", + "valueType": { + "$id": "4838", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4839", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The managed cluster resource updated tags.", + "type": { + "$ref": "1603" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4840", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1171" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.update", + "decorators": [], + "examples": [ + { + "$id": "4841", + "kind": "http", + "name": "Patch a managed cluster", + "description": "Patch a managed cluster", + "filePath": "2025-03-01-preview/ManagedClusterPatchOperation_example.json", + "parameters": [ + { + "$id": "4842", + "parameter": { + "$ref": "4823" + }, + "value": { + "$id": "4843", + "kind": "string", + "type": { + "$ref": "4824" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4844", + "parameter": { + "$ref": "4831" + }, + "value": { + "$id": "4845", + "kind": "string", + "type": { + "$ref": "4832" + }, + "value": "myCluster" + } + }, + { + "$id": "4846", + "parameter": { + "$ref": "4829" + }, + "value": { + "$id": "4847", + "kind": "string", + "type": { + "$ref": "4830" + }, + "value": "resRg" + } + }, + { + "$id": "4848", + "parameter": { + "$ref": "4827" + }, + "value": { + "$id": "4849", + "kind": "string", + "type": { + "$ref": "4828" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4850", + "response": { + "$ref": "4840" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4851", + "kind": "model", + "type": { + "$ref": "1171" + }, + "value": { + "$id": "4852", + "name": { + "$id": "4853", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "4854", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "4855", + "kind": "string", + "type": { + "$ref": "1593" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "4856", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "4857", + "kind": "string", + "type": { + "$ref": "1180" + }, + "value": "eastus" + }, + "properties": { + "$id": "4858", + "kind": "model", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "4859", + "addonFeatures": { + "$id": "4860", + "kind": "array", + "type": { + "$ref": "1398" + }, + "value": [ + { + "$id": "4861", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "DnsService" + }, + { + "$id": "4862", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "BackupRestoreService" + }, + { + "$id": "4863", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "ResourceMonitorService" + } + ] + }, + "adminUserName": { + "$id": "4864", + "kind": "string", + "type": { + "$ref": "1220" + }, + "value": "vmadmin" + }, + "allowRdpAccess": { + "$id": "4865", + "kind": "boolean", + "type": { + "$ref": "1259" + }, + "value": true + }, + "clientConnectionPort": { + "$id": "4866", + "kind": "number", + "type": { + "$ref": "1212" + }, + "value": 19001 + }, + "clusterCertificateThumbprints": { + "$id": "4867", + "kind": "array", + "type": { + "$ref": "1207" + }, + "value": [ + { + "$id": "4868", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "4869", + "kind": "string", + "type": { + "$ref": "1388" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "4870", + "kind": "string", + "type": { + "$ref": "1199" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "4871", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "4872", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "4873", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "4874", + "kind": "string", + "type": { + "$ref": "1186" + }, + "value": "myCluster" + }, + "enableAutoOSUpgrade": { + "$id": "4875", + "kind": "boolean", + "type": { + "$ref": "1402" + }, + "value": true + }, + "fabricSettings": { + "$id": "4876", + "kind": "array", + "type": { + "$ref": "1363" + }, + "value": [ + { + "$id": "4877", + "kind": "model", + "type": { + "$ref": "1364" + }, + "value": { + "$id": "4878", + "name": { + "$id": "4879", + "kind": "string", + "type": { + "$ref": "1366" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "4880", + "kind": "array", + "type": { + "$ref": "1370" + }, + "value": [ + { + "$id": "4881", + "kind": "model", + "type": { + "$ref": "1371" + }, + "value": { + "$id": "4882", + "name": { + "$id": "4883", + "kind": "string", + "type": { + "$ref": "1373" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "4884", + "kind": "string", + "type": { + "$ref": "1377" + }, + "value": "false" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "4885", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "4886", + "kind": "number", + "type": { + "$ref": "1216" + }, + "value": 19081 + }, + "loadBalancingRules": { + "$id": "4887", + "kind": "array", + "type": { + "$ref": "1228" + }, + "value": [ + { + "$id": "4888", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4889", + "backendPort": { + "$id": "4890", + "kind": "number", + "type": { + "$ref": "1235" + }, + "value": 80 + }, + "frontendPort": { + "$id": "4891", + "kind": "number", + "type": { + "$ref": "1231" + }, + "value": 80 + }, + "probePort": { + "$id": "4892", + "kind": "number", + "type": { + "$ref": "1242" + }, + "value": 80 + }, + "probeProtocol": { + "$id": "4893", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4894", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4895", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4896", + "backendPort": { + "$id": "4897", + "kind": "number", + "type": { + "$ref": "1235" + }, + "value": 443 + }, + "frontendPort": { + "$id": "4898", + "kind": "number", + "type": { + "$ref": "1231" + }, + "value": 443 + }, + "probePort": { + "$id": "4899", + "kind": "number", + "type": { + "$ref": "1242" + }, + "value": 443 + }, + "probeProtocol": { + "$id": "4900", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4901", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4902", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4903", + "backendPort": { + "$id": "4904", + "kind": "number", + "type": { + "$ref": "1235" + }, + "value": 10000 + }, + "frontendPort": { + "$id": "4905", + "kind": "number", + "type": { + "$ref": "1231" + }, + "value": 10000 + }, + "probePort": { + "$id": "4906", + "kind": "number", + "type": { + "$ref": "1242" + }, + "value": 10000 + }, + "probeProtocol": { + "$id": "4907", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4908", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "tcp" + } + } + } + ] + }, + "networkSecurityRules": { + "$id": "4909", + "kind": "array", + "type": { + "$ref": "1263" + }, + "value": [ + { + "$id": "4910", + "kind": "model", + "type": { + "$ref": "1264" + }, + "value": { + "$id": "4911", + "name": { + "$id": "4912", + "kind": "string", + "type": { + "$ref": "1266" + }, + "value": "TestName" + }, + "description": { + "$id": "4913", + "kind": "string", + "type": { + "$ref": "1270" + }, + "value": "Test description" + }, + "access": { + "$id": "4914", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefixes": { + "$id": "4915", + "kind": "array", + "type": { + "$ref": "1282" + }, + "value": [ + { + "$id": "4916", + "kind": "string", + "type": { + "$ref": "1283" + }, + "value": "*" + } + ] + }, + "destinationPortRanges": { + "$id": "4917", + "kind": "array", + "type": { + "$ref": "1292" + }, + "value": [ + { + "$id": "4918", + "kind": "string", + "type": { + "$ref": "1293" + }, + "value": "*" + } + ] + }, + "direction": { + "$id": "4919", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "4920", + "kind": "number", + "type": { + "$ref": "1316" + }, + "value": 1010 + }, + "sourceAddressPrefixes": { + "$id": "4921", + "kind": "array", + "type": { + "$ref": "1277" + }, + "value": [ + { + "$id": "4922", + "kind": "string", + "type": { + "$ref": "1278" + }, + "value": "*" + } + ] + }, + "sourcePortRanges": { + "$id": "4923", + "kind": "array", + "type": { + "$ref": "1287" + }, + "value": [ + { + "$id": "4924", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "*" + } + ] + }, + "protocol": { + "$id": "4925", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "tcp" + } + } + } + ] + }, + "provisioningState": { + "$id": "4926", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "4927", + "kind": "model", + "type": { + "$ref": "1597" + }, + "value": { + "$id": "4928", + "name": { + "$id": "4929", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "4930", + "kind": "dict", + "type": { + "$ref": "1174" + }, + "value": { + "$id": "4931", + "a": { + "$id": "4932", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "4933", + "name": "delete", + "resourceName": "ManagedCluster", + "doc": "Delete a Service Fabric managed cluster resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "4934", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4935", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4936", + "type": { + "$id": "4937", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4938", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4939", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4940", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4941", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4942", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4943", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4944", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4945", + "kind": "constant", + "valueType": { + "$id": "4946", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4947", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "4948", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "4949", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "4950", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "4951", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "4952", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "4953", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + "bufferResponse": true, + "longRunning": { + "$id": "4954", + "finalStateVia": 1, + "finalResponse": { + "$id": "4955", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.delete", + "decorators": [], + "examples": [ + { + "$id": "4956", + "kind": "http", + "name": "Delete a cluster", + "description": "Delete a cluster", + "filePath": "2025-03-01-preview/ManagedClusterDeleteOperation_example.json", + "parameters": [ + { + "$id": "4957", + "parameter": { + "$ref": "4934" + }, + "value": { + "$id": "4958", + "kind": "string", + "type": { + "$ref": "4935" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4959", + "parameter": { + "$ref": "4942" + }, + "value": { + "$id": "4960", + "kind": "string", + "type": { + "$ref": "4943" + }, + "value": "myCluster" + } + }, + { + "$id": "4961", + "parameter": { + "$ref": "4940" + }, + "value": { + "$id": "4962", + "kind": "string", + "type": { + "$ref": "4941" + }, + "value": "resRg" + } + }, + { + "$id": "4963", + "parameter": { + "$ref": "4938" + }, + "value": { + "$id": "4964", + "kind": "string", + "type": { + "$ref": "4939" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4965", + "response": { + "$ref": "4947" + }, + "statusCode": 202 + }, + { + "$id": "4966", + "response": { + "$ref": "4953" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "4967", + "name": "listByResourceGroup", + "resourceName": "ManagedCluster", + "doc": "Gets all Service Fabric cluster resources created or in the process of being created in the resource group.", + "accessibility": "public", + "parameters": [ + { + "$id": "4968", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4969", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4970", + "type": { + "$id": "4971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4972", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4973", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4974", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4975", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4976", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4977", + "kind": "constant", + "valueType": { + "$id": "4978", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4979", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1610" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters", + "bufferResponse": true, + "paging": { + "$id": "4980", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "4981", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "4982", + "kind": "http", + "name": "List cluster by resource group", + "description": "List cluster by resource group", + "filePath": "2025-03-01-preview/ManagedClusterListByResourceGroupOperation_example.json", + "parameters": [ + { + "$id": "4983", + "parameter": { + "$ref": "4968" + }, + "value": { + "$id": "4984", + "kind": "string", + "type": { + "$ref": "4969" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4985", + "parameter": { + "$ref": "4974" + }, + "value": { + "$id": "4986", + "kind": "string", + "type": { + "$ref": "4975" + }, + "value": "resRg" + } + }, + { + "$id": "4987", + "parameter": { + "$ref": "4972" + }, + "value": { + "$id": "4988", + "kind": "string", + "type": { + "$ref": "4973" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4989", + "response": { + "$ref": "4979" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4990", + "kind": "model", + "type": { + "$ref": "1610" + }, + "value": { + "$id": "4991", + "nextLink": { + "$id": "4992", + "kind": "string", + "type": { + "$ref": "1616" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "4993", + "kind": "array", + "type": { + "$ref": "1612" + }, + "value": [ + { + "$id": "4994", + "kind": "model", + "type": { + "$ref": "1171" + }, + "value": { + "$id": "4995", + "name": { + "$id": "4996", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "4997", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "4998", + "kind": "string", + "type": { + "$ref": "1593" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "4999", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "5000", + "kind": "string", + "type": { + "$ref": "1180" + }, + "value": "eastus" + }, + "properties": { + "$id": "5001", + "kind": "model", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "5002", + "adminUserName": { + "$id": "5003", + "kind": "string", + "type": { + "$ref": "1220" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5004", + "kind": "number", + "type": { + "$ref": "1212" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5005", + "kind": "array", + "type": { + "$ref": "1207" + }, + "value": [ + { + "$id": "5006", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5007", + "kind": "string", + "type": { + "$ref": "1388" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5008", + "kind": "string", + "type": { + "$ref": "1199" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "5009", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5010", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5011", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5012", + "kind": "string", + "type": { + "$ref": "1186" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "5013", + "kind": "array", + "type": { + "$ref": "1363" + }, + "value": [ + { + "$id": "5014", + "kind": "model", + "type": { + "$ref": "1364" + }, + "value": { + "$id": "5015", + "name": { + "$id": "5016", + "kind": "string", + "type": { + "$ref": "1366" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5017", + "kind": "array", + "type": { + "$ref": "1370" + }, + "value": [ + { + "$id": "5018", + "kind": "model", + "type": { + "$ref": "1371" + }, + "value": { + "$id": "5019", + "name": { + "$id": "5020", + "kind": "string", + "type": { + "$ref": "1373" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5021", + "kind": "string", + "type": { + "$ref": "1377" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5022", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5023", + "kind": "number", + "type": { + "$ref": "1216" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5024", + "kind": "array", + "type": { + "$ref": "1228" + }, + "value": [] + }, + "provisioningState": { + "$id": "5025", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5026", + "kind": "model", + "type": { + "$ref": "1597" + }, + "value": { + "$id": "5027", + "name": { + "$id": "5028", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5029", + "kind": "dict", + "type": { + "$ref": "1174" + }, + "value": { + "$id": "5030" + } + } + } + }, + { + "$id": "5031", + "kind": "model", + "type": { + "$ref": "1171" + }, + "value": { + "$id": "5032", + "name": { + "$id": "5033", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster2" + }, + "type": { + "$id": "5034", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5035", + "kind": "string", + "type": { + "$ref": "1593" + }, + "value": "W/\"636462502164040075\"" + }, + "id": { + "$id": "5036", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster2" + }, + "location": { + "$id": "5037", + "kind": "string", + "type": { + "$ref": "1180" + }, + "value": "eastus" + }, + "properties": { + "$id": "5038", + "kind": "model", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "5039", + "adminUserName": { + "$id": "5040", + "kind": "string", + "type": { + "$ref": "1220" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5041", + "kind": "number", + "type": { + "$ref": "1212" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5042", + "kind": "array", + "type": { + "$ref": "1207" + }, + "value": [ + { + "$id": "5043", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5044", + "kind": "string", + "type": { + "$ref": "1388" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5045", + "kind": "string", + "type": { + "$ref": "1199" + }, + "value": "2747e469-b24e-4039-8a0a-46151419523f" + }, + "clusterState": { + "$id": "5046", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5047", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5048", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5049", + "kind": "string", + "type": { + "$ref": "1186" + }, + "value": "myCluster2" + }, + "fabricSettings": { + "$id": "5050", + "kind": "array", + "type": { + "$ref": "1363" + }, + "value": [ + { + "$id": "5051", + "kind": "model", + "type": { + "$ref": "1364" + }, + "value": { + "$id": "5052", + "name": { + "$id": "5053", + "kind": "string", + "type": { + "$ref": "1366" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5054", + "kind": "array", + "type": { + "$ref": "1370" + }, + "value": [ + { + "$id": "5055", + "kind": "model", + "type": { + "$ref": "1371" + }, + "value": { + "$id": "5056", + "name": { + "$id": "5057", + "kind": "string", + "type": { + "$ref": "1373" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5058", + "kind": "string", + "type": { + "$ref": "1377" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5059", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5060", + "kind": "number", + "type": { + "$ref": "1216" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5061", + "kind": "array", + "type": { + "$ref": "1228" + }, + "value": [] + }, + "provisioningState": { + "$id": "5062", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5063", + "kind": "model", + "type": { + "$ref": "1597" + }, + "value": { + "$id": "5064", + "name": { + "$id": "5065", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5066", + "kind": "dict", + "type": { + "$ref": "1174" + }, + "value": { + "$id": "5067" + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "5068", + "name": "listBySubscription", + "resourceName": "ManagedCluster", + "doc": "Gets all Service Fabric cluster resources created or in the process of being created in the subscription.", + "accessibility": "public", + "parameters": [ + { + "$id": "5069", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5070", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5071", + "type": { + "$id": "5072", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5073", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5074", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5075", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5076", + "kind": "constant", + "valueType": { + "$id": "5077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5078", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1610" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters", + "bufferResponse": true, + "paging": { + "$id": "5079", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "5080", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "5081", + "kind": "http", + "name": "List managed clusters", + "description": "List managed clusters", + "filePath": "2025-03-01-preview/ManagedClusterListBySubscriptionOperation_example.json", + "parameters": [ + { + "$id": "5082", + "parameter": { + "$ref": "5069" + }, + "value": { + "$id": "5083", + "kind": "string", + "type": { + "$ref": "5070" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5084", + "parameter": { + "$ref": "5073" + }, + "value": { + "$id": "5085", + "kind": "string", + "type": { + "$ref": "5074" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5086", + "response": { + "$ref": "5078" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5087", + "kind": "model", + "type": { + "$ref": "1610" + }, + "value": { + "$id": "5088", + "nextLink": { + "$id": "5089", + "kind": "string", + "type": { + "$ref": "1616" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "5090", + "kind": "array", + "type": { + "$ref": "1612" + }, + "value": [ + { + "$id": "5091", + "kind": "model", + "type": { + "$ref": "1171" + }, + "value": { + "$id": "5092", + "name": { + "$id": "5093", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "5094", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5095", + "kind": "string", + "type": { + "$ref": "1593" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "5096", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "5097", + "kind": "string", + "type": { + "$ref": "1180" + }, + "value": "eastus" + }, + "properties": { + "$id": "5098", + "kind": "model", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "5099", + "adminUserName": { + "$id": "5100", + "kind": "string", + "type": { + "$ref": "1220" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5101", + "kind": "number", + "type": { + "$ref": "1212" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5102", + "kind": "array", + "type": { + "$ref": "1207" + }, + "value": [ + { + "$id": "5103", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5104", + "kind": "string", + "type": { + "$ref": "1388" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5105", + "kind": "string", + "type": { + "$ref": "1199" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "5106", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5107", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5108", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5109", + "kind": "string", + "type": { + "$ref": "1186" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "5110", + "kind": "array", + "type": { + "$ref": "1363" + }, + "value": [ + { + "$id": "5111", + "kind": "model", + "type": { + "$ref": "1364" + }, + "value": { + "$id": "5112", + "name": { + "$id": "5113", + "kind": "string", + "type": { + "$ref": "1366" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5114", + "kind": "array", + "type": { + "$ref": "1370" + }, + "value": [ + { + "$id": "5115", + "kind": "model", + "type": { + "$ref": "1371" + }, + "value": { + "$id": "5116", + "name": { + "$id": "5117", + "kind": "string", + "type": { + "$ref": "1373" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5118", + "kind": "string", + "type": { + "$ref": "1377" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5119", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5120", + "kind": "number", + "type": { + "$ref": "1216" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5121", + "kind": "array", + "type": { + "$ref": "1228" + }, + "value": [] + }, + "provisioningState": { + "$id": "5122", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5123", + "kind": "model", + "type": { + "$ref": "1597" + }, + "value": { + "$id": "5124", + "name": { + "$id": "5125", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5126", + "kind": "dict", + "type": { + "$ref": "1174" + }, + "value": { + "$id": "5127" + } + } + } + }, + { + "$id": "5128", + "kind": "model", + "type": { + "$ref": "1171" + }, + "value": { + "$id": "5129", + "name": { + "$id": "5130", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster2" + }, + "type": { + "$id": "5131", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5132", + "kind": "string", + "type": { + "$ref": "1593" + }, + "value": "W/\"636462502164040075\"" + }, + "id": { + "$id": "5133", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster2" + }, + "location": { + "$id": "5134", + "kind": "string", + "type": { + "$ref": "1180" + }, + "value": "eastus" + }, + "properties": { + "$id": "5135", + "kind": "model", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "5136", + "adminUserName": { + "$id": "5137", + "kind": "string", + "type": { + "$ref": "1220" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5138", + "kind": "number", + "type": { + "$ref": "1212" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5139", + "kind": "array", + "type": { + "$ref": "1207" + }, + "value": [ + { + "$id": "5140", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5141", + "kind": "string", + "type": { + "$ref": "1388" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5142", + "kind": "string", + "type": { + "$ref": "1199" + }, + "value": "2747e469-b24e-4039-8a0a-46151419523f" + }, + "clusterState": { + "$id": "5143", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5144", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5145", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5146", + "kind": "string", + "type": { + "$ref": "1186" + }, + "value": "myCluster2" + }, + "fabricSettings": { + "$id": "5147", + "kind": "array", + "type": { + "$ref": "1363" + }, + "value": [ + { + "$id": "5148", + "kind": "model", + "type": { + "$ref": "1364" + }, + "value": { + "$id": "5149", + "name": { + "$id": "5150", + "kind": "string", + "type": { + "$ref": "1366" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5151", + "kind": "array", + "type": { + "$ref": "1370" + }, + "value": [ + { + "$id": "5152", + "kind": "model", + "type": { + "$ref": "1371" + }, + "value": { + "$id": "5153", + "name": { + "$id": "5154", + "kind": "string", + "type": { + "$ref": "1373" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5155", + "kind": "string", + "type": { + "$ref": "1377" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5156", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5157", + "kind": "number", + "type": { + "$ref": "1216" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5158", + "kind": "array", + "type": { + "$ref": "1228" + }, + "value": [] + }, + "provisioningState": { + "$id": "5159", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5160", + "kind": "model", + "type": { + "$ref": "1597" + }, + "value": { + "$id": "5161", + "name": { + "$id": "5162", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5163", + "kind": "dict", + "type": { + "$ref": "1174" + }, + "value": { + "$id": "5164" + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "5165", + "name": "getFaultSimulation", + "resourceName": "ManagedClusters", + "doc": "Gets a fault simulation by the simulationId.", + "accessibility": "public", + "parameters": [ + { + "$id": "5166", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5168", + "type": { + "$id": "5169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5170", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5172", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5174", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5176", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5177", + "kind": "constant", + "valueType": { + "$id": "5178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5179", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5180", + "kind": "constant", + "valueType": { + "$id": "5181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5182", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1620" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5183", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1625" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation", + "decorators": [] + }, + { + "$id": "5184", + "name": "listFaultSimulation", + "resourceName": "ManagedClusters", + "doc": "Gets the list of recent fault simulations for the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5185", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5187", + "type": { + "$id": "5188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5189", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5191", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5192", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5193", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5194", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5195", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5196", + "kind": "constant", + "valueType": { + "$id": "5197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5198", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1706" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/listFaultSimulation", + "bufferResponse": true, + "paging": { + "$id": "5199", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "5200", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listFaultSimulation", + "decorators": [] + }, + { + "$id": "5201", + "name": "startFaultSimulation", + "resourceName": "ManagedClusters", + "doc": "Starts a fault simulation on the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5202", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5204", + "type": { + "$id": "5205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5206", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5208", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5210", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5212", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5213", + "kind": "constant", + "valueType": { + "$id": "5214", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5215", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5216", + "kind": "constant", + "valueType": { + "$id": "5217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5218", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters describing the fault simulation.", + "type": { + "$ref": "1716" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5219", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "5220", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5222", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "5223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "5224", + "finalStateVia": 1, + "finalResponse": { + "$id": "5225", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1625" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation", + "decorators": [] + }, + { + "$id": "5226", + "name": "stopFaultSimulation", + "resourceName": "ManagedClusters", + "doc": "Stops a fault simulation on the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5227", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5228", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5229", + "type": { + "$id": "5230", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5231", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5232", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5233", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5235", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5237", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5238", + "kind": "constant", + "valueType": { + "$id": "5239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5240", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5241", + "kind": "constant", + "valueType": { + "$id": "5242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5243", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1620" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5244", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "5245", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5247", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "5248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "5249", + "finalStateVia": 1, + "finalResponse": { + "$id": "5250", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1625" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation", + "decorators": [] + } + ], + "parameters": [ + { + "$id": "5251", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5252", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "5253", + "type": { + "$id": "5254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5255", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5256" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "5257", + "kind": "client", + "name": "ManagedAzResiliencyStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "5258", + "name": "GetManagedAzResiliencyStatus", + "resourceName": "ManagedAzResiliencyStatus", + "doc": "Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters.", + "accessibility": "public", + "parameters": [ + { + "$id": "5259", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5261", + "type": { + "$id": "5262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5263", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5264", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5265", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5267", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5268", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5269", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5270", + "kind": "constant", + "valueType": { + "$id": "5271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5272", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1720" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get", + "decorators": [], + "examples": [ + { + "$id": "5273", + "kind": "http", + "name": "Az Resiliency status of Base Resources", + "description": "Az Resiliency status of Base Resources", + "filePath": "2025-03-01-preview/managedAzResiliencyStatusGet_example.json", + "parameters": [ + { + "$id": "5274", + "parameter": { + "$ref": "5259" + }, + "value": { + "$id": "5275", + "kind": "string", + "type": { + "$ref": "5260" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5276", + "parameter": { + "$ref": "5267" + }, + "value": { + "$id": "5277", + "kind": "string", + "type": { + "$ref": "5268" + }, + "value": "mycluster1" + } + }, + { + "$id": "5278", + "parameter": { + "$ref": "5265" + }, + "value": { + "$id": "5279", + "kind": "string", + "type": { + "$ref": "5266" + }, + "value": "resourceGroup1" + } + }, + { + "$id": "5280", + "parameter": { + "$ref": "5263" + }, + "value": { + "$id": "5281", + "kind": "string", + "type": { + "$ref": "5264" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5282", + "response": { + "$ref": "5272" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5283", + "kind": "model", + "type": { + "$ref": "1720" + }, + "value": { + "$id": "5284", + "baseResourceStatus": { + "$id": "5285", + "kind": "array", + "type": { + "$ref": "1722" + }, + "value": [ + { + "$id": "5286", + "kind": "model", + "type": { + "$ref": "1723" + }, + "value": { + "$id": "5287", + "isZoneResilient": { + "$id": "5288", + "kind": "boolean", + "type": { + "$ref": "1734" + }, + "value": false + }, + "resourceName": { + "$id": "5289", + "kind": "string", + "type": { + "$ref": "1725" + }, + "value": "mycluster1storage" + }, + "resourceType": { + "$id": "5290", + "kind": "string", + "type": { + "$ref": "1729" + }, + "value": "Microsoft.Storage/storageaccounts" + } + } + }, + { + "$id": "5291", + "kind": "model", + "type": { + "$ref": "1723" + }, + "value": { + "$id": "5292", + "isZoneResilient": { + "$id": "5293", + "kind": "boolean", + "type": { + "$ref": "1734" + }, + "value": true + }, + "resourceName": { + "$id": "5294", + "kind": "string", + "type": { + "$ref": "1725" + }, + "value": "PublicIP-mycluster1" + }, + "resourceType": { + "$id": "5295", + "kind": "string", + "type": { + "$ref": "1729" + }, + "value": "Microsoft.Network/publicIPAddress" + } + } + }, + { + "$id": "5296", + "kind": "model", + "type": { + "$ref": "1723" + }, + "value": { + "$id": "5297", + "isZoneResilient": { + "$id": "5298", + "kind": "boolean", + "type": { + "$ref": "1734" + }, + "value": false + }, + "resourceName": { + "$id": "5299", + "kind": "string", + "type": { + "$ref": "1725" + }, + "value": "Primary" + }, + "resourceType": { + "$id": "5300", + "kind": "string", + "type": { + "$ref": "1729" + }, + "value": "Microsoft.Compute/virtualmachinescalesets" + }, + "details": { + "$id": "5301", + "kind": "string", + "type": { + "$ref": "1738" + }, + "value": "Status: InProgress, ZonalNodes: 3, RegionalNodes: 3" + } + } + } + ] + }, + "isClusterZoneResilient": { + "$id": "5302", + "kind": "boolean", + "type": { + "$ref": "1744" + }, + "value": false + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "5303", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5304", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "5305", + "type": { + "$id": "5306", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5307", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5308" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatus", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "5309", + "kind": "client", + "name": "ManagedApplyMaintenanceWindow", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "5310", + "name": "post", + "resourceName": "ManagedApplyMaintenanceWindow", + "doc": "Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied.", + "accessibility": "public", + "parameters": [ + { + "$id": "5311", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5312", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5313", + "type": { + "$id": "5314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5315", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5317", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5318", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5319", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5320", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5321", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5322", + "kind": "constant", + "valueType": { + "$id": "5323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5324", + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applyMaintenanceWindow", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post", + "decorators": [], + "examples": [ + { + "$id": "5325", + "kind": "http", + "name": "Apply Maintenance Window Status", + "description": "Apply Maintenance Window Status", + "filePath": "2025-03-01-preview/ManagedApplyMaintenanceWindowPost_example.json", + "parameters": [ + { + "$id": "5326", + "parameter": { + "$ref": "5311" + }, + "value": { + "$id": "5327", + "kind": "string", + "type": { + "$ref": "5312" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5328", + "parameter": { + "$ref": "5319" + }, + "value": { + "$id": "5329", + "kind": "string", + "type": { + "$ref": "5320" + }, + "value": "mycluster1" + } + }, + { + "$id": "5330", + "parameter": { + "$ref": "5317" + }, + "value": { + "$id": "5331", + "kind": "string", + "type": { + "$ref": "5318" + }, + "value": "resourceGroup1" + } + }, + { + "$id": "5332", + "parameter": { + "$ref": "5315" + }, + "value": { + "$id": "5333", + "kind": "string", + "type": { + "$ref": "5316" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5334", + "response": { + "$ref": "5324" + }, + "statusCode": 200 + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "5335", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5336", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "5337", + "type": { + "$id": "5338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5339", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5340" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "5341", + "kind": "client", + "name": "ManagedMaintenanceWindowStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "5342", + "name": "get", + "resourceName": "ManagedMaintenanceWindowStatus", + "doc": "Action to get Maintenance Window Status of the Service Fabric Managed Clusters.", + "accessibility": "public", + "parameters": [ + { + "$id": "5343", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5344", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5345", + "type": { + "$id": "5346", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5347", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5348", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5349", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5351", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5353", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5354", + "kind": "constant", + "valueType": { + "$id": "5355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5356", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1747" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get", + "decorators": [], + "examples": [ + { + "$id": "5357", + "kind": "http", + "name": "Get Maintenance Window Status", + "description": "Get Maintenance Window Status", + "filePath": "2025-03-01-preview/ManagedMaintenanceWindowStatusGet_example.json", + "parameters": [ + { + "$id": "5358", + "parameter": { + "$ref": "5343" + }, + "value": { + "$id": "5359", + "kind": "string", + "type": { + "$ref": "5344" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5360", + "parameter": { + "$ref": "5351" + }, + "value": { + "$id": "5361", + "kind": "string", + "type": { + "$ref": "5352" + }, + "value": "mycluster1" + } + }, + { + "$id": "5362", + "parameter": { + "$ref": "5349" + }, + "value": { + "$id": "5363", + "kind": "string", + "type": { + "$ref": "5350" + }, + "value": "resourceGroup1" + } + }, + { + "$id": "5364", + "parameter": { + "$ref": "5347" + }, + "value": { + "$id": "5365", + "kind": "string", + "type": { + "$ref": "5348" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5366", + "response": { + "$ref": "5356" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5367", + "kind": "model", + "type": { + "$ref": "1747" + }, + "value": { + "$id": "5368", + "canApplyUpdates": { + "$id": "5369", + "kind": "boolean", + "type": { + "$ref": "1761" + }, + "value": true + }, + "isRegionReady": { + "$id": "5370", + "kind": "boolean", + "type": { + "$ref": "1753" + }, + "value": true + }, + "isWindowActive": { + "$id": "5371", + "kind": "boolean", + "type": { + "$ref": "1757" + }, + "value": true + }, + "isWindowEnabled": { + "$id": "5372", + "kind": "boolean", + "type": { + "$ref": "1749" + }, + "value": false + }, + "lastWindowEndTimeUTC": { + "$id": "5373", + "kind": "string", + "type": { + "$ref": "1775" + }, + "value": "2023-04-30T00:00:00" + }, + "lastWindowStartTimeUTC": { + "$id": "5374", + "kind": "string", + "type": { + "$ref": "1770" + }, + "value": "2023-04-30T00:00:00" + }, + "lastWindowStatusUpdateAtUTC": { + "$id": "5375", + "kind": "string", + "type": { + "$ref": "1765" + }, + "value": "2023-04-30T00:00:00" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "5376", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5377", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "5378", + "type": { + "$id": "5379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5380", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5381" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "5382", + "kind": "client", + "name": "NodeTypes", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "5383", + "name": "get", + "resourceName": "NodeType", + "doc": "Get a Service Fabric node type of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5384", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5385", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5386", + "type": { + "$id": "5387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5388", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5389", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5390", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5392", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5394", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "5395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5396", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5397", + "kind": "constant", + "valueType": { + "$id": "5398", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5399", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1779" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.get", + "decorators": [], + "examples": [ + { + "$id": "5400", + "kind": "http", + "name": "Get a node type", + "description": "Get a node type", + "filePath": "2025-03-01-preview/NodeTypeGetOperation_example.json", + "parameters": [ + { + "$id": "5401", + "parameter": { + "$ref": "5384" + }, + "value": { + "$id": "5402", + "kind": "string", + "type": { + "$ref": "5385" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5403", + "parameter": { + "$ref": "5392" + }, + "value": { + "$id": "5404", + "kind": "string", + "type": { + "$ref": "5393" + }, + "value": "myCluster" + } + }, + { + "$id": "5405", + "parameter": { + "$ref": "5394" + }, + "value": { + "$id": "5406", + "kind": "string", + "type": { + "$ref": "5395" + }, + "value": "FE" + } + }, + { + "$id": "5407", + "parameter": { + "$ref": "5390" + }, + "value": { + "$id": "5408", + "kind": "string", + "type": { + "$ref": "5391" + }, + "value": "resRg" + } + }, + { + "$id": "5409", + "parameter": { + "$ref": "5388" + }, + "value": { + "$id": "5410", + "kind": "string", + "type": { + "$ref": "5389" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5411", + "response": { + "$ref": "5399" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5412", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5413", + "name": { + "$id": "5414", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "FE" + }, + "type": { + "$id": "5415", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5416", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/FE" + }, + "properties": { + "$id": "5417", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5418", + "capacities": { + "$id": "5419", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "5420" + } + }, + "dataDiskSizeGB": { + "$id": "5421", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 100 + }, + "dataDiskType": { + "$id": "5422", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "5423", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": true + }, + "isStateless": { + "$id": "5424", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "5425", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "5426" + } + }, + "vmImageOffer": { + "$id": "5427", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "5428", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "5429", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2016-Datacenter" + }, + "vmImageVersion": { + "$id": "5430", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "5431", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 5 + }, + "vmSecrets": { + "$id": "5432", + "kind": "array", + "type": { + "$ref": "1849" + }, + "value": [ + { + "$id": "5433", + "kind": "model", + "type": { + "$ref": "1850" + }, + "value": { + "$id": "5434", + "sourceVault": { + "$id": "5435", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "5436", + "id": { + "$id": "5437", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "5438", + "kind": "array", + "type": { + "$ref": "1860" + }, + "value": [ + { + "$id": "5439", + "kind": "model", + "type": { + "$ref": "1861" + }, + "value": { + "$id": "5440", + "certificateStore": { + "$id": "5441", + "kind": "string", + "type": { + "$ref": "1867" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "5442", + "kind": "string", + "type": { + "$ref": "1863" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "5443", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D2" + } + } + }, + "tags": { + "$id": "5444", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "5445" + } + } + } + } + } + ] + } + ] + }, + { + "$id": "5446", + "name": "createOrUpdate", + "resourceName": "NodeType", + "doc": "Create or update a Service Fabric node type of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5447", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5448", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5449", + "type": { + "$id": "5450", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5451", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5452", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5453", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5454", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5455", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5456", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5457", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "5458", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5459", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5460", + "kind": "constant", + "valueType": { + "$id": "5461", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5462", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5463", + "kind": "constant", + "valueType": { + "$id": "5464", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5465", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The node type resource.", + "type": { + "$ref": "1779" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5466", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1779" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "5467", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "1779" + }, + "headers": [ + { + "$id": "5468", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "5469", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "5470", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "5471", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5472", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "5473", + "finalStateVia": 1, + "finalResponse": { + "$id": "5474", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1779" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "5475", + "kind": "http", + "name": "Put a node type with auto-scale parameters", + "description": "Put a node type with auto-scale parameters", + "filePath": "2025-03-01-preview/NodeTypePutOperationAutoScale_example.json", + "parameters": [ + { + "$id": "5476", + "parameter": { + "$ref": "5447" + }, + "value": { + "$id": "5477", + "kind": "string", + "type": { + "$ref": "5448" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5478", + "parameter": { + "$ref": "5455" + }, + "value": { + "$id": "5479", + "kind": "string", + "type": { + "$ref": "5456" + }, + "value": "myCluster" + } + }, + { + "$id": "5480", + "parameter": { + "$ref": "5457" + }, + "value": { + "$id": "5481", + "kind": "string", + "type": { + "$ref": "5458" + }, + "value": "BE" + } + }, + { + "$id": "5482", + "parameter": { + "$ref": "5453" + }, + "value": { + "$id": "5483", + "kind": "string", + "type": { + "$ref": "5454" + }, + "value": "resRg" + } + }, + { + "$id": "5484", + "parameter": { + "$ref": "5451" + }, + "value": { + "$id": "5485", + "kind": "string", + "type": { + "$ref": "5452" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5486", + "response": { + "$ref": "5466" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5487", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5488", + "name": { + "$id": "5489", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5490", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5491", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5492", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5493", + "capacities": { + "$id": "5494", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "5495", + "ClientConnections": { + "$id": "5496", + "kind": "string", + "type": { + "$ref": "1810" + }, + "value": "65536" + } + } + }, + "dataDiskSizeGB": { + "$id": "5497", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "5498", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "isPrimary": { + "$id": "5499", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "5500", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "5501", + "kind": "boolean", + "type": { + "$ref": "1946" + }, + "value": true + }, + "placementProperties": { + "$id": "5502", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "5503", + "HasSSD": { + "$id": "5504", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "true" + }, + "NodeColor": { + "$id": "5505", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "5506", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "5507", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmExtensions": { + "$id": "5508", + "kind": "array", + "type": { + "$ref": "1875" + }, + "value": [ + { + "$id": "5509", + "kind": "model", + "type": { + "$ref": "1876" + }, + "value": { + "$id": "5510", + "name": { + "$id": "5511", + "kind": "string", + "type": { + "$ref": "1878" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "5512", + "kind": "model", + "type": { + "$ref": "1882" + }, + "value": { + "$id": "5513", + "type": { + "$id": "5514", + "kind": "string", + "type": { + "$ref": "1888" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "5515", + "kind": "boolean", + "type": { + "$ref": "1896" + }, + "value": true + }, + "forceUpdateTag": { + "$id": "5516", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "v.1.0" + }, + "publisher": { + "$id": "5517", + "kind": "string", + "type": { + "$ref": "1884" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "5518", + "kind": "model", + "type": { + "$ref": "1900" + }, + "value": { + "$id": "5519" + } + }, + "typeHandlerVersion": { + "$id": "5520", + "kind": "string", + "type": { + "$ref": "1892" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "5521", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "5522", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "5523", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "5524", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "5525", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "5526", + "kind": "model", + "type": { + "$ref": "1933" + }, + "value": { + "$id": "5527", + "userAssignedIdentities": { + "$id": "5528", + "kind": "array", + "type": { + "$ref": "1935" + }, + "value": [ + { + "$id": "5529", + "kind": "string", + "type": { + "$ref": "1936" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + }, + { + "$id": "5530", + "kind": "string", + "type": { + "$ref": "1936" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2" + } + ] + } + } + }, + "vmSecrets": { + "$id": "5531", + "kind": "array", + "type": { + "$ref": "1849" + }, + "value": [ + { + "$id": "5532", + "kind": "model", + "type": { + "$ref": "1850" + }, + "value": { + "$id": "5533", + "sourceVault": { + "$id": "5534", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "5535", + "id": { + "$id": "5536", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "5537", + "kind": "array", + "type": { + "$ref": "1860" + }, + "value": [ + { + "$id": "5538", + "kind": "model", + "type": { + "$ref": "1861" + }, + "value": { + "$id": "5539", + "certificateStore": { + "$id": "5540", + "kind": "string", + "type": { + "$ref": "1867" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "5541", + "kind": "string", + "type": { + "$ref": "1863" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "5542", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_DS3" + } + } + }, + "sku": { + "$id": "5543", + "kind": "model", + "type": { + "$ref": "2234" + }, + "value": { + "$id": "5544", + "name": { + "$id": "5545", + "kind": "string", + "type": { + "$ref": "2236" + }, + "value": "Standard_S2" + }, + "capacity": { + "$id": "5546", + "kind": "number", + "type": { + "$ref": "2244" + }, + "value": 10 + }, + "tier": { + "$id": "5547", + "kind": "string", + "type": { + "$ref": "2240" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5548", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "5549" + } + } + } + } + }, + { + "$id": "5550", + "response": { + "$ref": "5467" + }, + "statusCode": 202, + "bodyValue": { + "$id": "5551", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5552", + "name": { + "$id": "5553", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5554", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5555", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5556", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5557", + "capacities": { + "$id": "5558", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "5559", + "ClientConnections": { + "$id": "5560", + "kind": "string", + "type": { + "$ref": "1810" + }, + "value": "65536" + } + } + }, + "dataDiskSizeGB": { + "$id": "5561", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "5562", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "isPrimary": { + "$id": "5563", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "5564", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "5565", + "kind": "boolean", + "type": { + "$ref": "1946" + }, + "value": true + }, + "placementProperties": { + "$id": "5566", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "5567", + "HasSSD": { + "$id": "5568", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "true" + }, + "NodeColor": { + "$id": "5569", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "5570", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "5571", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmExtensions": { + "$id": "5572", + "kind": "array", + "type": { + "$ref": "1875" + }, + "value": [ + { + "$id": "5573", + "kind": "model", + "type": { + "$ref": "1876" + }, + "value": { + "$id": "5574", + "name": { + "$id": "5575", + "kind": "string", + "type": { + "$ref": "1878" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "5576", + "kind": "model", + "type": { + "$ref": "1882" + }, + "value": { + "$id": "5577", + "type": { + "$id": "5578", + "kind": "string", + "type": { + "$ref": "1888" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "5579", + "kind": "boolean", + "type": { + "$ref": "1896" + }, + "value": true + }, + "forceUpdateTag": { + "$id": "5580", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "v.1.0" + }, + "publisher": { + "$id": "5581", + "kind": "string", + "type": { + "$ref": "1884" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "5582", + "kind": "model", + "type": { + "$ref": "1900" + }, + "value": { + "$id": "5583" + } + }, + "typeHandlerVersion": { + "$id": "5584", + "kind": "string", + "type": { + "$ref": "1892" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "5585", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "5586", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "5587", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "5588", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "5589", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSecrets": { + "$id": "5590", + "kind": "array", + "type": { + "$ref": "1849" + }, + "value": [ + { + "$id": "5591", + "kind": "model", + "type": { + "$ref": "1850" + }, + "value": { + "$id": "5592", + "sourceVault": { + "$id": "5593", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "5594", + "id": { + "$id": "5595", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "5596", + "kind": "array", + "type": { + "$ref": "1860" + }, + "value": [ + { + "$id": "5597", + "kind": "model", + "type": { + "$ref": "1861" + }, + "value": { + "$id": "5598", + "certificateStore": { + "$id": "5599", + "kind": "string", + "type": { + "$ref": "1867" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "5600", + "kind": "string", + "type": { + "$ref": "1863" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "5601", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_DS3" + } + } + }, + "sku": { + "$id": "5602", + "kind": "model", + "type": { + "$ref": "2234" + }, + "value": { + "$id": "5603", + "name": { + "$id": "5604", + "kind": "string", + "type": { + "$ref": "2236" + }, + "value": "Standard_S2" + }, + "capacity": { + "$id": "5605", + "kind": "number", + "type": { + "$ref": "2244" + }, + "value": 10 + }, + "tier": { + "$id": "5606", + "kind": "string", + "type": { + "$ref": "2240" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5607", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "5608" + } + } + } + } + } + ] + }, + { + "$id": "5609", + "kind": "http", + "name": "Put node type with custom vm image", + "description": "Put node type with custom vm image", + "filePath": "2025-03-01-preview/NodeTypePutOperationCustomImage_example.json", + "parameters": [ + { + "$id": "5610", + "parameter": { + "$ref": "5447" + }, + "value": { + "$id": "5611", + "kind": "string", + "type": { + "$ref": "5448" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5612", + "parameter": { + "$ref": "5455" + }, + "value": { + "$id": "5613", + "kind": "string", + "type": { + "$ref": "5456" + }, + "value": "myCluster" + } + }, + { + "$id": "5614", + "parameter": { + "$ref": "5457" + }, + "value": { + "$id": "5615", + "kind": "string", + "type": { + "$ref": "5458" + }, + "value": "BE" + } + }, + { + "$id": "5616", + "parameter": { + "$ref": "5453" + }, + "value": { + "$id": "5617", + "kind": "string", + "type": { + "$ref": "5454" + }, + "value": "resRg" + } + }, + { + "$id": "5618", + "parameter": { + "$ref": "5451" + }, + "value": { + "$id": "5619", + "kind": "string", + "type": { + "$ref": "5452" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5620", + "response": { + "$ref": "5466" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5621", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5622", + "name": { + "$id": "5623", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5624", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5625", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5626", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5627", + "capacities": { + "$id": "5628", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "5629" + } + }, + "dataDiskSizeGB": { + "$id": "5630", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "5631", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "5632", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "5633", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "5634", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "5635" + } + }, + "provisioningState": { + "$id": "5636", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmImageResourceId": { + "$id": "5637", + "kind": "string", + "type": { + "$ref": "2044" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC" + }, + "vmInstanceCount": { + "$id": "5638", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSize": { + "$id": "5639", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "5640", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "5641" + } + } + } + } + }, + { + "$id": "5642", + "response": { + "$ref": "5467" + }, + "statusCode": 202, + "bodyValue": { + "$id": "5643", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5644", + "name": { + "$id": "5645", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5646", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5647", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5648", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5649", + "capacities": { + "$id": "5650", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "5651" + } + }, + "dataDiskSizeGB": { + "$id": "5652", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "5653", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "5654", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "5655", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "5656", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "5657" + } + }, + "provisioningState": { + "$id": "5658", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmImageResourceId": { + "$id": "5659", + "kind": "string", + "type": { + "$ref": "2044" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC" + }, + "vmInstanceCount": { + "$id": "5660", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSize": { + "$id": "5661", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "5662", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "5663" + } + } + } + } + } + ] + }, + { + "$id": "5664", + "kind": "http", + "name": "Put node type with shared galleries custom vm image", + "description": "Put node type with shared galleries custom vm image", + "filePath": "2025-03-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json", + "parameters": [ + { + "$id": "5665", + "parameter": { + "$ref": "5447" + }, + "value": { + "$id": "5666", + "kind": "string", + "type": { + "$ref": "5448" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5667", + "parameter": { + "$ref": "5455" + }, + "value": { + "$id": "5668", + "kind": "string", + "type": { + "$ref": "5456" + }, + "value": "myCluster" + } + }, + { + "$id": "5669", + "parameter": { + "$ref": "5457" + }, + "value": { + "$id": "5670", + "kind": "string", + "type": { + "$ref": "5458" + }, + "value": "BE" + } + }, + { + "$id": "5671", + "parameter": { + "$ref": "5453" + }, + "value": { + "$id": "5672", + "kind": "string", + "type": { + "$ref": "5454" + }, + "value": "resRg" + } + }, + { + "$id": "5673", + "parameter": { + "$ref": "5451" + }, + "value": { + "$id": "5674", + "kind": "string", + "type": { + "$ref": "5452" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5675", + "response": { + "$ref": "5466" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5676", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5677", + "name": { + "$id": "5678", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5679", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5680", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5681", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5682", + "capacities": { + "$id": "5683", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "5684" + } + }, + "dataDiskSizeGB": { + "$id": "5685", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "5686", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "5687", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "5688", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "5689", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "5690" + } + }, + "provisioningState": { + "$id": "5691", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmInstanceCount": { + "$id": "5692", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSharedGalleryImageId": { + "$id": "5693", + "kind": "string", + "type": { + "$ref": "2073" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest" + }, + "vmSize": { + "$id": "5694", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "5695", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "5696" + } + } + } + } + }, + { + "$id": "5697", + "response": { + "$ref": "5467" + }, + "statusCode": 202, + "bodyValue": { + "$id": "5698", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5699", + "name": { + "$id": "5700", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5701", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5702", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5703", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5704", + "capacities": { + "$id": "5705", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "5706" + } + }, + "dataDiskSizeGB": { + "$id": "5707", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "5708", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "5709", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "5710", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "5711", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "5712" + } + }, + "provisioningState": { + "$id": "5713", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmInstanceCount": { + "$id": "5714", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSharedGalleryImageId": { + "$id": "5715", + "kind": "string", + "type": { + "$ref": "2073" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest" + }, + "vmSize": { + "$id": "5716", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "5717", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "5718" + } + } + } + } + } + ] + }, + { + "$id": "5719", + "kind": "http", + "name": "Put node type with dedicated hosts", + "description": "Put node type with dedicated hosts", + "filePath": "2025-03-01-preview/NodeTypePutOperationDedicatedHost_example.json", + "parameters": [ + { + "$id": "5720", + "parameter": { + "$ref": "5447" + }, + "value": { + "$id": "5721", + "kind": "string", + "type": { + "$ref": "5448" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5722", + "parameter": { + "$ref": "5455" + }, + "value": { + "$id": "5723", + "kind": "string", + "type": { + "$ref": "5456" + }, + "value": "myCluster" + } + }, + { + "$id": "5724", + "parameter": { + "$ref": "5457" + }, + "value": { + "$id": "5725", + "kind": "string", + "type": { + "$ref": "5458" + }, + "value": "BE" + } + }, + { + "$id": "5726", + "parameter": { + "$ref": "5453" + }, + "value": { + "$id": "5727", + "kind": "string", + "type": { + "$ref": "5454" + }, + "value": "resRg" + } + }, + { + "$id": "5728", + "parameter": { + "$ref": "5451" + }, + "value": { + "$id": "5729", + "kind": "string", + "type": { + "$ref": "5452" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5730", + "response": { + "$ref": "5466" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5731", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5732", + "name": { + "$id": "5733", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5734", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5735", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5736", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5737", + "capacities": { + "$id": "5738", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "5739" + } + }, + "dataDiskSizeGB": { + "$id": "5740", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "5741", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "hostGroupId": { + "$id": "5742", + "kind": "string", + "type": { + "$ref": "2029" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup" + }, + "isPrimary": { + "$id": "5743", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "5744", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "5745", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "5746" + } + }, + "provisioningState": { + "$id": "5747", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmImageOffer": { + "$id": "5748", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "5749", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "5750", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2019-Datacenter" + }, + "vmImageVersion": { + "$id": "5751", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "5752", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSize": { + "$id": "5753", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D8s_v3" + }, + "zones": { + "$id": "5754", + "kind": "array", + "type": { + "$ref": "2020" + }, + "value": [ + { + "$id": "5755", + "kind": "string", + "type": { + "$ref": "2021" + }, + "value": "1" + } + ] + } + } + }, + "tags": { + "$id": "5756", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "5757" + } + } + } + } + }, + { + "$id": "5758", + "response": { + "$ref": "5467" + }, + "statusCode": 202, + "bodyValue": { + "$id": "5759", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5760", + "name": { + "$id": "5761", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5762", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5763", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5764", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5765", + "capacities": { + "$id": "5766", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "5767" + } + }, + "dataDiskSizeGB": { + "$id": "5768", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "5769", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "hostGroupId": { + "$id": "5770", + "kind": "string", + "type": { + "$ref": "2029" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup" + }, + "isPrimary": { + "$id": "5771", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "5772", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "5773", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "5774" + } + }, + "provisioningState": { + "$id": "5775", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmImageOffer": { + "$id": "5776", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "5777", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "5778", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2019-Datacenter" + }, + "vmImageVersion": { + "$id": "5779", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "5780", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSize": { + "$id": "5781", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D8s_v3" + }, + "zones": { + "$id": "5782", + "kind": "array", + "type": { + "$ref": "2020" + }, + "value": [ + { + "$id": "5783", + "kind": "string", + "type": { + "$ref": "2021" + }, + "value": "1" + } + ] + } + } + }, + "tags": { + "$id": "5784", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "5785" + } + } + } + } + } + ] + }, + { + "$id": "5786", + "kind": "http", + "name": "Put an stateless node type with temporary disk for service fabric", + "description": "Put an stateless node type with temporary disk for service fabric", + "filePath": "2025-03-01-preview/NodeTypePutOperationStateless_example.json", + "parameters": [ + { + "$id": "5787", + "parameter": { + "$ref": "5447" + }, + "value": { + "$id": "5788", + "kind": "string", + "type": { + "$ref": "5448" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5789", + "parameter": { + "$ref": "5455" + }, + "value": { + "$id": "5790", + "kind": "string", + "type": { + "$ref": "5456" + }, + "value": "myCluster" + } + }, + { + "$id": "5791", + "parameter": { + "$ref": "5457" + }, + "value": { + "$id": "5792", + "kind": "string", + "type": { + "$ref": "5458" + }, + "value": "BE" + } + }, + { + "$id": "5793", + "parameter": { + "$ref": "5453" + }, + "value": { + "$id": "5794", + "kind": "string", + "type": { + "$ref": "5454" + }, + "value": "resRg" + } + }, + { + "$id": "5795", + "parameter": { + "$ref": "5451" + }, + "value": { + "$id": "5796", + "kind": "string", + "type": { + "$ref": "5452" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5797", + "response": { + "$ref": "5466" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5798", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5799", + "name": { + "$id": "5800", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5801", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5802", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5803", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5804", + "enableEncryptionAtHost": { + "$id": "5805", + "kind": "boolean", + "type": { + "$ref": "1997" + }, + "value": true + }, + "isPrimary": { + "$id": "5806", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "5807", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "5808", + "kind": "boolean", + "type": { + "$ref": "1946" + }, + "value": true + }, + "provisioningState": { + "$id": "5809", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "useTempDataDisk": { + "$id": "5810", + "kind": "boolean", + "type": { + "$ref": "2012" + }, + "value": true + }, + "vmExtensions": { + "$id": "5811", + "kind": "array", + "type": { + "$ref": "1875" + }, + "value": [ + { + "$id": "5812", + "kind": "model", + "type": { + "$ref": "1876" + }, + "value": { + "$id": "5813", + "name": { + "$id": "5814", + "kind": "string", + "type": { + "$ref": "1878" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "5815", + "kind": "model", + "type": { + "$ref": "1882" + }, + "value": { + "$id": "5816", + "type": { + "$id": "5817", + "kind": "string", + "type": { + "$ref": "1888" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "5818", + "kind": "boolean", + "type": { + "$ref": "1896" + }, + "value": true + }, + "publisher": { + "$id": "5819", + "kind": "string", + "type": { + "$ref": "1884" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "5820", + "kind": "model", + "type": { + "$ref": "1900" + }, + "value": { + "$id": "5821" + } + }, + "typeHandlerVersion": { + "$id": "5822", + "kind": "string", + "type": { + "$ref": "1892" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "5823", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "5824", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "5825", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "5826", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "5827", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSize": { + "$id": "5828", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_DS3" + } + } + }, + "tags": { + "$id": "5829", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "5830" + } + } + } + } + }, + { + "$id": "5831", + "response": { + "$ref": "5467" + }, + "statusCode": 202, + "bodyValue": { + "$id": "5832", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5833", + "name": { + "$id": "5834", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5835", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5836", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5837", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5838", + "enableEncryptionAtHost": { + "$id": "5839", + "kind": "boolean", + "type": { + "$ref": "1997" + }, + "value": true + }, + "isPrimary": { + "$id": "5840", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "5841", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "5842", + "kind": "boolean", + "type": { + "$ref": "1946" + }, + "value": true + }, + "provisioningState": { + "$id": "5843", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "useTempDataDisk": { + "$id": "5844", + "kind": "boolean", + "type": { + "$ref": "2012" + }, + "value": true + }, + "vmExtensions": { + "$id": "5845", + "kind": "array", + "type": { + "$ref": "1875" + }, + "value": [ + { + "$id": "5846", + "kind": "model", + "type": { + "$ref": "1876" + }, + "value": { + "$id": "5847", + "name": { + "$id": "5848", + "kind": "string", + "type": { + "$ref": "1878" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "5849", + "kind": "model", + "type": { + "$ref": "1882" + }, + "value": { + "$id": "5850", + "type": { + "$id": "5851", + "kind": "string", + "type": { + "$ref": "1888" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "5852", + "kind": "boolean", + "type": { + "$ref": "1896" + }, + "value": true + }, + "publisher": { + "$id": "5853", + "kind": "string", + "type": { + "$ref": "1884" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "5854", + "kind": "model", + "type": { + "$ref": "1900" + }, + "value": { + "$id": "5855" + } + }, + "typeHandlerVersion": { + "$id": "5856", + "kind": "string", + "type": { + "$ref": "1892" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "5857", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "5858", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "5859", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "5860", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "5861", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSize": { + "$id": "5862", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_DS3" + } + } + }, + "tags": { + "$id": "5863", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "5864" + } + } + } + } + } + ] + }, + { + "$id": "5865", + "kind": "http", + "name": "Put node type with vm image plan ", + "description": "Put node type with vm image plan ", + "filePath": "2025-03-01-preview/NodeTypePutOperationVmImagePlan_example.json", + "parameters": [ + { + "$id": "5866", + "parameter": { + "$ref": "5447" + }, + "value": { + "$id": "5867", + "kind": "string", + "type": { + "$ref": "5448" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5868", + "parameter": { + "$ref": "5455" + }, + "value": { + "$id": "5869", + "kind": "string", + "type": { + "$ref": "5456" + }, + "value": "myCluster" + } + }, + { + "$id": "5870", + "parameter": { + "$ref": "5457" + }, + "value": { + "$id": "5871", + "kind": "string", + "type": { + "$ref": "5458" + }, + "value": "BE" + } + }, + { + "$id": "5872", + "parameter": { + "$ref": "5453" + }, + "value": { + "$id": "5873", + "kind": "string", + "type": { + "$ref": "5454" + }, + "value": "resRg" + } + }, + { + "$id": "5874", + "parameter": { + "$ref": "5451" + }, + "value": { + "$id": "5875", + "kind": "string", + "type": { + "$ref": "5452" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5876", + "response": { + "$ref": "5466" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5877", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5878", + "name": { + "$id": "5879", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5880", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5881", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5882", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5883", + "capacities": { + "$id": "5884", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "5885" + } + }, + "dataDiskSizeGB": { + "$id": "5886", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "5887", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "5888", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "5889", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "5890", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "5891" + } + }, + "provisioningState": { + "$id": "5892", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmImageOffer": { + "$id": "5893", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "windows_2022_test" + }, + "vmImagePlan": { + "$id": "5894", + "kind": "model", + "type": { + "$ref": "2100" + }, + "value": { + "$id": "5895", + "name": { + "$id": "5896", + "kind": "string", + "type": { + "$ref": "2102" + }, + "value": "win_2022_test_20_10_gen2" + }, + "product": { + "$id": "5897", + "kind": "string", + "type": { + "$ref": "2106" + }, + "value": "windows_2022_test" + }, + "publisher": { + "$id": "5898", + "kind": "string", + "type": { + "$ref": "2114" + }, + "value": "testpublisher" + } + } + }, + "vmImagePublisher": { + "$id": "5899", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "testpublisher" + }, + "vmImageSku": { + "$id": "5900", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "win_2022_test_20_10_gen2" + }, + "vmImageVersion": { + "$id": "5901", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "5902", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSize": { + "$id": "5903", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "5904", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "5905" + } + } + } + } + }, + { + "$id": "5906", + "response": { + "$ref": "5467" + }, + "statusCode": 202, + "bodyValue": { + "$id": "5907", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5908", + "name": { + "$id": "5909", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5910", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5911", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5912", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5913", + "capacities": { + "$id": "5914", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "5915" + } + }, + "dataDiskSizeGB": { + "$id": "5916", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "5917", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "5918", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "5919", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "5920", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "5921" + } + }, + "provisioningState": { + "$id": "5922", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmImageOffer": { + "$id": "5923", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "windows_2022_test" + }, + "vmImagePlan": { + "$id": "5924", + "kind": "model", + "type": { + "$ref": "2100" + }, + "value": { + "$id": "5925", + "name": { + "$id": "5926", + "kind": "string", + "type": { + "$ref": "2102" + }, + "value": "win_2022_test_20_10_gen2" + }, + "product": { + "$id": "5927", + "kind": "string", + "type": { + "$ref": "2106" + }, + "value": "windows_2022_test" + }, + "publisher": { + "$id": "5928", + "kind": "string", + "type": { + "$ref": "2114" + }, + "value": "testpublisher" + } + } + }, + "vmImagePublisher": { + "$id": "5929", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "testpublisher" + }, + "vmImageSku": { + "$id": "5930", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "win_2022_test_20_10_gen2" + }, + "vmImageVersion": { + "$id": "5931", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "5932", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSize": { + "$id": "5933", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "5934", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "5935" + } + } + } + } + } + ] + }, + { + "$id": "5936", + "kind": "http", + "name": "Put a node type with maximum parameters", + "description": "Put a node type with maximum parameters", + "filePath": "2025-03-01-preview/NodeTypePutOperation_example_max.json", + "parameters": [ + { + "$id": "5937", + "parameter": { + "$ref": "5447" + }, + "value": { + "$id": "5938", + "kind": "string", + "type": { + "$ref": "5448" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5939", + "parameter": { + "$ref": "5455" + }, + "value": { + "$id": "5940", + "kind": "string", + "type": { + "$ref": "5456" + }, + "value": "myCluster" + } + }, + { + "$id": "5941", + "parameter": { + "$ref": "5457" + }, + "value": { + "$id": "5942", + "kind": "string", + "type": { + "$ref": "5458" + }, + "value": "BE-testResourceGroup-testRegion-test" + } + }, + { + "$id": "5943", + "parameter": { + "$ref": "5453" + }, + "value": { + "$id": "5944", + "kind": "string", + "type": { + "$ref": "5454" + }, + "value": "resRg" + } + }, + { + "$id": "5945", + "parameter": { + "$ref": "5451" + }, + "value": { + "$id": "5946", + "kind": "string", + "type": { + "$ref": "5452" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5947", + "response": { + "$ref": "5466" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5948", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "5949", + "name": { + "$id": "5950", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5951", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5952", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5953", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "5954", + "additionalDataDisks": { + "$id": "5955", + "kind": "array", + "type": { + "$ref": "1977" + }, + "value": [ + { + "$id": "5956", + "kind": "model", + "type": { + "$ref": "1978" + }, + "value": { + "$id": "5957", + "diskLetter": { + "$id": "5958", + "kind": "string", + "type": { + "$ref": "1991" + }, + "value": "F" + }, + "diskSizeGB": { + "$id": "5959", + "kind": "number", + "type": { + "$ref": "1984" + }, + "value": 256 + }, + "diskType": { + "$id": "5960", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "lun": { + "$id": "5961", + "kind": "number", + "type": { + "$ref": "1980" + }, + "value": 1 + } + } + }, + { + "$id": "5962", + "kind": "model", + "type": { + "$ref": "1978" + }, + "value": { + "$id": "5963", + "diskLetter": { + "$id": "5964", + "kind": "string", + "type": { + "$ref": "1991" + }, + "value": "G" + }, + "diskSizeGB": { + "$id": "5965", + "kind": "number", + "type": { + "$ref": "1984" + }, + "value": 150 + }, + "diskType": { + "$id": "5966", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "lun": { + "$id": "5967", + "kind": "number", + "type": { + "$ref": "1980" + }, + "value": 2 + } + } + } + ] + }, + "additionalNetworkInterfaceConfigurations": { + "$id": "5968", + "kind": "array", + "type": { + "$ref": "2130" + }, + "value": [ + { + "$id": "5969", + "kind": "model", + "type": { + "$ref": "2131" + }, + "value": { + "$id": "5970", + "name": { + "$id": "5971", + "kind": "string", + "type": { + "$ref": "2133" + }, + "value": "nic-1" + }, + "dscpConfiguration": { + "$id": "5972", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "5973", + "id": { + "$id": "5974", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig" + } + } + }, + "enableAcceleratedNetworking": { + "$id": "5975", + "kind": "boolean", + "type": { + "$ref": "2137" + }, + "value": true + }, + "ipConfigurations": { + "$id": "5976", + "kind": "array", + "type": { + "$ref": "2144" + }, + "value": [ + { + "$id": "5977", + "kind": "model", + "type": { + "$ref": "2145" + }, + "value": { + "$id": "5978", + "name": { + "$id": "5979", + "kind": "string", + "type": { + "$ref": "2147" + }, + "value": "ipconfig-1" + }, + "applicationGatewayBackendAddressPools": { + "$id": "5980", + "kind": "array", + "type": { + "$ref": "2151" + }, + "value": [ + { + "$id": "5981", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "5982", + "id": { + "$id": "5983", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "5984", + "kind": "array", + "type": { + "$ref": "2155" + }, + "value": [ + { + "$id": "5985", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "5986", + "id": { + "$id": "5987", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "5988", + "kind": "array", + "type": { + "$ref": "2159" + }, + "value": [ + { + "$id": "5989", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "5990", + "id": { + "$id": "5991", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool" + } + } + } + ] + }, + "privateIPAddressVersion": { + "$id": "5992", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "IPv4" + }, + "publicIPAddressConfiguration": { + "$id": "5993", + "kind": "model", + "type": { + "$ref": "2169" + }, + "value": { + "$id": "5994", + "name": { + "$id": "5995", + "kind": "string", + "type": { + "$ref": "2171" + }, + "value": "publicip-1" + }, + "ipTags": { + "$id": "5996", + "kind": "array", + "type": { + "$ref": "2175" + }, + "value": [ + { + "$id": "5997", + "kind": "model", + "type": { + "$ref": "1427" + }, + "value": { + "$id": "5998", + "ipTagType": { + "$id": "5999", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "RoutingPreference" + }, + "tag": { + "$id": "6000", + "kind": "string", + "type": { + "$ref": "1433" + }, + "value": "Internet" + } + } + } + ] + }, + "publicIPAddressVersion": { + "$id": "6001", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "IPv4" + } + } + }, + "subnet": { + "$id": "6002", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "6003", + "id": { + "$id": "6004", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + } + } + } + } + } + ] + } + } + } + ] + }, + "capacities": { + "$id": "6005", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "6006", + "ClientConnections": { + "$id": "6007", + "kind": "string", + "type": { + "$ref": "1810" + }, + "value": "65536" + } + } + }, + "dataDiskLetter": { + "$id": "6008", + "kind": "string", + "type": { + "$ref": "1798" + }, + "value": "S" + }, + "dataDiskSizeGB": { + "$id": "6009", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6010", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "dscpConfigurationId": { + "$id": "6011", + "kind": "string", + "type": { + "$ref": "2125" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig" + }, + "enableAcceleratedNetworking": { + "$id": "6012", + "kind": "boolean", + "type": { + "$ref": "2004" + }, + "value": true + }, + "enableEncryptionAtHost": { + "$id": "6013", + "kind": "boolean", + "type": { + "$ref": "1997" + }, + "value": true + }, + "enableNodePublicIP": { + "$id": "6014", + "kind": "boolean", + "type": { + "$ref": "2065" + }, + "value": true + }, + "enableNodePublicIPv6": { + "$id": "6015", + "kind": "boolean", + "type": { + "$ref": "2069" + }, + "value": true + }, + "enableOverProvisioning": { + "$id": "6016", + "kind": "boolean", + "type": { + "$ref": "2016" + }, + "value": false + }, + "evictionPolicy": { + "$id": "6017", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "Deallocate" + }, + "frontendConfigurations": { + "$id": "6018", + "kind": "array", + "type": { + "$ref": "1950" + }, + "value": [ + { + "$id": "6019", + "kind": "model", + "type": { + "$ref": "1951" + }, + "value": { + "$id": "6020", + "applicationGatewayBackendAddressPoolId": { + "$id": "6021", + "kind": "string", + "type": { + "$ref": "1966" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest" + }, + "loadBalancerBackendAddressPoolId": { + "$id": "6022", + "kind": "string", + "type": { + "$ref": "1956" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool" + }, + "loadBalancerInboundNatPoolId": { + "$id": "6023", + "kind": "string", + "type": { + "$ref": "1961" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool" + } + } + } + ] + }, + "isPrimary": { + "$id": "6024", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isSpotVM": { + "$id": "6025", + "kind": "boolean", + "type": { + "$ref": "2025" + }, + "value": true + }, + "isStateless": { + "$id": "6026", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "6027", + "kind": "boolean", + "type": { + "$ref": "1946" + }, + "value": true + }, + "natGatewayId": { + "$id": "6028", + "kind": "string", + "type": { + "$ref": "2078" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway" + }, + "placementProperties": { + "$id": "6029", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "6030", + "HasSSD": { + "$id": "6031", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6032", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6033", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6034", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "secureBootEnabled": { + "$id": "6035", + "kind": "boolean", + "type": { + "$ref": "2061" + }, + "value": true + }, + "securityType": { + "$id": "6036", + "kind": "string", + "type": { + "$ref": "322" + }, + "value": "TrustedLaunch" + }, + "serviceArtifactReferenceId": { + "$id": "6037", + "kind": "string", + "type": { + "$ref": "2120" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile" + }, + "spotRestoreTimeout": { + "$id": "6038", + "kind": "string", + "type": { + "$ref": "2037" + }, + "value": "PT30M" + }, + "subnetId": { + "$id": "6039", + "kind": "string", + "type": { + "$ref": "2049" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + }, + "useDefaultPublicLoadBalancer": { + "$id": "6040", + "kind": "boolean", + "type": { + "$ref": "2008" + }, + "value": true + }, + "useEphemeralOSDisk": { + "$id": "6041", + "kind": "boolean", + "type": { + "$ref": "2033" + }, + "value": true + }, + "vmApplications": { + "$id": "6042", + "kind": "array", + "type": { + "$ref": "2192" + }, + "value": [ + { + "$id": "6043", + "kind": "model", + "type": { + "$ref": "2193" + }, + "value": { + "$id": "6044", + "configurationReference": { + "$id": "6045", + "kind": "string", + "type": { + "$ref": "2195" + }, + "value": "https://mystorageaccount.blob.core.windows.net/containername/blobname" + }, + "enableAutomaticUpgrade": { + "$id": "6046", + "kind": "boolean", + "type": { + "$ref": "2199" + }, + "value": true + }, + "order": { + "$id": "6047", + "kind": "number", + "type": { + "$ref": "2203" + }, + "value": 1 + }, + "packageReferenceId": { + "$id": "6048", + "kind": "string", + "type": { + "$ref": "2207" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0" + }, + "treatFailureAsDeploymentFailure": { + "$id": "6049", + "kind": "boolean", + "type": { + "$ref": "2216" + }, + "value": false + }, + "vmGalleryTags": { + "$id": "6050", + "kind": "string", + "type": { + "$ref": "2212" + }, + "value": "{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}" + } + } + } + ] + }, + "vmExtensions": { + "$id": "6051", + "kind": "array", + "type": { + "$ref": "1875" + }, + "value": [ + { + "$id": "6052", + "kind": "model", + "type": { + "$ref": "1876" + }, + "value": { + "$id": "6053", + "name": { + "$id": "6054", + "kind": "string", + "type": { + "$ref": "1878" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6055", + "kind": "model", + "type": { + "$ref": "1882" + }, + "value": { + "$id": "6056", + "type": { + "$id": "6057", + "kind": "string", + "type": { + "$ref": "1888" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6058", + "kind": "boolean", + "type": { + "$ref": "1896" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "6059", + "kind": "boolean", + "type": { + "$ref": "1921" + }, + "value": true + }, + "forceUpdateTag": { + "$id": "6060", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "v.1.0" + }, + "publisher": { + "$id": "6061", + "kind": "string", + "type": { + "$ref": "1884" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6062", + "kind": "model", + "type": { + "$ref": "1900" + }, + "value": { + "$id": "6063" + } + }, + "setupOrder": { + "$id": "6064", + "kind": "array", + "type": { + "$ref": "1925" + }, + "value": [ + { + "$id": "6065", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "BeforeSFRuntime" + } + ] + }, + "typeHandlerVersion": { + "$id": "6066", + "kind": "string", + "type": { + "$ref": "1892" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6067", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6068", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6069", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6070", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6071", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "6072", + "kind": "model", + "type": { + "$ref": "1933" + }, + "value": { + "$id": "6073", + "userAssignedIdentities": { + "$id": "6074", + "kind": "array", + "type": { + "$ref": "1935" + }, + "value": [ + { + "$id": "6075", + "kind": "string", + "type": { + "$ref": "1936" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + }, + { + "$id": "6076", + "kind": "string", + "type": { + "$ref": "1936" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2" + } + ] + } + } + }, + "vmSecrets": { + "$id": "6077", + "kind": "array", + "type": { + "$ref": "1849" + }, + "value": [ + { + "$id": "6078", + "kind": "model", + "type": { + "$ref": "1850" + }, + "value": { + "$id": "6079", + "sourceVault": { + "$id": "6080", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "6081", + "id": { + "$id": "6082", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6083", + "kind": "array", + "type": { + "$ref": "1860" + }, + "value": [ + { + "$id": "6084", + "kind": "model", + "type": { + "$ref": "1861" + }, + "value": { + "$id": "6085", + "certificateStore": { + "$id": "6086", + "kind": "string", + "type": { + "$ref": "1867" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6087", + "kind": "string", + "type": { + "$ref": "1863" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSetupActions": { + "$id": "6088", + "kind": "array", + "type": { + "$ref": "2054" + }, + "value": [ + { + "$id": "6089", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "EnableContainers" + }, + { + "$id": "6090", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "EnableHyperV" + } + ] + }, + "vmSize": { + "$id": "6091", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_DS3" + }, + "zones": { + "$id": "6092", + "kind": "array", + "type": { + "$ref": "2020" + }, + "value": [ + { + "$id": "6093", + "kind": "string", + "type": { + "$ref": "2021" + }, + "value": "1" + }, + { + "$id": "6094", + "kind": "string", + "type": { + "$ref": "2021" + }, + "value": "2" + }, + { + "$id": "6095", + "kind": "string", + "type": { + "$ref": "2021" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "6096", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "6097" + } + } + } + } + }, + { + "$id": "6098", + "response": { + "$ref": "5467" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6099", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "6100", + "name": { + "$id": "6101", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6102", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6103", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6104", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "6105", + "additionalDataDisks": { + "$id": "6106", + "kind": "array", + "type": { + "$ref": "1977" + }, + "value": [ + { + "$id": "6107", + "kind": "model", + "type": { + "$ref": "1978" + }, + "value": { + "$id": "6108", + "diskLetter": { + "$id": "6109", + "kind": "string", + "type": { + "$ref": "1991" + }, + "value": "F" + }, + "diskSizeGB": { + "$id": "6110", + "kind": "number", + "type": { + "$ref": "1984" + }, + "value": 256 + }, + "diskType": { + "$id": "6111", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "lun": { + "$id": "6112", + "kind": "number", + "type": { + "$ref": "1980" + }, + "value": 1 + } + } + }, + { + "$id": "6113", + "kind": "model", + "type": { + "$ref": "1978" + }, + "value": { + "$id": "6114", + "diskLetter": { + "$id": "6115", + "kind": "string", + "type": { + "$ref": "1991" + }, + "value": "G" + }, + "diskSizeGB": { + "$id": "6116", + "kind": "number", + "type": { + "$ref": "1984" + }, + "value": 150 + }, + "diskType": { + "$id": "6117", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "lun": { + "$id": "6118", + "kind": "number", + "type": { + "$ref": "1980" + }, + "value": 2 + } + } + } + ] + }, + "additionalNetworkInterfaceConfigurations": { + "$id": "6119", + "kind": "array", + "type": { + "$ref": "2130" + }, + "value": [ + { + "$id": "6120", + "kind": "model", + "type": { + "$ref": "2131" + }, + "value": { + "$id": "6121", + "name": { + "$id": "6122", + "kind": "string", + "type": { + "$ref": "2133" + }, + "value": "nic-1" + }, + "dscpConfiguration": { + "$id": "6123", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "6124", + "id": { + "$id": "6125", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig" + } + } + }, + "enableAcceleratedNetworking": { + "$id": "6126", + "kind": "boolean", + "type": { + "$ref": "2137" + }, + "value": true + }, + "ipConfigurations": { + "$id": "6127", + "kind": "array", + "type": { + "$ref": "2144" + }, + "value": [ + { + "$id": "6128", + "kind": "model", + "type": { + "$ref": "2145" + }, + "value": { + "$id": "6129", + "name": { + "$id": "6130", + "kind": "string", + "type": { + "$ref": "2147" + }, + "value": "ipconfig-1" + }, + "applicationGatewayBackendAddressPools": { + "$id": "6131", + "kind": "array", + "type": { + "$ref": "2151" + }, + "value": [ + { + "$id": "6132", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "6133", + "id": { + "$id": "6134", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "6135", + "kind": "array", + "type": { + "$ref": "2155" + }, + "value": [ + { + "$id": "6136", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "6137", + "id": { + "$id": "6138", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "6139", + "kind": "array", + "type": { + "$ref": "2159" + }, + "value": [ + { + "$id": "6140", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "6141", + "id": { + "$id": "6142", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool" + } + } + } + ] + }, + "privateIPAddressVersion": { + "$id": "6143", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "IPv4" + }, + "publicIPAddressConfiguration": { + "$id": "6144", + "kind": "model", + "type": { + "$ref": "2169" + }, + "value": { + "$id": "6145", + "name": { + "$id": "6146", + "kind": "string", + "type": { + "$ref": "2171" + }, + "value": "publicip-1" + }, + "ipTags": { + "$id": "6147", + "kind": "array", + "type": { + "$ref": "2175" + }, + "value": [ + { + "$id": "6148", + "kind": "model", + "type": { + "$ref": "1427" + }, + "value": { + "$id": "6149", + "ipTagType": { + "$id": "6150", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "RoutingPreference" + }, + "tag": { + "$id": "6151", + "kind": "string", + "type": { + "$ref": "1433" + }, + "value": "Internet" + } + } + } + ] + }, + "publicIPAddressVersion": { + "$id": "6152", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "IPv4" + } + } + }, + "subnet": { + "$id": "6153", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "6154", + "id": { + "$id": "6155", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + } + } + } + } + } + ] + } + } + } + ] + }, + "capacities": { + "$id": "6156", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "6157", + "ClientConnections": { + "$id": "6158", + "kind": "string", + "type": { + "$ref": "1810" + }, + "value": "65536" + } + } + }, + "dataDiskLetter": { + "$id": "6159", + "kind": "string", + "type": { + "$ref": "1798" + }, + "value": "S" + }, + "dataDiskSizeGB": { + "$id": "6160", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6161", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "dscpConfigurationId": { + "$id": "6162", + "kind": "string", + "type": { + "$ref": "2125" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig" + }, + "enableAcceleratedNetworking": { + "$id": "6163", + "kind": "boolean", + "type": { + "$ref": "2004" + }, + "value": true + }, + "enableEncryptionAtHost": { + "$id": "6164", + "kind": "boolean", + "type": { + "$ref": "1997" + }, + "value": true + }, + "enableNodePublicIP": { + "$id": "6165", + "kind": "boolean", + "type": { + "$ref": "2065" + }, + "value": true + }, + "enableNodePublicIPv6": { + "$id": "6166", + "kind": "boolean", + "type": { + "$ref": "2069" + }, + "value": true + }, + "enableOverProvisioning": { + "$id": "6167", + "kind": "boolean", + "type": { + "$ref": "2016" + }, + "value": false + }, + "evictionPolicy": { + "$id": "6168", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "Deallocate" + }, + "frontendConfigurations": { + "$id": "6169", + "kind": "array", + "type": { + "$ref": "1950" + }, + "value": [ + { + "$id": "6170", + "kind": "model", + "type": { + "$ref": "1951" + }, + "value": { + "$id": "6171", + "applicationGatewayBackendAddressPoolId": { + "$id": "6172", + "kind": "string", + "type": { + "$ref": "1966" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest" + }, + "loadBalancerBackendAddressPoolId": { + "$id": "6173", + "kind": "string", + "type": { + "$ref": "1956" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool" + }, + "loadBalancerInboundNatPoolId": { + "$id": "6174", + "kind": "string", + "type": { + "$ref": "1961" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool" + } + } + } + ] + }, + "isPrimary": { + "$id": "6175", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isSpotVM": { + "$id": "6176", + "kind": "boolean", + "type": { + "$ref": "2025" + }, + "value": true + }, + "isStateless": { + "$id": "6177", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "6178", + "kind": "boolean", + "type": { + "$ref": "1946" + }, + "value": true + }, + "natGatewayId": { + "$id": "6179", + "kind": "string", + "type": { + "$ref": "2078" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway" + }, + "placementProperties": { + "$id": "6180", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "6181", + "HasSSD": { + "$id": "6182", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6183", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6184", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6185", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "secureBootEnabled": { + "$id": "6186", + "kind": "boolean", + "type": { + "$ref": "2061" + }, + "value": true + }, + "securityType": { + "$id": "6187", + "kind": "string", + "type": { + "$ref": "322" + }, + "value": "TrustedLaunch" + }, + "serviceArtifactReferenceId": { + "$id": "6188", + "kind": "string", + "type": { + "$ref": "2120" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile" + }, + "spotRestoreTimeout": { + "$id": "6189", + "kind": "string", + "type": { + "$ref": "2037" + }, + "value": "PT30M" + }, + "subnetId": { + "$id": "6190", + "kind": "string", + "type": { + "$ref": "2049" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + }, + "useDefaultPublicLoadBalancer": { + "$id": "6191", + "kind": "boolean", + "type": { + "$ref": "2008" + }, + "value": true + }, + "useEphemeralOSDisk": { + "$id": "6192", + "kind": "boolean", + "type": { + "$ref": "2033" + }, + "value": true + }, + "vmApplications": { + "$id": "6193", + "kind": "array", + "type": { + "$ref": "2192" + }, + "value": [ + { + "$id": "6194", + "kind": "model", + "type": { + "$ref": "2193" + }, + "value": { + "$id": "6195", + "configurationReference": { + "$id": "6196", + "kind": "string", + "type": { + "$ref": "2195" + }, + "value": "https://mystorageaccount.blob.core.windows.net/containername/blobname" + }, + "enableAutomaticUpgrade": { + "$id": "6197", + "kind": "boolean", + "type": { + "$ref": "2199" + }, + "value": true + }, + "order": { + "$id": "6198", + "kind": "number", + "type": { + "$ref": "2203" + }, + "value": 1 + }, + "packageReferenceId": { + "$id": "6199", + "kind": "string", + "type": { + "$ref": "2207" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0" + }, + "treatFailureAsDeploymentFailure": { + "$id": "6200", + "kind": "boolean", + "type": { + "$ref": "2216" + }, + "value": false + }, + "vmGalleryTags": { + "$id": "6201", + "kind": "string", + "type": { + "$ref": "2212" + }, + "value": "{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}" + } + } + } + ] + }, + "vmExtensions": { + "$id": "6202", + "kind": "array", + "type": { + "$ref": "1875" + }, + "value": [ + { + "$id": "6203", + "kind": "model", + "type": { + "$ref": "1876" + }, + "value": { + "$id": "6204", + "name": { + "$id": "6205", + "kind": "string", + "type": { + "$ref": "1878" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6206", + "kind": "model", + "type": { + "$ref": "1882" + }, + "value": { + "$id": "6207", + "type": { + "$id": "6208", + "kind": "string", + "type": { + "$ref": "1888" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6209", + "kind": "boolean", + "type": { + "$ref": "1896" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "6210", + "kind": "boolean", + "type": { + "$ref": "1921" + }, + "value": true + }, + "forceUpdateTag": { + "$id": "6211", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "v.1.0" + }, + "publisher": { + "$id": "6212", + "kind": "string", + "type": { + "$ref": "1884" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6213", + "kind": "model", + "type": { + "$ref": "1900" + }, + "value": { + "$id": "6214" + } + }, + "setupOrder": { + "$id": "6215", + "kind": "array", + "type": { + "$ref": "1925" + }, + "value": [ + { + "$id": "6216", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "BeforeSFRuntime" + } + ] + }, + "typeHandlerVersion": { + "$id": "6217", + "kind": "string", + "type": { + "$ref": "1892" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6218", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6219", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6220", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6221", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6222", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "6223", + "kind": "model", + "type": { + "$ref": "1933" + }, + "value": { + "$id": "6224", + "userAssignedIdentities": { + "$id": "6225", + "kind": "array", + "type": { + "$ref": "1935" + }, + "value": [ + { + "$id": "6226", + "kind": "string", + "type": { + "$ref": "1936" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + }, + { + "$id": "6227", + "kind": "string", + "type": { + "$ref": "1936" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2" + } + ] + } + } + }, + "vmSecrets": { + "$id": "6228", + "kind": "array", + "type": { + "$ref": "1849" + }, + "value": [ + { + "$id": "6229", + "kind": "model", + "type": { + "$ref": "1850" + }, + "value": { + "$id": "6230", + "sourceVault": { + "$id": "6231", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "6232", + "id": { + "$id": "6233", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6234", + "kind": "array", + "type": { + "$ref": "1860" + }, + "value": [ + { + "$id": "6235", + "kind": "model", + "type": { + "$ref": "1861" + }, + "value": { + "$id": "6236", + "certificateStore": { + "$id": "6237", + "kind": "string", + "type": { + "$ref": "1867" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6238", + "kind": "string", + "type": { + "$ref": "1863" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSetupActions": { + "$id": "6239", + "kind": "array", + "type": { + "$ref": "2054" + }, + "value": [ + { + "$id": "6240", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "EnableContainers" + }, + { + "$id": "6241", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "EnableHyperV" + } + ] + }, + "vmSize": { + "$id": "6242", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_DS3" + }, + "zones": { + "$id": "6243", + "kind": "array", + "type": { + "$ref": "2020" + }, + "value": [ + { + "$id": "6244", + "kind": "string", + "type": { + "$ref": "2021" + }, + "value": "1" + }, + { + "$id": "6245", + "kind": "string", + "type": { + "$ref": "2021" + }, + "value": "2" + }, + { + "$id": "6246", + "kind": "string", + "type": { + "$ref": "2021" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "6247", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "6248" + } + } + } + } + } + ] + }, + { + "$id": "6249", + "kind": "http", + "name": "Put a node type with minimum parameters", + "description": "Put a node type with minimum parameters", + "filePath": "2025-03-01-preview/NodeTypePutOperation_example_min.json", + "parameters": [ + { + "$id": "6250", + "parameter": { + "$ref": "5447" + }, + "value": { + "$id": "6251", + "kind": "string", + "type": { + "$ref": "5448" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6252", + "parameter": { + "$ref": "5455" + }, + "value": { + "$id": "6253", + "kind": "string", + "type": { + "$ref": "5456" + }, + "value": "myCluster" + } + }, + { + "$id": "6254", + "parameter": { + "$ref": "5457" + }, + "value": { + "$id": "6255", + "kind": "string", + "type": { + "$ref": "5458" + }, + "value": "BE" + } + }, + { + "$id": "6256", + "parameter": { + "$ref": "5453" + }, + "value": { + "$id": "6257", + "kind": "string", + "type": { + "$ref": "5454" + }, + "value": "resRg" + } + }, + { + "$id": "6258", + "parameter": { + "$ref": "5451" + }, + "value": { + "$id": "6259", + "kind": "string", + "type": { + "$ref": "5452" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6260", + "response": { + "$ref": "5466" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6261", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "6262", + "name": { + "$id": "6263", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6264", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6265", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6266", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "6267", + "capacities": { + "$id": "6268", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "6269" + } + }, + "dataDiskSizeGB": { + "$id": "6270", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6271", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6272", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "6273", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "6274", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "6275" + } + }, + "provisioningState": { + "$id": "6276", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmImageOffer": { + "$id": "6277", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6278", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6279", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6280", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6281", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSize": { + "$id": "6282", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6283", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "6284" + } + } + } + } + }, + { + "$id": "6285", + "response": { + "$ref": "5467" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6286", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "6287", + "name": { + "$id": "6288", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6289", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6290", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6291", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "6292", + "capacities": { + "$id": "6293", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "6294" + } + }, + "dataDiskSizeGB": { + "$id": "6295", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6296", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6297", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "6298", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "6299", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "6300" + } + }, + "provisioningState": { + "$id": "6301", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmImageOffer": { + "$id": "6302", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6303", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6304", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6305", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6306", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSize": { + "$id": "6307", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6308", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "6309" + } + } + } + } + } + ] + } + ] + }, + { + "$id": "6310", + "name": "update", + "resourceName": "NodeType", + "doc": "Update the configuration of a node type of a given managed cluster, only updating tags.", + "accessibility": "public", + "parameters": [ + { + "$id": "6311", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6312", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6313", + "type": { + "$id": "6314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6315", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6317", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6318", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6319", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6320", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6321", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6322", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6323", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6324", + "kind": "constant", + "valueType": { + "$id": "6325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6326", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6327", + "kind": "constant", + "valueType": { + "$id": "6328", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6329", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The parameters to update the node type configuration.", + "type": { + "$ref": "2249" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6330", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1779" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "6331", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6332", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6333", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "6334", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "6335", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6336", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "6337", + "finalStateVia": 1, + "finalResponse": { + "$id": "6338", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1779" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.update", + "decorators": [], + "examples": [ + { + "$id": "6339", + "kind": "http", + "name": "Patch a node type while auto-scaling", + "description": "Patch a node type while auto-scaling", + "filePath": "2025-03-01-preview/NodeTypePatchOperationAutoScale_example.json", + "parameters": [ + { + "$id": "6340", + "parameter": { + "$ref": "6311" + }, + "value": { + "$id": "6341", + "kind": "string", + "type": { + "$ref": "6312" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6342", + "parameter": { + "$ref": "6319" + }, + "value": { + "$id": "6343", + "kind": "string", + "type": { + "$ref": "6320" + }, + "value": "myCluster" + } + }, + { + "$id": "6344", + "parameter": { + "$ref": "6321" + }, + "value": { + "$id": "6345", + "kind": "string", + "type": { + "$ref": "6322" + }, + "value": "BE" + } + }, + { + "$id": "6346", + "parameter": { + "$ref": "6317" + }, + "value": { + "$id": "6347", + "kind": "string", + "type": { + "$ref": "6318" + }, + "value": "resRg" + } + }, + { + "$id": "6348", + "parameter": { + "$ref": "6315" + }, + "value": { + "$id": "6349", + "kind": "string", + "type": { + "$ref": "6316" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6350", + "response": { + "$ref": "6330" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6351", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "6352", + "name": { + "$id": "6353", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6354", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6355", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6356", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "6357", + "capacities": { + "$id": "6358", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "6359", + "ClientConnections": { + "$id": "6360", + "kind": "string", + "type": { + "$ref": "1810" + }, + "value": "65536" + } + } + }, + "dataDiskSizeGB": { + "$id": "6361", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6362", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6363", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "6364", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "6365", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "6366", + "HasSSD": { + "$id": "6367", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6368", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6369", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6370", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + }, + "vmExtensions": { + "$id": "6371", + "kind": "array", + "type": { + "$ref": "1875" + }, + "value": [ + { + "$id": "6372", + "kind": "model", + "type": { + "$ref": "1876" + }, + "value": { + "$id": "6373", + "name": { + "$id": "6374", + "kind": "string", + "type": { + "$ref": "1878" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6375", + "kind": "model", + "type": { + "$ref": "1882" + }, + "value": { + "$id": "6376", + "type": { + "$id": "6377", + "kind": "string", + "type": { + "$ref": "1888" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6378", + "kind": "boolean", + "type": { + "$ref": "1896" + }, + "value": true + }, + "publisher": { + "$id": "6379", + "kind": "string", + "type": { + "$ref": "1884" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6380", + "kind": "model", + "type": { + "$ref": "1900" + }, + "value": { + "$id": "6381" + } + }, + "typeHandlerVersion": { + "$id": "6382", + "kind": "string", + "type": { + "$ref": "1892" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6383", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6384", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6385", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6386", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6387", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "6388", + "kind": "model", + "type": { + "$ref": "1933" + }, + "value": { + "$id": "6389", + "userAssignedIdentities": { + "$id": "6390", + "kind": "array", + "type": { + "$ref": "1935" + }, + "value": [ + { + "$id": "6391", + "kind": "string", + "type": { + "$ref": "1936" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + } + ] + } + } + }, + "vmSecrets": { + "$id": "6392", + "kind": "array", + "type": { + "$ref": "1849" + }, + "value": [ + { + "$id": "6393", + "kind": "model", + "type": { + "$ref": "1850" + }, + "value": { + "$id": "6394", + "sourceVault": { + "$id": "6395", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "6396", + "id": { + "$id": "6397", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6398", + "kind": "array", + "type": { + "$ref": "1860" + }, + "value": [ + { + "$id": "6399", + "kind": "model", + "type": { + "$ref": "1861" + }, + "value": { + "$id": "6400", + "certificateStore": { + "$id": "6401", + "kind": "string", + "type": { + "$ref": "1867" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6402", + "kind": "string", + "type": { + "$ref": "1863" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "6403", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D3" + } + } + }, + "sku": { + "$id": "6404", + "kind": "model", + "type": { + "$ref": "2234" + }, + "value": { + "$id": "6405", + "name": { + "$id": "6406", + "kind": "string", + "type": { + "$ref": "2236" + }, + "value": "Standard_S0" + }, + "capacity": { + "$id": "6407", + "kind": "number", + "type": { + "$ref": "2244" + }, + "value": 10 + }, + "tier": { + "$id": "6408", + "kind": "string", + "type": { + "$ref": "2240" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "6409", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "6410", + "a": { + "$id": "6411", + "kind": "string", + "type": { + "$ref": "2230" + }, + "value": "b" + } + } + } + } + } + }, + { + "$id": "6412", + "response": { + "$ref": "6331" + }, + "statusCode": 202 + } + ] + }, + { + "$id": "6413", + "kind": "http", + "name": "Patch a node type", + "description": "Patch a node type", + "filePath": "2025-03-01-preview/NodeTypePatchOperation_example.json", + "parameters": [ + { + "$id": "6414", + "parameter": { + "$ref": "6311" + }, + "value": { + "$id": "6415", + "kind": "string", + "type": { + "$ref": "6312" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6416", + "parameter": { + "$ref": "6319" + }, + "value": { + "$id": "6417", + "kind": "string", + "type": { + "$ref": "6320" + }, + "value": "myCluster" + } + }, + { + "$id": "6418", + "parameter": { + "$ref": "6321" + }, + "value": { + "$id": "6419", + "kind": "string", + "type": { + "$ref": "6322" + }, + "value": "BE" + } + }, + { + "$id": "6420", + "parameter": { + "$ref": "6317" + }, + "value": { + "$id": "6421", + "kind": "string", + "type": { + "$ref": "6318" + }, + "value": "resRg" + } + }, + { + "$id": "6422", + "parameter": { + "$ref": "6315" + }, + "value": { + "$id": "6423", + "kind": "string", + "type": { + "$ref": "6316" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6424", + "response": { + "$ref": "6330" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6425", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "6426", + "name": { + "$id": "6427", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6428", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6429", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6430", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "6431", + "capacities": { + "$id": "6432", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "6433", + "ClientConnections": { + "$id": "6434", + "kind": "string", + "type": { + "$ref": "1810" + }, + "value": "65536" + } + } + }, + "dataDiskSizeGB": { + "$id": "6435", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6436", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6437", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "6438", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "6439", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "6440", + "HasSSD": { + "$id": "6441", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6442", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6443", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6444", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + }, + "vmExtensions": { + "$id": "6445", + "kind": "array", + "type": { + "$ref": "1875" + }, + "value": [ + { + "$id": "6446", + "kind": "model", + "type": { + "$ref": "1876" + }, + "value": { + "$id": "6447", + "name": { + "$id": "6448", + "kind": "string", + "type": { + "$ref": "1878" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6449", + "kind": "model", + "type": { + "$ref": "1882" + }, + "value": { + "$id": "6450", + "type": { + "$id": "6451", + "kind": "string", + "type": { + "$ref": "1888" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6452", + "kind": "boolean", + "type": { + "$ref": "1896" + }, + "value": true + }, + "publisher": { + "$id": "6453", + "kind": "string", + "type": { + "$ref": "1884" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6454", + "kind": "model", + "type": { + "$ref": "1900" + }, + "value": { + "$id": "6455" + } + }, + "typeHandlerVersion": { + "$id": "6456", + "kind": "string", + "type": { + "$ref": "1892" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6457", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6458", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6459", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6460", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6461", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "6462", + "kind": "model", + "type": { + "$ref": "1933" + }, + "value": { + "$id": "6463", + "userAssignedIdentities": { + "$id": "6464", + "kind": "array", + "type": { + "$ref": "1935" + }, + "value": [ + { + "$id": "6465", + "kind": "string", + "type": { + "$ref": "1936" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + } + ] + } + } + }, + "vmSecrets": { + "$id": "6466", + "kind": "array", + "type": { + "$ref": "1849" + }, + "value": [ + { + "$id": "6467", + "kind": "model", + "type": { + "$ref": "1850" + }, + "value": { + "$id": "6468", + "sourceVault": { + "$id": "6469", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "6470", + "id": { + "$id": "6471", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6472", + "kind": "array", + "type": { + "$ref": "1860" + }, + "value": [ + { + "$id": "6473", + "kind": "model", + "type": { + "$ref": "1861" + }, + "value": { + "$id": "6474", + "certificateStore": { + "$id": "6475", + "kind": "string", + "type": { + "$ref": "1867" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6476", + "kind": "string", + "type": { + "$ref": "1863" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "6477", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6478", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "6479", + "a": { + "$id": "6480", + "kind": "string", + "type": { + "$ref": "2230" + }, + "value": "b" + } + } + } + } + } + }, + { + "$id": "6481", + "response": { + "$ref": "6331" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "6482", + "name": "delete", + "resourceName": "NodeType", + "doc": "Delete a Service Fabric node type of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "6483", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6484", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6485", + "type": { + "$id": "6486", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6487", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6488", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6489", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6490", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6491", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6492", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6493", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6494", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6495", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6496", + "kind": "constant", + "valueType": { + "$id": "6497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6498", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6499", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6500", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "6501", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "6502", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6503", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "6504", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + "bufferResponse": true, + "longRunning": { + "$id": "6505", + "finalStateVia": 1, + "finalResponse": { + "$id": "6506", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.delete", + "decorators": [], + "examples": [ + { + "$id": "6507", + "kind": "http", + "name": "Delete a node type", + "description": "Delete a node type", + "filePath": "2025-03-01-preview/NodeTypeDeleteOperation_example.json", + "parameters": [ + { + "$id": "6508", + "parameter": { + "$ref": "6483" + }, + "value": { + "$id": "6509", + "kind": "string", + "type": { + "$ref": "6484" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6510", + "parameter": { + "$ref": "6491" + }, + "value": { + "$id": "6511", + "kind": "string", + "type": { + "$ref": "6492" + }, + "value": "myCluster" + } + }, + { + "$id": "6512", + "parameter": { + "$ref": "6493" + }, + "value": { + "$id": "6513", + "kind": "string", + "type": { + "$ref": "6494" + }, + "value": "BE" + } + }, + { + "$id": "6514", + "parameter": { + "$ref": "6489" + }, + "value": { + "$id": "6515", + "kind": "string", + "type": { + "$ref": "6490" + }, + "value": "resRg" + } + }, + { + "$id": "6516", + "parameter": { + "$ref": "6487" + }, + "value": { + "$id": "6517", + "kind": "string", + "type": { + "$ref": "6488" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6518", + "response": { + "$ref": "6498" + }, + "statusCode": 202 + }, + { + "$id": "6519", + "response": { + "$ref": "6504" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "6520", + "name": "listByManagedClusters", + "resourceName": "NodeType", + "doc": "Gets all Node types of the specified managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "6521", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6522", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6523", + "type": { + "$id": "6524", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6525", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6526", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6527", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6528", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6529", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6530", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6531", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6532", + "kind": "constant", + "valueType": { + "$id": "6533", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6534", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "2259" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes", + "bufferResponse": true, + "paging": { + "$id": "6535", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "6536", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.listByManagedClusters", + "decorators": [], + "examples": [ + { + "$id": "6537", + "kind": "http", + "name": "List node type of the specified managed cluster", + "description": "List node type of the specified managed cluster", + "filePath": "2025-03-01-preview/NodeTypeListOperation_example.json", + "parameters": [ + { + "$id": "6538", + "parameter": { + "$ref": "6521" + }, + "value": { + "$id": "6539", + "kind": "string", + "type": { + "$ref": "6522" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6540", + "parameter": { + "$ref": "6529" + }, + "value": { + "$id": "6541", + "kind": "string", + "type": { + "$ref": "6530" + }, + "value": "myCluster" + } + }, + { + "$id": "6542", + "parameter": { + "$ref": "6527" + }, + "value": { + "$id": "6543", + "kind": "string", + "type": { + "$ref": "6528" + }, + "value": "resRg" + } + }, + { + "$id": "6544", + "parameter": { + "$ref": "6525" + }, + "value": { + "$id": "6545", + "kind": "string", + "type": { + "$ref": "6526" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6546", + "response": { + "$ref": "6534" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6547", + "kind": "model", + "type": { + "$ref": "2259" + }, + "value": { + "$id": "6548", + "nextLink": { + "$id": "6549", + "kind": "string", + "type": { + "$ref": "2265" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "6550", + "kind": "array", + "type": { + "$ref": "2261" + }, + "value": [ + { + "$id": "6551", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "6552", + "name": { + "$id": "6553", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "FE" + }, + "type": { + "$id": "6554", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6555", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/FE" + }, + "properties": { + "$id": "6556", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "6557", + "capacities": { + "$id": "6558", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "6559" + } + }, + "dataDiskSizeGB": { + "$id": "6560", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 100 + }, + "dataDiskType": { + "$id": "6561", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6562", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": true + }, + "isStateless": { + "$id": "6563", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "6564", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "6565" + } + }, + "vmImageOffer": { + "$id": "6566", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6567", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6568", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2016-Datacenter" + }, + "vmImageVersion": { + "$id": "6569", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6570", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 5 + }, + "vmSize": { + "$id": "6571", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_D2" + } + } + }, + "sku": { + "$id": "6572", + "kind": "model", + "type": { + "$ref": "2234" + }, + "value": { + "$id": "6573", + "name": { + "$id": "6574", + "kind": "string", + "type": { + "$ref": "2236" + }, + "value": "Standard_P0" + }, + "capacity": { + "$id": "6575", + "kind": "number", + "type": { + "$ref": "2244" + }, + "value": 5 + }, + "tier": { + "$id": "6576", + "kind": "string", + "type": { + "$ref": "2240" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "6577", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "6578" + } + } + } + }, + { + "$id": "6579", + "kind": "model", + "type": { + "$ref": "1779" + }, + "value": { + "$id": "6580", + "name": { + "$id": "6581", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6582", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6583", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6584", + "kind": "model", + "type": { + "$ref": "1781" + }, + "value": { + "$id": "6585", + "capacities": { + "$id": "6586", + "kind": "dict", + "type": { + "$ref": "1808" + }, + "value": { + "$id": "6587" + } + }, + "dataDiskSizeGB": { + "$id": "6588", + "kind": "number", + "type": { + "$ref": "1791" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6589", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "isPrimary": { + "$id": "6590", + "kind": "boolean", + "type": { + "$ref": "1783" + }, + "value": false + }, + "isStateless": { + "$id": "6591", + "kind": "boolean", + "type": { + "$ref": "1942" + }, + "value": false + }, + "placementProperties": { + "$id": "6592", + "kind": "dict", + "type": { + "$ref": "1802" + }, + "value": { + "$id": "6593" + } + }, + "vmExtensions": { + "$id": "6594", + "kind": "array", + "type": { + "$ref": "1875" + }, + "value": [ + { + "$id": "6595", + "kind": "model", + "type": { + "$ref": "1876" + }, + "value": { + "$id": "6596", + "name": { + "$id": "6597", + "kind": "string", + "type": { + "$ref": "1878" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6598", + "kind": "model", + "type": { + "$ref": "1882" + }, + "value": { + "$id": "6599", + "type": { + "$id": "6600", + "kind": "string", + "type": { + "$ref": "1888" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6601", + "kind": "boolean", + "type": { + "$ref": "1896" + }, + "value": true + }, + "publisher": { + "$id": "6602", + "kind": "string", + "type": { + "$ref": "1884" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6603", + "kind": "model", + "type": { + "$ref": "1900" + }, + "value": { + "$id": "6604" + } + }, + "typeHandlerVersion": { + "$id": "6605", + "kind": "string", + "type": { + "$ref": "1892" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6606", + "kind": "string", + "type": { + "$ref": "1837" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6607", + "kind": "string", + "type": { + "$ref": "1833" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6608", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6609", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6610", + "kind": "number", + "type": { + "$ref": "1787" + }, + "value": 10 + }, + "vmSecrets": { + "$id": "6611", + "kind": "array", + "type": { + "$ref": "1849" + }, + "value": [ + { + "$id": "6612", + "kind": "model", + "type": { + "$ref": "1850" + }, + "value": { + "$id": "6613", + "sourceVault": { + "$id": "6614", + "kind": "model", + "type": { + "$ref": "1852" + }, + "value": { + "$id": "6615", + "id": { + "$id": "6616", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6617", + "kind": "array", + "type": { + "$ref": "1860" + }, + "value": [ + { + "$id": "6618", + "kind": "model", + "type": { + "$ref": "1861" + }, + "value": { + "$id": "6619", + "certificateStore": { + "$id": "6620", + "kind": "string", + "type": { + "$ref": "1867" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6621", + "kind": "string", + "type": { + "$ref": "1863" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "6622", + "kind": "string", + "type": { + "$ref": "1829" + }, + "value": "Standard_DS3" + } + } + }, + "sku": { + "$id": "6623", + "kind": "model", + "type": { + "$ref": "2234" + }, + "value": { + "$id": "6624", + "name": { + "$id": "6625", + "kind": "string", + "type": { + "$ref": "2236" + }, + "value": "Standard_S0" + }, + "capacity": { + "$id": "6626", + "kind": "number", + "type": { + "$ref": "2244" + }, + "value": 10 + }, + "tier": { + "$id": "6627", + "kind": "string", + "type": { + "$ref": "2240" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "6628", + "kind": "dict", + "type": { + "$ref": "2228" + }, + "value": { + "$id": "6629" + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "6630", + "name": "deallocate", + "resourceName": "NodeTypes", + "doc": "Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "6631", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6632", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6633", + "type": { + "$id": "6634", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6635", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6636", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6637", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6638", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6639", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6640", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6641", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6642", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6643", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6644", + "kind": "constant", + "valueType": { + "$id": "6645", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6646", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6647", + "kind": "constant", + "valueType": { + "$id": "6648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6649", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for deallocate action.", + "type": { + "$ref": "2269" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6650", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6651", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6652", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "6653", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "6654", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deallocate", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "6656", + "finalStateVia": 1, + "finalResponse": { + "$id": "6657", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.deallocate", + "decorators": [], + "examples": [ + { + "$id": "6658", + "kind": "http", + "name": "Deallocate nodes", + "description": "Deallocate nodes", + "filePath": "2025-03-01-preview/DeallocateNodes_example.json", + "parameters": [ + { + "$id": "6659", + "parameter": { + "$ref": "6631" + }, + "value": { + "$id": "6660", + "kind": "string", + "type": { + "$ref": "6632" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6661", + "parameter": { + "$ref": "6639" + }, + "value": { + "$id": "6662", + "kind": "string", + "type": { + "$ref": "6640" + }, + "value": "myCluster" + } + }, + { + "$id": "6663", + "parameter": { + "$ref": "6641" + }, + "value": { + "$id": "6664", + "kind": "string", + "type": { + "$ref": "6642" + }, + "value": "BE" + } + }, + { + "$id": "6665", + "parameter": { + "$ref": "6637" + }, + "value": { + "$id": "6666", + "kind": "string", + "type": { + "$ref": "6638" + }, + "value": "resRg" + } + }, + { + "$id": "6667", + "parameter": { + "$ref": "6635" + }, + "value": { + "$id": "6668", + "kind": "string", + "type": { + "$ref": "6636" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6669", + "response": { + "$ref": "6650" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "6670", + "name": "deleteNode", + "resourceName": "NodeTypes", + "doc": "Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "6671", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6672", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6673", + "type": { + "$id": "6674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6675", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6676", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6677", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6678", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6679", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6681", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6683", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6684", + "kind": "constant", + "valueType": { + "$id": "6685", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6686", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6687", + "kind": "constant", + "valueType": { + "$id": "6688", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6689", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for delete action.", + "type": { + "$ref": "2269" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6690", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6691", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6692", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "6693", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "6694", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "6696", + "finalStateVia": 1, + "finalResponse": { + "$id": "6697", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.deleteNode", + "decorators": [], + "examples": [ + { + "$id": "6698", + "kind": "http", + "name": "Delete nodes", + "description": "Delete nodes", + "filePath": "2025-03-01-preview/DeleteNodes_example.json", + "parameters": [ + { + "$id": "6699", + "parameter": { + "$ref": "6671" + }, + "value": { + "$id": "6700", + "kind": "string", + "type": { + "$ref": "6672" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6701", + "parameter": { + "$ref": "6679" + }, + "value": { + "$id": "6702", + "kind": "string", + "type": { + "$ref": "6680" + }, + "value": "myCluster" + } + }, + { + "$id": "6703", + "parameter": { + "$ref": "6681" + }, + "value": { + "$id": "6704", + "kind": "string", + "type": { + "$ref": "6682" + }, + "value": "BE" + } + }, + { + "$id": "6705", + "parameter": { + "$ref": "6677" + }, + "value": { + "$id": "6706", + "kind": "string", + "type": { + "$ref": "6678" + }, + "value": "resRg" + } + }, + { + "$id": "6707", + "parameter": { + "$ref": "6675" + }, + "value": { + "$id": "6708", + "kind": "string", + "type": { + "$ref": "6676" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6709", + "response": { + "$ref": "6690" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "6710", + "name": "redeploy", + "resourceName": "NodeTypes", + "doc": "Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on.", + "accessibility": "public", + "parameters": [ + { + "$id": "6711", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6712", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6713", + "type": { + "$id": "6714", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6715", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6717", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6718", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6719", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6720", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6721", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6722", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6723", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6724", + "kind": "constant", + "valueType": { + "$id": "6725", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6726", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6727", + "kind": "constant", + "valueType": { + "$id": "6728", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6729", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for redeploy action.", + "type": { + "$ref": "2269" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6730", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6731", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6732", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "6733", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "6734", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/redeploy", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "6736", + "finalStateVia": 1, + "finalResponse": { + "$id": "6737", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.redeploy", + "decorators": [], + "examples": [ + { + "$id": "6738", + "kind": "http", + "name": "Redeploy all nodes by upgrade domain", + "description": "Redeploy all nodes by upgrade domain", + "filePath": "2025-03-01-preview/RedeployNodes_UD_example.json", + "parameters": [ + { + "$id": "6739", + "parameter": { + "$ref": "6711" + }, + "value": { + "$id": "6740", + "kind": "string", + "type": { + "$ref": "6712" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6741", + "parameter": { + "$ref": "6719" + }, + "value": { + "$id": "6742", + "kind": "string", + "type": { + "$ref": "6720" + }, + "value": "myCluster" + } + }, + { + "$id": "6743", + "parameter": { + "$ref": "6721" + }, + "value": { + "$id": "6744", + "kind": "string", + "type": { + "$ref": "6722" + }, + "value": "BE" + } + }, + { + "$id": "6745", + "parameter": { + "$ref": "6717" + }, + "value": { + "$id": "6746", + "kind": "string", + "type": { + "$ref": "6718" + }, + "value": "resRg" + } + }, + { + "$id": "6747", + "parameter": { + "$ref": "6715" + }, + "value": { + "$id": "6748", + "kind": "string", + "type": { + "$ref": "6716" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6749", + "response": { + "$ref": "6730" + }, + "statusCode": 202 + } + ] + }, + { + "$id": "6750", + "kind": "http", + "name": "Redeploy nodes", + "description": "Redeploy nodes", + "filePath": "2025-03-01-preview/RedeployNodes_example.json", + "parameters": [ + { + "$id": "6751", + "parameter": { + "$ref": "6711" + }, + "value": { + "$id": "6752", + "kind": "string", + "type": { + "$ref": "6712" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6753", + "parameter": { + "$ref": "6719" + }, + "value": { + "$id": "6754", + "kind": "string", + "type": { + "$ref": "6720" + }, + "value": "myCluster" + } + }, + { + "$id": "6755", + "parameter": { + "$ref": "6721" + }, + "value": { + "$id": "6756", + "kind": "string", + "type": { + "$ref": "6722" + }, + "value": "BE" + } + }, + { + "$id": "6757", + "parameter": { + "$ref": "6717" + }, + "value": { + "$id": "6758", + "kind": "string", + "type": { + "$ref": "6718" + }, + "value": "resRg" + } + }, + { + "$id": "6759", + "parameter": { + "$ref": "6715" + }, + "value": { + "$id": "6760", + "kind": "string", + "type": { + "$ref": "6716" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6761", + "response": { + "$ref": "6730" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "6762", + "name": "reimage", + "resourceName": "NodeTypes", + "doc": "Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again.", + "accessibility": "public", + "parameters": [ + { + "$id": "6763", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6764", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6765", + "type": { + "$id": "6766", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6767", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6768", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6769", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6770", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6771", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6772", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6773", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6774", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6775", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6776", + "kind": "constant", + "valueType": { + "$id": "6777", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6778", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6779", + "kind": "constant", + "valueType": { + "$id": "6780", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6781", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for reimage action.", + "type": { + "$ref": "2269" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6782", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6783", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6784", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "6785", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "6786", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/reimage", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "6788", + "finalStateVia": 1, + "finalResponse": { + "$id": "6789", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.reimage", + "decorators": [], + "examples": [ + { + "$id": "6790", + "kind": "http", + "name": "Reimage all nodes by upgrade domain", + "description": "Reimage all nodes by upgrade domain", + "filePath": "2025-03-01-preview/ReimageNodes_UD_example.json", + "parameters": [ + { + "$id": "6791", + "parameter": { + "$ref": "6763" + }, + "value": { + "$id": "6792", + "kind": "string", + "type": { + "$ref": "6764" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6793", + "parameter": { + "$ref": "6771" + }, + "value": { + "$id": "6794", + "kind": "string", + "type": { + "$ref": "6772" + }, + "value": "myCluster" + } + }, + { + "$id": "6795", + "parameter": { + "$ref": "6773" + }, + "value": { + "$id": "6796", + "kind": "string", + "type": { + "$ref": "6774" + }, + "value": "BE" + } + }, + { + "$id": "6797", + "parameter": { + "$ref": "6769" + }, + "value": { + "$id": "6798", + "kind": "string", + "type": { + "$ref": "6770" + }, + "value": "resRg" + } + }, + { + "$id": "6799", + "parameter": { + "$ref": "6767" + }, + "value": { + "$id": "6800", + "kind": "string", + "type": { + "$ref": "6768" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6801", + "response": { + "$ref": "6782" + }, + "statusCode": 202 + } + ] + }, + { + "$id": "6802", + "kind": "http", + "name": "Reimage nodes", + "description": "Reimage nodes", + "filePath": "2025-03-01-preview/ReimageNodes_example.json", + "parameters": [ + { + "$id": "6803", + "parameter": { + "$ref": "6763" + }, + "value": { + "$id": "6804", + "kind": "string", + "type": { + "$ref": "6764" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6805", + "parameter": { + "$ref": "6771" + }, + "value": { + "$id": "6806", + "kind": "string", + "type": { + "$ref": "6772" + }, + "value": "myCluster" + } + }, + { + "$id": "6807", + "parameter": { + "$ref": "6773" + }, + "value": { + "$id": "6808", + "kind": "string", + "type": { + "$ref": "6774" + }, + "value": "BE" + } + }, + { + "$id": "6809", + "parameter": { + "$ref": "6769" + }, + "value": { + "$id": "6810", + "kind": "string", + "type": { + "$ref": "6770" + }, + "value": "resRg" + } + }, + { + "$id": "6811", + "parameter": { + "$ref": "6767" + }, + "value": { + "$id": "6812", + "kind": "string", + "type": { + "$ref": "6768" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6813", + "response": { + "$ref": "6782" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "6814", + "name": "restart", + "resourceName": "NodeTypes", + "doc": "Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again.", + "accessibility": "public", + "parameters": [ + { + "$id": "6815", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6817", + "type": { + "$id": "6818", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6819", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6821", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6822", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6823", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6825", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6826", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6827", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6828", + "kind": "constant", + "valueType": { + "$id": "6829", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6830", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6831", + "kind": "constant", + "valueType": { + "$id": "6832", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6833", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for restart action.", + "type": { + "$ref": "2269" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6834", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6835", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6836", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "6837", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "6838", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6839", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "6840", + "finalStateVia": 1, + "finalResponse": { + "$id": "6841", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.restart", + "decorators": [], + "examples": [ + { + "$id": "6842", + "kind": "http", + "name": "Restart nodes", + "description": "Restart nodes", + "filePath": "2025-03-01-preview/RestartNodes_example.json", + "parameters": [ + { + "$id": "6843", + "parameter": { + "$ref": "6815" + }, + "value": { + "$id": "6844", + "kind": "string", + "type": { + "$ref": "6816" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6845", + "parameter": { + "$ref": "6823" + }, + "value": { + "$id": "6846", + "kind": "string", + "type": { + "$ref": "6824" + }, + "value": "myCluster" + } + }, + { + "$id": "6847", + "parameter": { + "$ref": "6825" + }, + "value": { + "$id": "6848", + "kind": "string", + "type": { + "$ref": "6826" + }, + "value": "BE" + } + }, + { + "$id": "6849", + "parameter": { + "$ref": "6821" + }, + "value": { + "$id": "6850", + "kind": "string", + "type": { + "$ref": "6822" + }, + "value": "resRg" + } + }, + { + "$id": "6851", + "parameter": { + "$ref": "6819" + }, + "value": { + "$id": "6852", + "kind": "string", + "type": { + "$ref": "6820" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6853", + "response": { + "$ref": "6834" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "6854", + "name": "start", + "resourceName": "NodeTypes", + "doc": "Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them.", + "accessibility": "public", + "parameters": [ + { + "$id": "6855", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6856", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6857", + "type": { + "$id": "6858", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6859", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6860", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6861", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6862", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6863", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6864", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6865", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6866", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6867", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6868", + "kind": "constant", + "valueType": { + "$id": "6869", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6870", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6871", + "kind": "constant", + "valueType": { + "$id": "6872", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6873", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for start action.", + "type": { + "$ref": "2269" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6874", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6875", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6876", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "6877", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "6878", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/start", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "6880", + "finalStateVia": 1, + "finalResponse": { + "$id": "6881", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.start", + "decorators": [], + "examples": [ + { + "$id": "6882", + "kind": "http", + "name": "Start nodes", + "description": "Start nodes", + "filePath": "2025-03-01-preview/StartNodes_example.json", + "parameters": [ + { + "$id": "6883", + "parameter": { + "$ref": "6855" + }, + "value": { + "$id": "6884", + "kind": "string", + "type": { + "$ref": "6856" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6885", + "parameter": { + "$ref": "6863" + }, + "value": { + "$id": "6886", + "kind": "string", + "type": { + "$ref": "6864" + }, + "value": "myCluster" + } + }, + { + "$id": "6887", + "parameter": { + "$ref": "6865" + }, + "value": { + "$id": "6888", + "kind": "string", + "type": { + "$ref": "6866" + }, + "value": "BE" + } + }, + { + "$id": "6889", + "parameter": { + "$ref": "6861" + }, + "value": { + "$id": "6890", + "kind": "string", + "type": { + "$ref": "6862" + }, + "value": "resRg" + } + }, + { + "$id": "6891", + "parameter": { + "$ref": "6859" + }, + "value": { + "$id": "6892", + "kind": "string", + "type": { + "$ref": "6860" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6893", + "response": { + "$ref": "6874" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "6894", + "name": "startFaultSimulation", + "resourceName": "NodeTypes", + "doc": "Starts a fault simulation on the node type.", + "accessibility": "public", + "parameters": [ + { + "$id": "6895", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6897", + "type": { + "$id": "6898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6899", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6900", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6901", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6902", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6903", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6904", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6905", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6906", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6907", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6908", + "kind": "constant", + "valueType": { + "$id": "6909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6910", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6911", + "kind": "constant", + "valueType": { + "$id": "6912", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6913", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters describing the fault simulation.", + "type": { + "$ref": "1716" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6914", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6915", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6916", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "6917", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6918", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "6919", + "finalStateVia": 1, + "finalResponse": { + "$id": "6920", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1625" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.startFaultSimulation", + "decorators": [] + }, + { + "$id": "6921", + "name": "stopFaultSimulation", + "resourceName": "NodeTypes", + "doc": "Stops a fault simulation on the node type.", + "accessibility": "public", + "parameters": [ + { + "$id": "6922", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6924", + "type": { + "$id": "6925", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6926", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6927", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6928", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6929", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6930", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6931", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6932", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6933", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6934", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6935", + "kind": "constant", + "valueType": { + "$id": "6936", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6937", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6938", + "kind": "constant", + "valueType": { + "$id": "6939", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6940", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1620" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6941", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6942", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6943", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "6944", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6945", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "6946", + "finalStateVia": 1, + "finalResponse": { + "$id": "6947", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1625" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation", + "decorators": [] + }, + { + "$id": "6948", + "name": "getFaultSimulation", + "resourceName": "NodeTypes", + "doc": "Gets a fault simulation by the simulationId.", + "accessibility": "public", + "parameters": [ + { + "$id": "6949", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6950", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6951", + "type": { + "$id": "6952", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6953", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6954", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6955", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6957", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6958", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6959", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6960", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6961", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6962", + "kind": "constant", + "valueType": { + "$id": "6963", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6964", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6965", + "kind": "constant", + "valueType": { + "$id": "6966", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6967", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1620" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6968", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1625" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/getFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.getFaultSimulation", + "decorators": [] + }, + { + "$id": "6969", + "name": "listFaultSimulation", + "resourceName": "NodeTypes", + "doc": "Gets the list of recent fault simulations for the node type.", + "accessibility": "public", + "parameters": [ + { + "$id": "6970", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6972", + "type": { + "$id": "6973", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6974", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6975", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6976", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6977", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6978", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6980", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6981", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6982", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6983", + "kind": "constant", + "valueType": { + "$id": "6984", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6985", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1706" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/listFaultSimulation", + "bufferResponse": true, + "paging": { + "$id": "6986", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "6987", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.listFaultSimulation", + "decorators": [] + } + ], + "parameters": [ + { + "$id": "6988", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "6989", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "6990", + "type": { + "$id": "6991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "6992", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "6993" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "6994", + "kind": "client", + "name": "NodeTypeSkus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "6995", + "name": "GetAvailableSkus", + "resourceName": "NodeTypeSkus", + "doc": "Get a Service Fabric node type supported SKUs.", + "accessibility": "public", + "parameters": [ + { + "$id": "6996", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6998", + "type": { + "$id": "6999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7000", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7002", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7003", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7004", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7005", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7006", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7008", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7009", + "kind": "constant", + "valueType": { + "$id": "7010", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7011", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "2282" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/skus", + "bufferResponse": true, + "paging": { + "$id": "7012", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "7013", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkus.list", + "decorators": [], + "examples": [ + { + "$id": "7014", + "kind": "http", + "name": "List a node type SKUs", + "description": "List a node type SKUs", + "filePath": "2025-03-01-preview/NodeTypeSkusListOperation_example.json", + "parameters": [ + { + "$id": "7015", + "parameter": { + "$ref": "6996" + }, + "value": { + "$id": "7016", + "kind": "string", + "type": { + "$ref": "6997" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7017", + "parameter": { + "$ref": "7004" + }, + "value": { + "$id": "7018", + "kind": "string", + "type": { + "$ref": "7005" + }, + "value": "myCluster" + } + }, + { + "$id": "7019", + "parameter": { + "$ref": "7006" + }, + "value": { + "$id": "7020", + "kind": "string", + "type": { + "$ref": "7007" + }, + "value": "BE" + } + }, + { + "$id": "7021", + "parameter": { + "$ref": "7002" + }, + "value": { + "$id": "7022", + "kind": "string", + "type": { + "$ref": "7003" + }, + "value": "resRg" + } + }, + { + "$id": "7023", + "parameter": { + "$ref": "7000" + }, + "value": { + "$id": "7024", + "kind": "string", + "type": { + "$ref": "7001" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7025", + "response": { + "$ref": "7011" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7026", + "kind": "model", + "type": { + "$ref": "2282" + }, + "value": { + "$id": "7027", + "nextLink": { + "$id": "7028", + "kind": "string", + "type": { + "$ref": "2325" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "7029", + "kind": "array", + "type": { + "$ref": "2284" + }, + "value": [ + { + "$id": "7030", + "kind": "model", + "type": { + "$ref": "2285" + }, + "value": { + "$id": "7031", + "capacity": { + "$id": "7032", + "kind": "model", + "type": { + "$ref": "2304" + }, + "value": { + "$id": "7033", + "default": { + "$id": "7034", + "kind": "number", + "type": { + "$ref": "2314" + }, + "value": 1 + }, + "maximum": { + "$id": "7035", + "kind": "number", + "type": { + "$ref": "2310" + }, + "value": 100 + }, + "minimum": { + "$id": "7036", + "kind": "number", + "type": { + "$ref": "2306" + }, + "value": 1 + }, + "scaleType": { + "$id": "7037", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "Automatic" + } + } + }, + "resourceType": { + "$id": "7038", + "kind": "string", + "type": { + "$ref": "2287" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "sku": { + "$id": "7039", + "kind": "model", + "type": { + "$ref": "2292" + }, + "value": { + "$id": "7040", + "name": { + "$id": "7041", + "kind": "string", + "type": { + "$ref": "2294" + }, + "value": "Standard_S0" + }, + "tier": { + "$id": "7042", + "kind": "string", + "type": { + "$ref": "2298" + }, + "value": "Standard" + } + } + } + } + }, + { + "$id": "7043", + "kind": "model", + "type": { + "$ref": "2285" + }, + "value": { + "$id": "7044", + "capacity": { + "$id": "7045", + "kind": "model", + "type": { + "$ref": "2304" + }, + "value": { + "$id": "7046", + "default": { + "$id": "7047", + "kind": "number", + "type": { + "$ref": "2314" + }, + "value": 3 + }, + "maximum": { + "$id": "7048", + "kind": "number", + "type": { + "$ref": "2310" + }, + "value": 300 + }, + "minimum": { + "$id": "7049", + "kind": "number", + "type": { + "$ref": "2306" + }, + "value": 3 + }, + "scaleType": { + "$id": "7050", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "Automatic" + } + } + }, + "resourceType": { + "$id": "7051", + "kind": "string", + "type": { + "$ref": "2287" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "sku": { + "$id": "7052", + "kind": "model", + "type": { + "$ref": "2292" + }, + "value": { + "$id": "7053", + "name": { + "$id": "7054", + "kind": "string", + "type": { + "$ref": "2294" + }, + "value": "Standard_S1" + }, + "tier": { + "$id": "7055", + "kind": "string", + "type": { + "$ref": "2298" + }, + "value": "Standard" + } + } + } + } + }, + { + "$id": "7056", + "kind": "model", + "type": { + "$ref": "2285" + }, + "value": { + "$id": "7057", + "capacity": { + "$id": "7058", + "kind": "model", + "type": { + "$ref": "2304" + }, + "value": { + "$id": "7059", + "default": { + "$id": "7060", + "kind": "number", + "type": { + "$ref": "2314" + }, + "value": 1 + }, + "maximum": { + "$id": "7061", + "kind": "number", + "type": { + "$ref": "2310" + }, + "value": 1000 + }, + "minimum": { + "$id": "7062", + "kind": "number", + "type": { + "$ref": "2306" + }, + "value": 1 + }, + "scaleType": { + "$id": "7063", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "Automatic" + } + } + }, + "resourceType": { + "$id": "7064", + "kind": "string", + "type": { + "$ref": "2287" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "sku": { + "$id": "7065", + "kind": "model", + "type": { + "$ref": "2292" + }, + "value": { + "$id": "7066", + "name": { + "$id": "7067", + "kind": "string", + "type": { + "$ref": "2294" + }, + "value": "Standard_S2" + }, + "tier": { + "$id": "7068", + "kind": "string", + "type": { + "$ref": "2298" + }, + "value": "Standard" + } + } + } + } + }, + { + "$id": "7069", + "kind": "model", + "type": { + "$ref": "2285" + }, + "value": { + "$id": "7070", + "capacity": { + "$id": "7071", + "kind": "model", + "type": { + "$ref": "2304" + }, + "value": { + "$id": "7072", + "default": { + "$id": "7073", + "kind": "number", + "type": { + "$ref": "2314" + }, + "value": 3 + }, + "maximum": { + "$id": "7074", + "kind": "number", + "type": { + "$ref": "2310" + }, + "value": 1000 + }, + "minimum": { + "$id": "7075", + "kind": "number", + "type": { + "$ref": "2306" + }, + "value": 3 + }, + "scaleType": { + "$id": "7076", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "Automatic" + } + } + }, + "resourceType": { + "$id": "7077", + "kind": "string", + "type": { + "$ref": "2287" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "sku": { + "$id": "7078", + "kind": "model", + "type": { + "$ref": "2292" + }, + "value": { + "$id": "7079", + "name": { + "$id": "7080", + "kind": "string", + "type": { + "$ref": "2294" + }, + "value": "Standard_S3" + }, + "tier": { + "$id": "7081", + "kind": "string", + "type": { + "$ref": "2298" + }, + "value": "Standard" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "7082", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "7083", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "7084", + "type": { + "$id": "7085", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "7086", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "7087" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkus", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "7088", + "kind": "client", + "name": "OperationResults", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "7089", + "name": "get", + "resourceName": "OperationResults", + "summary": "Get long running operation result.", + "doc": "Get long running operation result.", + "accessibility": "public", + "parameters": [ + { + "$id": "7090", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7091", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7092", + "type": { + "$id": "7093", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7094", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7095", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7096", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "7097", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "7098", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7099", + "name": "operationId", + "nameInRequest": "operationId", + "doc": "operation identifier.", + "type": { + "$id": "7100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7101", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7102", + "kind": "constant", + "valueType": { + "$id": "7103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7104", + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + }, + { + "$id": "7105", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7106", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "7108", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId}", + "bufferResponse": true, + "longRunning": { + "$id": "7109", + "finalStateVia": 1, + "finalResponse": { + "$id": "7110", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResults.get", + "decorators": [], + "examples": [ + { + "$id": "7111", + "kind": "http", + "name": "Get long running operation result", + "description": "Get long running operation result", + "filePath": "2025-03-01-preview/OperationResultsGet_example.json", + "parameters": [ + { + "$id": "7112", + "parameter": { + "$ref": "7094" + }, + "value": { + "$id": "7113", + "kind": "string", + "type": { + "$ref": "7095" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "7114", + "parameter": { + "$ref": "7096" + }, + "value": { + "$id": "7115", + "kind": "string", + "type": { + "$ref": "7097" + }, + "value": "eastus" + } + }, + { + "$id": "7116", + "parameter": { + "$ref": "7090" + }, + "value": { + "$id": "7117", + "kind": "string", + "type": { + "$ref": "7091" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7118", + "parameter": { + "$ref": "7099" + }, + "value": { + "$id": "7119", + "kind": "string", + "type": { + "$ref": "7100" + }, + "value": "00000000-0000-0000-0000-000000001234" + } + } + ], + "responses": [ + { + "$id": "7120", + "response": { + "$ref": "7104" + }, + "statusCode": 200 + }, + { + "$id": "7121", + "response": { + "$ref": "7105" + }, + "statusCode": 202 + }, + { + "$id": "7122", + "response": { + "$ref": "7108" + }, + "statusCode": 204 + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "7123", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "7124", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "7125", + "type": { + "$id": "7126", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResults", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + }, + { + "$id": "7127", + "kind": "client", + "name": "OperationStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "operations": [ + { + "$id": "7128", + "name": "get", + "resourceName": "OperationStatus", + "summary": "Get long running operation status.", + "doc": "Get long running operation status.", + "accessibility": "public", + "parameters": [ + { + "$id": "7129", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7130", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7131", + "type": { + "$id": "7132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7133", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7135", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "7136", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "7137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7138", + "name": "operationId", + "nameInRequest": "operationId", + "doc": "operation identifier.", + "type": { + "$id": "7139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7140", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7141", + "kind": "constant", + "valueType": { + "$id": "7142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7143", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "2329" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationStatus.get", + "decorators": [], + "examples": [ + { + "$id": "7144", + "kind": "http", + "name": "Error response describing why the operation failed.", + "description": "Error response describing why the operation failed.", + "filePath": "2025-03-01-preview/OperationStatusFailed_example.json", + "parameters": [ + { + "$id": "7145", + "parameter": { + "$ref": "7133" + }, + "value": { + "$id": "7146", + "kind": "string", + "type": { + "$ref": "7134" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "7147", + "parameter": { + "$ref": "7135" + }, + "value": { + "$id": "7148", + "kind": "string", + "type": { + "$ref": "7136" + }, + "value": "eastus" + } + }, + { + "$id": "7149", + "parameter": { + "$ref": "7129" + }, + "value": { + "$id": "7150", + "kind": "string", + "type": { + "$ref": "7130" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7151", + "parameter": { + "$ref": "7138" + }, + "value": { + "$id": "7152", + "kind": "string", + "type": { + "$ref": "7139" + }, + "value": "00000000-0000-0000-0000-000000001234" + } + } + ], + "responses": [ + { + "$id": "7153", + "response": { + "$ref": "7143" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7154", + "kind": "model", + "type": { + "$ref": "2329" + }, + "value": { + "$id": "7155", + "name": { + "$id": "7156", + "kind": "string", + "type": { + "$ref": "2331" + }, + "value": "00000000-0000-0000-0000-000000001234" + }, + "startTime": { + "$id": "7157", + "kind": "string", + "type": { + "$ref": "2335" + }, + "value": "2022-01-03T23:58:02.2501337Z" + }, + "endTime": { + "$id": "7158", + "kind": "string", + "type": { + "$ref": "2340" + }, + "value": "2022-01-04T00:13:03.2790951Z" + }, + "percentComplete": { + "$id": "7159", + "kind": "number", + "type": { + "$ref": "2345" + }, + "value": 100 + }, + "status": { + "$id": "7160", + "kind": "string", + "type": { + "$ref": "2349" + }, + "value": "Failed" + }, + "error": { + "$id": "7161", + "kind": "model", + "type": { + "$ref": "2353" + }, + "value": { + "$id": "7162", + "code": { + "$id": "7163", + "kind": "string", + "type": { + "$ref": "2355" + }, + "value": "-2146233029" + }, + "message": { + "$id": "7164", + "kind": "string", + "type": { + "$ref": "2359" + }, + "value": "A task was canceled." + } + } + } + } + } + } + ] + }, + { + "$id": "7165", + "kind": "http", + "name": "OK. The request has succeeded.", + "description": "OK. The request has succeeded.", + "filePath": "2025-03-01-preview/OperationStatusSucceeded_example.json", + "parameters": [ + { + "$id": "7166", + "parameter": { + "$ref": "7133" + }, + "value": { + "$id": "7167", + "kind": "string", + "type": { + "$ref": "7134" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "7168", + "parameter": { + "$ref": "7135" + }, + "value": { + "$id": "7169", + "kind": "string", + "type": { + "$ref": "7136" + }, + "value": "eastus" + } + }, + { + "$id": "7170", + "parameter": { + "$ref": "7129" + }, + "value": { + "$id": "7171", + "kind": "string", + "type": { + "$ref": "7130" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7172", + "parameter": { + "$ref": "7138" + }, + "value": { + "$id": "7173", + "kind": "string", + "type": { + "$ref": "7139" + }, + "value": "00000000-0000-0000-0000-000000001234" + } + } + ], + "responses": [ + { + "$id": "7174", + "response": { + "$ref": "7143" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7175", + "kind": "model", + "type": { + "$ref": "2329" + }, + "value": { + "$id": "7176", + "name": { + "$id": "7177", + "kind": "string", + "type": { + "$ref": "2331" + }, + "value": "00000000-0000-0000-0000-000000001234" + }, + "startTime": { + "$id": "7178", + "kind": "string", + "type": { + "$ref": "2335" + }, + "value": "2022-01-03T23:58:02.2501337Z" + }, + "endTime": { + "$id": "7179", + "kind": "string", + "type": { + "$ref": "2340" + }, + "value": "2022-01-04T00:13:03.2790951Z" + }, + "percentComplete": { + "$id": "7180", + "kind": "number", + "type": { + "$ref": "2345" + }, + "value": 100 + }, + "status": { + "$id": "7181", + "kind": "string", + "type": { + "$ref": "2349" + }, + "value": "Succeeded" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "7182", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "7183", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "7184", + "type": { + "$id": "7185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationStatus", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2364" + } + } + ] + } + ], + "auth": { + "$id": "7186", + "oAuth2": { + "$id": "7187", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..6d83bf7eebb6 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -9,9 +9,17 @@ trigger: paths: include: - sdk/storage/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/