diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/Azure.ResourceManager.Contoso.sln b/sdk/contoso/Azure.ResourceManager.Contoso/Azure.ResourceManager.Contoso.sln new file mode 100644 index 000000000000..cb820959e5b2 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/Azure.ResourceManager.Contoso.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.Contoso.Samples", "samples\Azure.ResourceManager.Contoso.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Contoso", "src\Azure.ResourceManager.Contoso.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Contoso.Tests", "tests\Azure.ResourceManager.Contoso.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/contoso/Azure.ResourceManager.Contoso/CHANGELOG.md b/sdk/contoso/Azure.ResourceManager.Contoso/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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/contoso/Azure.ResourceManager.Contoso/Directory.Build.props b/sdk/contoso/Azure.ResourceManager.Contoso/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/README.md b/sdk/contoso/Azure.ResourceManager.Contoso/README.md new file mode 100644 index 000000000000..78ea67f6bbf0 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure Contoso 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 Contoso management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.Contoso --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/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.net8.0.cs b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.net8.0.cs new file mode 100644 index 000000000000..e066d059b9ab --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.net8.0.cs @@ -0,0 +1,131 @@ +namespace Azure.ResourceManager.Contoso +{ + public static partial class ContosoExtensions + { + public static Azure.Response GetEmployee(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEmployeeAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEmployees(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEmployeesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EmployeeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EmployeeCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string employeeName, 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 employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string employeeName, 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 EmployeeData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmployeeData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Contoso.Models.EmployeeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData 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.Contoso.EmployeeData 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 EmployeeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EmployeeResource() { } + public virtual Azure.ResourceManager.Contoso.EmployeeData 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 employeeName) { 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.Contoso.EmployeeData 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.Contoso.EmployeeData 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.Response Update(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Contoso.Mocking +{ + public partial class MockableContosoArmClient : Azure.ResourceManager.ArmResource + { + protected MockableContosoArmClient() { } + public virtual Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableContosoResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableContosoResourceGroupResource() { } + public virtual Azure.Response GetEmployee(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEmployeeAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees() { throw null; } + } + public partial class MockableContosoSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableContosoSubscriptionResource() { } + public virtual Azure.Pageable GetEmployees(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEmployeesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Contoso.Models +{ + public static partial class ArmContosoModelFactory + { + public static Azure.ResourceManager.Contoso.EmployeeData EmployeeData(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.Contoso.Models.EmployeeProperties properties = null) { throw null; } + public static Azure.ResourceManager.Contoso.Models.EmployeeProperties EmployeeProperties(int? age = default(int?), string city = null, byte[] profile = null, Azure.ResourceManager.Contoso.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Contoso.Models.ProvisioningState?)) { throw null; } + } + public partial class EmployeeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmployeeProperties() { } + public int? Age { get { throw null; } set { } } + public string City { get { throw null; } set { } } + public byte[] Profile { get { throw null; } set { } } + public Azure.ResourceManager.Contoso.Models.ProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.Models.EmployeeProperties 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.Contoso.Models.EmployeeProperties 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.Contoso.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Contoso.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.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Contoso.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.netstandard2.0.cs b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.netstandard2.0.cs new file mode 100644 index 000000000000..e066d059b9ab --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.netstandard2.0.cs @@ -0,0 +1,131 @@ +namespace Azure.ResourceManager.Contoso +{ + public static partial class ContosoExtensions + { + public static Azure.Response GetEmployee(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEmployeeAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEmployees(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEmployeesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EmployeeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EmployeeCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string employeeName, 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 employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string employeeName, 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 EmployeeData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmployeeData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Contoso.Models.EmployeeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData 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.Contoso.EmployeeData 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 EmployeeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EmployeeResource() { } + public virtual Azure.ResourceManager.Contoso.EmployeeData 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 employeeName) { 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.Contoso.EmployeeData 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.Contoso.EmployeeData 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.Response Update(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Contoso.Mocking +{ + public partial class MockableContosoArmClient : Azure.ResourceManager.ArmResource + { + protected MockableContosoArmClient() { } + public virtual Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableContosoResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableContosoResourceGroupResource() { } + public virtual Azure.Response GetEmployee(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEmployeeAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees() { throw null; } + } + public partial class MockableContosoSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableContosoSubscriptionResource() { } + public virtual Azure.Pageable GetEmployees(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEmployeesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Contoso.Models +{ + public static partial class ArmContosoModelFactory + { + public static Azure.ResourceManager.Contoso.EmployeeData EmployeeData(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.Contoso.Models.EmployeeProperties properties = null) { throw null; } + public static Azure.ResourceManager.Contoso.Models.EmployeeProperties EmployeeProperties(int? age = default(int?), string city = null, byte[] profile = null, Azure.ResourceManager.Contoso.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Contoso.Models.ProvisioningState?)) { throw null; } + } + public partial class EmployeeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmployeeProperties() { } + public int? Age { get { throw null; } set { } } + public string City { get { throw null; } set { } } + public byte[] Profile { get { throw null; } set { } } + public Azure.ResourceManager.Contoso.Models.ProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.Models.EmployeeProperties 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.Contoso.Models.EmployeeProperties 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.Contoso.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Contoso.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.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Contoso.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/assets.json b/sdk/contoso/Azure.ResourceManager.Contoso/assets.json new file mode 100644 index 000000000000..ed7bbd7af63d --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/contoso/Azure.ResourceManager.Contoso", + "Tag": "" +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Azure.ResourceManager.Contoso.Samples.csproj b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Azure.ResourceManager.Contoso.Samples.csproj new file mode 100644 index 000000000000..e1423e416b0f --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Azure.ResourceManager.Contoso.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeCollection.cs b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeCollection.cs new file mode 100644 index 000000000000..5d6930e24057 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeCollection.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Contoso.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Contoso.Samples +{ + public partial class Sample_EmployeeCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_EmployeesCreateOrUpdate() + { + // Generated from example definition: 2021-11-01/Employees_CreateOrUpdate.json + // this example is just showing the usage of "Employee_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 = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation + string employeeName = "9KF-f-8b"; + EmployeeData data = new EmployeeData(new AzureLocation("itajgxyqozseoygnl")) + { + Properties = new EmployeeProperties + { + Age = 30, + City = "gydhnntudughbmxlkyzrskcdkotrxn", + Profile = Encoding.UTF8.GetBytes("ms"), + }, + Tags = +{ +["key2913"] = "urperxmkkhhkp" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, employeeName, data); + EmployeeResource 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 + EmployeeData 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_EmployeesGet() + { + // Generated from example definition: 2021-11-01/Employees_Get.json + // this example is just showing the usage of "Employee_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 = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation + string employeeName = "le-8MU--J3W6q8D386p3-iT3"; + EmployeeResource result = await collection.GetAsync(employeeName); + + // 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 + EmployeeData 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_EmployeesListByResourceGroup() + { + // Generated from example definition: 2021-11-01/Employees_ListByResourceGroup.json + // this example is just showing the usage of "Employee_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 = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation and iterate over the result + await foreach (EmployeeResource 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 + EmployeeData 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_EmployeesGet() + { + // Generated from example definition: 2021-11-01/Employees_Get.json + // this example is just showing the usage of "Employee_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 = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation + string employeeName = "le-8MU--J3W6q8D386p3-iT3"; + bool result = await collection.ExistsAsync(employeeName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_EmployeesGet() + { + // Generated from example definition: 2021-11-01/Employees_Get.json + // this example is just showing the usage of "Employee_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 = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation + string employeeName = "le-8MU--J3W6q8D386p3-iT3"; + NullableResponse response = await collection.GetIfExistsAsync(employeeName); + EmployeeResource 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 + EmployeeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeResource.cs new file mode 100644 index 000000000000..da147009f1d0 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeResource.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Contoso.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Contoso.Samples +{ + public partial class Sample_EmployeeResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EmployeesGet() + { + // Generated from example definition: 2021-11-01/Employees_Get.json + // this example is just showing the usage of "Employee_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 EmployeeResource created on azure + // for more information of creating EmployeeResource, please refer to the document of EmployeeResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + string employeeName = "le-8MU--J3W6q8D386p3-iT3"; + ResourceIdentifier employeeResourceId = EmployeeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, employeeName); + EmployeeResource employee = client.GetEmployeeResource(employeeResourceId); + + // invoke the operation + EmployeeResource result = await employee.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 + EmployeeData 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_EmployeesDelete() + { + // Generated from example definition: 2021-11-01/Employees_Delete.json + // this example is just showing the usage of "Employee_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 EmployeeResource created on azure + // for more information of creating EmployeeResource, please refer to the document of EmployeeResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + string employeeName = "5vX--BxSu3ux48rI4O9OQ569"; + ResourceIdentifier employeeResourceId = EmployeeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, employeeName); + EmployeeResource employee = client.GetEmployeeResource(employeeResourceId); + + // invoke the operation + await employee.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_EmployeesUpdate() + { + // Generated from example definition: 2021-11-01/Employees_Update.json + // this example is just showing the usage of "Employee_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 EmployeeResource created on azure + // for more information of creating EmployeeResource, please refer to the document of EmployeeResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + string employeeName = "-XhyNJ--"; + ResourceIdentifier employeeResourceId = EmployeeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, employeeName); + EmployeeResource employee = client.GetEmployeeResource(employeeResourceId); + + // invoke the operation + EmployeeData data = new EmployeeData(default) + { + Properties = new EmployeeProperties + { + Age = 24, + City = "uyfg", + Profile = Encoding.UTF8.GetBytes("oapgijcswfkruiuuzbwco"), + }, + Tags = +{ +["key7952"] = "no" +}, + }; + EmployeeResource result = await employee.UpdateAsync(data); + + // 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 + EmployeeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..62db2b6f5e75 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetEmployees_EmployeesListBySubscription() + { + // Generated from example definition: 2021-11-01/Employees_ListBySubscription.json + // this example is just showing the usage of "Employee_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 = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (EmployeeResource item in subscriptionResource.GetEmployeesAsync()) + { + // 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 + EmployeeData 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/contoso/Azure.ResourceManager.Contoso/src/Azure.ResourceManager.Contoso.csproj b/sdk/contoso/Azure.ResourceManager.Contoso/src/Azure.ResourceManager.Contoso.csproj new file mode 100644 index 000000000000..2755628805d0 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Azure.ResourceManager.Contoso.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider Contoso. + 1.0.0-beta.1 + azure;management;arm;resource manager;contoso + Azure.ResourceManager.Contoso + + diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ArmContosoModelFactory.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ArmContosoModelFactory.cs new file mode 100644 index 000000000000..836b121b3967 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ArmContosoModelFactory.cs @@ -0,0 +1,54 @@ +// 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.Contoso.Models +{ + /// Model factory for models. + public static partial class ArmContosoModelFactory + { + /// 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 EmployeeData EmployeeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EmployeeProperties properties = null) + { + tags ??= new Dictionary(); + + return new EmployeeData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Age of employee. + /// City of employee. + /// Profile of employee. + /// The status of the last operation. + /// A new instance for mocking. + public static EmployeeProperties EmployeeProperties(int? age = null, string city = null, byte[] profile = null, ProvisioningState? provisioningState = null) + { + return new EmployeeProperties(age, city, profile, provisioningState, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeCollection.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeCollection.cs new file mode 100644 index 000000000000..6fead5174202 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeCollection.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.Contoso +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEmployees method from an instance of . + /// + public partial class EmployeeCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _employeeClientDiagnostics; + private readonly EmployeesRestOperations _employeeRestClient; + + /// Initializes a new instance of the class for mocking. + protected EmployeeCollection() + { + } + + /// 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 EmployeeCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _employeeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Contoso", EmployeeResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EmployeeResource.ResourceType, out string employeeApiVersion); + _employeeRestClient = new EmployeesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, employeeApiVersion); +#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 Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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 name of the Employee. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _employeeRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, data, cancellationToken).ConfigureAwait(false); + var operation = new ContosoArmOperation(new EmployeeOperationSource(Client), _employeeClientDiagnostics, Pipeline, _employeeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, employeeName, 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 Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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 name of the Employee. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _employeeRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, employeeName, data, cancellationToken); + var operation = new ContosoArmOperation(new EmployeeOperationSource(Client), _employeeClientDiagnostics, Pipeline, _employeeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, employeeName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Get"); + scope.Start(); + try + { + var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Get"); + scope.Start(); + try + { + var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Employee resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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) => _employeeRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _employeeRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), _employeeClientDiagnostics, Pipeline, "EmployeeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Employee resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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) => _employeeRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _employeeRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), _employeeClientDiagnostics, Pipeline, "EmployeeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Exists"); + scope.Start(); + try + { + var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Exists"); + scope.Start(); + try + { + var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, employeeName, 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.GetIfExists"); + scope.Start(); + try + { + var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(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/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.Serialization.cs new file mode 100644 index 000000000000..6f63d6c28ea4 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.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.Contoso.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Contoso +{ + public partial class EmployeeData : 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(EmployeeData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + EmployeeData 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(EmployeeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEmployeeData(document.RootElement, options); + } + + internal static EmployeeData DeserializeEmployeeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EmployeeProperties 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 = EmployeeProperties.DeserializeEmployeeProperties(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 EmployeeData( + 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(EmployeeData)} does not support writing '{options.Format}' format."); + } + } + + EmployeeData 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 DeserializeEmployeeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EmployeeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.cs new file mode 100644 index 000000000000..081bdf1fe2c7 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.cs @@ -0,0 +1,83 @@ +// 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.Contoso.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Contoso +{ + /// + /// A class representing the Employee data model. + /// Employee resource + /// + public partial class EmployeeData : 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 EmployeeData(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 EmployeeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EmployeeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EmployeeData() + { + } + + /// The resource-specific properties for this resource. + public EmployeeProperties Properties { get; set; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.Serialization.cs new file mode 100644 index 000000000000..9ba6d75f170e --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.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.Contoso +{ + public partial class EmployeeResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EmployeeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + EmployeeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.cs new file mode 100644 index 000000000000..d09c19428c4c --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.cs @@ -0,0 +1,698 @@ +// 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.Resources; + +namespace Azure.ResourceManager.Contoso +{ + /// + /// A Class representing an Employee along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEmployeeResource method. + /// Otherwise you can get one from its parent resource using the GetEmployee method. + /// + public partial class EmployeeResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The employeeName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string employeeName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _employeeClientDiagnostics; + private readonly EmployeesRestOperations _employeeRestClient; + private readonly EmployeeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Contoso/employees"; + + /// Initializes a new instance of the class for mocking. + protected EmployeeResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EmployeeResource(ArmClient client, EmployeeData 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 EmployeeResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _employeeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Contoso", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string employeeApiVersion); + _employeeRestClient = new EmployeesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, employeeApiVersion); +#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 EmployeeData 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 Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Get"); + scope.Start(); + try + { + var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Get"); + scope.Start(); + try + { + var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Delete + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.Delete"); + scope.Start(); + try + { + var response = await _employeeRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ContosoArmOperation(_employeeClientDiagnostics, Pipeline, _employeeRestClient.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 Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Delete + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.Delete"); + scope.Start(); + try + { + var response = _employeeRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ContosoArmOperation(_employeeClientDiagnostics, Pipeline, _employeeRestClient.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 Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Update + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Update"); + scope.Start(); + try + { + var response = await _employeeRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Update + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Update"); + scope.Start(); + try + { + var response = _employeeRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.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 _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EmployeeData(current.Location); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.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 = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EmployeeData(current.Location); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.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 _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EmployeeData(current.Location); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.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 = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EmployeeData(current.Location); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.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 _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EmployeeData(current.Location); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.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 = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EmployeeData(current.Location); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/ContosoExtensions.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/ContosoExtensions.cs new file mode 100644 index 000000000000..3e8c2e0d8d70 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/ContosoExtensions.cs @@ -0,0 +1,219 @@ +// 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.Contoso.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Contoso +{ + /// A class to add extension methods to Azure.ResourceManager.Contoso. + public static partial class ContosoExtensions + { + private static MockableContosoArmClient GetMockableContosoArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableContosoArmClient(client0)); + } + + private static MockableContosoResourceGroupResource GetMockableContosoResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableContosoResourceGroupResource(client, resource.Id)); + } + + private static MockableContosoSubscriptionResource GetMockableContosoSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableContosoSubscriptionResource(client, resource.Id)); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an 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 EmployeeResource GetEmployeeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContosoArmClient(client).GetEmployeeResource(id); + } + + /// + /// Gets a collection of EmployeeResources 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 EmployeeResources and their operations over a EmployeeResource. + public static EmployeeCollection GetEmployees(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableContosoResourceGroupResource(resourceGroupResource).GetEmployees(); + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Employee. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetEmployeeAsync(this ResourceGroupResource resourceGroupResource, string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableContosoResourceGroupResource(resourceGroupResource).GetEmployeeAsync(employeeName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Employee. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetEmployee(this ResourceGroupResource resourceGroupResource, string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableContosoResourceGroupResource(resourceGroupResource).GetEmployee(employeeName, cancellationToken); + } + + /// + /// List Employee resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListBySubscription + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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 GetEmployeesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableContosoSubscriptionResource(subscriptionResource).GetEmployeesAsync(cancellationToken); + } + + /// + /// List Employee resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListBySubscription + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// 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 GetEmployees(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableContosoSubscriptionResource(subscriptionResource).GetEmployees(cancellationToken); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoArmClient.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoArmClient.cs new file mode 100644 index 000000000000..9dd8be4758d4 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoArmClient.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.Contoso.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableContosoArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableContosoArmClient() + { + } + + /// 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 MockableContosoArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableContosoArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual EmployeeResource GetEmployeeResource(ResourceIdentifier id) + { + EmployeeResource.ValidateResourceId(id); + return new EmployeeResource(Client, id); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoResourceGroupResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoResourceGroupResource.cs new file mode 100644 index 000000000000..a4c47d382ed8 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoResourceGroupResource.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.Contoso.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableContosoResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableContosoResourceGroupResource() + { + } + + /// 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 MockableContosoResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of EmployeeResources in the ResourceGroupResource. + /// An object representing collection of EmployeeResources and their operations over a EmployeeResource. + public virtual EmployeeCollection GetEmployees() + { + return GetCachedClient(client => new EmployeeCollection(client, Id)); + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEmployeeAsync(string employeeName, CancellationToken cancellationToken = default) + { + return await GetEmployees().GetAsync(employeeName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEmployee(string employeeName, CancellationToken cancellationToken = default) + { + return GetEmployees().Get(employeeName, cancellationToken); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoSubscriptionResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoSubscriptionResource.cs new file mode 100644 index 000000000000..6a116f9716a3 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoSubscriptionResource.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.Contoso.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableContosoSubscriptionResource : ArmResource + { + private ClientDiagnostics _employeeClientDiagnostics; + private EmployeesRestOperations _employeeRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableContosoSubscriptionResource() + { + } + + /// 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 MockableContosoSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics EmployeeClientDiagnostics => _employeeClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Contoso", EmployeeResource.ResourceType.Namespace, Diagnostics); + private EmployeesRestOperations EmployeeRestClient => _employeeRestClient ??= new EmployeesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EmployeeResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List Employee resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListBySubscription + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetEmployeesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EmployeeRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EmployeeRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), EmployeeClientDiagnostics, Pipeline, "MockableContosoSubscriptionResource.GetEmployees", "value", "nextLink", cancellationToken); + } + + /// + /// List Employee resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListBySubscription + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetEmployees(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EmployeeRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EmployeeRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), EmployeeClientDiagnostics, Pipeline, "MockableContosoSubscriptionResource.GetEmployees", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Argument.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..b146fadb7828 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..c2b481265f05 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingList.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..28e10b878f86 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..5b13d8c23e13 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Optional.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..3d6bd293a801 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..50d04f500cd4 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperation.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperation.cs new file mode 100644 index 000000000000..2badd30f1f7b --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperation.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.Contoso +{ +#pragma warning disable SA1649 // File name should match first type name + internal class ContosoArmOperation : 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 ContosoArmOperation for mocking. + protected ContosoArmOperation() + { + } + + internal ContosoArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal ContosoArmOperation(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, "ContosoArmOperation", 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/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperationOfT.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperationOfT.cs new file mode 100644 index 000000000000..4b59643530b2 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperationOfT.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.Contoso +{ +#pragma warning disable SA1649 // File name should match first type name + internal class ContosoArmOperation : 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 ContosoArmOperation for mocking. + protected ContosoArmOperation() + { + } + + internal ContosoArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal ContosoArmOperation(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, "ContosoArmOperation", 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/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/EmployeeOperationSource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/EmployeeOperationSource.cs new file mode 100644 index 000000000000..40897fe08bcb --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/EmployeeOperationSource.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.Contoso +{ + internal class EmployeeOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EmployeeOperationSource(ArmClient client) + { + _client = client; + } + + EmployeeResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new EmployeeResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new EmployeeResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.Serialization.cs new file mode 100644 index 000000000000..5a1ac3f3643f --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.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.Contoso.Models +{ + internal partial class EmployeeListResult : 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(EmployeeListResult)} 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 + } + } + } + + EmployeeListResult 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(EmployeeListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEmployeeListResult(document.RootElement, options); + } + + internal static EmployeeListResult DeserializeEmployeeListResult(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(EmployeeData.DeserializeEmployeeData(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 EmployeeListResult(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(EmployeeListResult)} does not support writing '{options.Format}' format."); + } + } + + EmployeeListResult 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 DeserializeEmployeeListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EmployeeListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.cs new file mode 100644 index 000000000000..f40f6693d057 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.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.Contoso.Models +{ + /// The response of a Employee list operation. + internal partial class EmployeeListResult + { + /// + /// 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 Employee items on this page. + /// is null. + internal EmployeeListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Employee items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal EmployeeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EmployeeListResult() + { + } + + /// The Employee items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.Serialization.cs new file mode 100644 index 000000000000..5c469fe54d30 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.Serialization.cs @@ -0,0 +1,174 @@ +// 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.Contoso.Models +{ + public partial class EmployeeProperties : 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(EmployeeProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Age)) + { + writer.WritePropertyName("age"u8); + writer.WriteNumberValue(Age.Value); + } + if (Optional.IsDefined(City)) + { + writer.WritePropertyName("city"u8); + writer.WriteStringValue(City); + } + if (Optional.IsDefined(Profile)) + { + writer.WritePropertyName("profile"u8); + writer.WriteBase64StringValue(Profile, "U"); + } + 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 + } + } + } + + EmployeeProperties 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(EmployeeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEmployeeProperties(document.RootElement, options); + } + + internal static EmployeeProperties DeserializeEmployeeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? age = default; + string city = default; + byte[] profile = default; + ProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("age"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + age = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("city"u8)) + { + city = property.Value.GetString(); + continue; + } + if (property.NameEquals("profile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + profile = property.Value.GetBytesFromBase64("U"); + continue; + } + 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 EmployeeProperties(age, city, profile, 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(EmployeeProperties)} does not support writing '{options.Format}' format."); + } + } + + EmployeeProperties 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 DeserializeEmployeeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EmployeeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.cs new file mode 100644 index 000000000000..f17e5ee5c7df --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.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.Contoso.Models +{ + /// Employee properties. + public partial class EmployeeProperties + { + /// + /// 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 EmployeeProperties() + { + } + + /// Initializes a new instance of . + /// Age of employee. + /// City of employee. + /// Profile of employee. + /// The status of the last operation. + /// Keeps track of any properties unknown to the library. + internal EmployeeProperties(int? age, string city, byte[] profile, ProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Age = age; + City = city; + Profile = profile; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Age of employee. + public int? Age { get; set; } + /// City of employee. + public string City { get; set; } + /// Profile of employee. + public byte[] Profile { get; set; } + /// The status of the last operation. + public ProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/ProvisioningState.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..3b650fd30ca1 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso.Models +{ + /// The resource provisioning state. + 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); + /// The resource is being provisioned. + public static ProvisioningState Provisioning { get; } = new ProvisioningState(ProvisioningValue); + /// The resource is updating. + public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); + /// The resource is being deleted. + public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); + /// The resource create request 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/contoso/Azure.ResourceManager.Contoso/src/Generated/ProviderConstants.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..58224a637312 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/RestOperations/EmployeesRestOperations.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/RestOperations/EmployeesRestOperations.cs new file mode 100644 index 000000000000..b13e791dc40f --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/RestOperations/EmployeesRestOperations.cs @@ -0,0 +1,731 @@ +// 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.Contoso.Models; + +namespace Azure.ResourceManager.Contoso +{ + internal partial class EmployeesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of EmployeesRestOperations. + /// 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 EmployeesRestOperations(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 ?? "2021-11-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string employeeName) + { + 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string employeeName) + { + 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// 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 employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, employeeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EmployeeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeData.DeserializeEmployeeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EmployeeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// 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 employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, employeeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EmployeeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeData.DeserializeEmployeeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EmployeeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string employeeName, EmployeeData 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string employeeName, EmployeeData 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.Contoso/employees/", false); + uri.AppendPath(employeeName, 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 Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, employeeName, 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 Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, employeeName, 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 employeeName, EmployeeData 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string employeeName, EmployeeData data) + { + 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.Contoso/employees/", false); + uri.AppendPath(employeeName, 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; + } + + /// Update a Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, employeeName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EmployeeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeData.DeserializeEmployeeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, employeeName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EmployeeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeData.DeserializeEmployeeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string employeeName) + { + 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string employeeName) + { + 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// 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 employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, employeeName); + 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 Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// 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 employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, employeeName); + _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.Contoso/employees", 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.Contoso/employees", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Employee 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: + { + EmployeeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Employee 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: + { + EmployeeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeListResult.DeserializeEmployeeListResult(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.Contoso/employees", 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.Contoso/employees", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Employee 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: + { + EmployeeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Employee 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: + { + EmployeeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, 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 Employee 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: + { + EmployeeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Employee 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: + { + EmployeeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeListResult.DeserializeEmployeeListResult(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 Employee 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: + { + EmployeeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Employee 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: + { + EmployeeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Properties/AssemblyInfo.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..113b6ed3d98f --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso.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("Contoso")] diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/tests/Azure.ResourceManager.Contoso.Tests.csproj b/sdk/contoso/Azure.ResourceManager.Contoso/tests/Azure.ResourceManager.Contoso.Tests.csproj new file mode 100644 index 000000000000..4b906ef77fda --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/tests/Azure.ResourceManager.Contoso.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestBase.cs b/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestBase.cs new file mode 100644 index 000000000000..77599a7902fe --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestBase.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.Contoso.Tests +{ + public class ContosoManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected ContosoManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected ContosoManagementTestBase(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/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestEnvironment.cs b/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestEnvironment.cs new file mode 100644 index 000000000000..b1c4c91e35b3 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.Contoso.Tests +{ + public class ContosoManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/tsp-location.yaml b/sdk/contoso/Azure.ResourceManager.Contoso/tsp-location.yaml new file mode 100644 index 000000000000..b236f304d160 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/contosowidgetmanager/Contoso.Management +commit: 52befba8c7bd801268a6dad2dc44f062d045f74a +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/contoso/ci.mgmt.yml b/sdk/contoso/ci.mgmt.yml new file mode 100644 index 000000000000..3485a663b46d --- /dev/null +++ b/sdk/contoso/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/contoso /ci.mgmt.yml + - sdk/contoso /Azure.ResourceManager.Contoso / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: contoso + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.Contoso + safeName: AzureResourceManagerContoso diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/Configuration.json b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/Configuration.json new file mode 100644 index 000000000000..dc18213719b4 --- /dev/null +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "library-name": "Azure.ResourceManager.HealthDataAIServices", + "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" + ], + "azure-arm": true +} diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tsp-location.yaml b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tsp-location.yaml index 9eea9922a67b..a10b06ce800e 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tsp-location.yaml +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/healthdataaiservices/HealthDataAIServices.Management -commit: b0a48bcbffead733affe03944ef09f5e8d12f8c8 +commit: 52befba8c7bd801268a6dad2dc44f062d045f74a repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tspCodeModel.json b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tspCodeModel.json new file mode 100644 index 000000000000..77ed07859e0a --- /dev/null +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tspCodeModel.json @@ -0,0 +1,11702 @@ +{ + "$id": "1", + "name": "Microsoft.HealthDataAIServices", + "apiVersions": [ + "2024-09-20" + ], + "enums": [ + { + "$id": "2", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "10", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "12", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "10" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "14", + "kind": "enum", + "name": "HealthDataAIServicesProvisioningState", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.ProvisioningState", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "22", + "kind": "enumvalue", + "name": "Provisioning", + "value": "Provisioning", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The resource is being provisioned.", + "decorators": [] + }, + { + "$id": "24", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The resource is being updated.", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The resource is being deleted.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Accepted", + "value": "Accepted", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The resource provisioning request has been accepted.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "The status of the current operation.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "30", + "kind": "enum", + "name": "PrivateEndpointServiceConnectionStatus", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointServiceConnectionStatus", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "32", + "kind": "enumvalue", + "name": "Pending", + "value": "Pending", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Connectionaiting for approval or rejection", + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "Approved", + "value": "Approved", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Connection approved", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Rejected", + "value": "Rejected", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Connection Rejected", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "The private endpoint connection status.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "38", + "kind": "enum", + "name": "PrivateEndpointConnectionProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProvisioningState", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "40", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Connection has been provisioned", + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Connection is being created", + "decorators": [] + }, + { + "$id": "44", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Connection is being deleted", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Connection provisioning has failed", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "The current provisioning state.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "48", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "50", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "54", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "58", + "kind": "enum", + "name": "HealthDataAIServicesPublicNetworkAccess", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PublicNetworkAccess", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "60", + "kind": "enumvalue", + "name": "Enabled", + "value": "Enabled", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "The public network access is enabled", + "decorators": [] + }, + { + "$id": "62", + "kind": "enumvalue", + "name": "Disabled", + "value": "Disabled", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "The public network access is disabled", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "State of the public network access.", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "64", + "kind": "enum", + "name": "ManagedServiceIdentityType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "66", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "No managed identity.", + "decorators": [] + }, + { + "$id": "68", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "System assigned managed identity.", + "decorators": [] + }, + { + "$id": "70", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "User assigned managed identity.", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "SystemAssigned,UserAssigned", + "value": "SystemAssigned,UserAssigned", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "System and user assigned managed identity.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "74", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "76", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "78", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "80", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "82", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.Versions", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "84", + "kind": "enumvalue", + "name": "v2024_09_20", + "value": "2024-09-20", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "doc": "The 2024-09-20 version.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "Supported API versions for the Microsoft.HealthDataAIServices resource provider.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "86", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "decorators": [], + "properties": [ + { + "$id": "87", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "88", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "89", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "90", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name", + "serializationOptions": { + "$id": "92", + "json": { + "$id": "93", + "name": "name" + } + } + }, + { + "$id": "94", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", + "type": { + "$id": "95", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction", + "serializationOptions": { + "$id": "96", + "json": { + "$id": "97", + "name": "isDataAction" + } + } + }, + { + "$id": "98", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "99", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "100", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider", + "serializationOptions": { + "$id": "102", + "json": { + "$id": "103", + "name": "provider" + } + } + }, + { + "$id": "104", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource", + "serializationOptions": { + "$id": "106", + "json": { + "$id": "107", + "name": "resource" + } + } + }, + { + "$id": "108", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation", + "serializationOptions": { + "$id": "110", + "json": { + "$id": "111", + "name": "operation" + } + } + }, + { + "$id": "112", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", + "serializationOptions": { + "$id": "114", + "json": { + "$id": "115", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "116", + "json": { + "$id": "117", + "name": "display" + } + } + }, + { + "$id": "118", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", + "serializationOptions": { + "$id": "119", + "json": { + "$id": "120", + "name": "origin" + } + } + }, + { + "$id": "121", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "10" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", + "serializationOptions": { + "$id": "122", + "json": { + "$id": "123", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "124", + "json": { + "$id": "125", + "name": "value" + } + } + }, + { + "$id": "126", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "127", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "128", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink", + "serializationOptions": { + "$id": "129", + "json": { + "$id": "130", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "89" + }, + { + "$ref": "99" + }, + { + "$id": "131", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": "132", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "133", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "134", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "135", + "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": "136", + "json": { + "$id": "137", + "name": "code" + } + } + }, + { + "$id": "138", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "139", + "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": "140", + "json": { + "$id": "141", + "name": "message" + } + } + }, + { + "$id": "142", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "143", + "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": "144", + "json": { + "$id": "145", + "name": "target" + } + } + }, + { + "$id": "146", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "147", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "133" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "148", + "json": { + "$id": "149", + "name": "details" + } + } + }, + { + "$id": "150", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "151", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "152", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "153", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "154", + "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": "155", + "json": { + "$id": "156", + "name": "type" + } + } + }, + { + "$id": "157", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "158", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": "159", + "json": { + "$id": "160", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "161", + "json": { + "$id": "162", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "163", + "json": { + "$id": "164", + "name": "error" + } + } + } + ] + }, + { + "$ref": "133" + }, + { + "$ref": "152" + }, + { + "$ref": "158" + }, + { + "$id": "165", + "kind": "model", + "name": "DeidService", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidService", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A HealthDataAIServicesProviderHub resource", + "decorators": [], + "baseModel": { + "$id": "166", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": { + "$id": "167", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": "168", + "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": "169", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "$id": "171", + "json": { + "$id": "172", + "name": "id" + } + } + }, + { + "$id": "173", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "174", + "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": "175", + "json": { + "$id": "176", + "name": "name" + } + } + }, + { + "$id": "177", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "178", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "179", + "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": "180", + "json": { + "$id": "181", + "name": "type" + } + } + }, + { + "$id": "182", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "183", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "184", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "185", + "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": "186", + "json": { + "$id": "187", + "name": "createdBy" + } + } + }, + { + "$id": "188", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "48" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "189", + "json": { + "$id": "190", + "name": "createdByType" + } + } + }, + { + "$id": "191", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "192", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "193", + "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": "194", + "json": { + "$id": "195", + "name": "createdAt" + } + } + }, + { + "$id": "196", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "197", + "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": "198", + "json": { + "$id": "199", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "200", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "48" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "201", + "json": { + "$id": "202", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "203", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "204", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "205", + "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": "206", + "json": { + "$id": "207", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "208", + "json": { + "$id": "209", + "name": "systemData" + } + } + } + ] + }, + "properties": [ + { + "$id": "210", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "211", + "kind": "dict", + "keyType": { + "$id": "212", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "213", + "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": "214", + "json": { + "$id": "215", + "name": "tags" + } + } + }, + { + "$id": "216", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "217", + "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": "218", + "json": { + "$id": "219", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "220", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "221", + "kind": "model", + "name": "DeidServiceProperties", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Details of the HealthDataAIServices DeidService.", + "decorators": [], + "properties": [ + { + "$id": "222", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties.provisioningState", + "serializationOptions": { + "$id": "223", + "json": { + "$id": "224", + "name": "provisioningState" + } + } + }, + { + "$id": "225", + "kind": "property", + "name": "serviceUrl", + "serializedName": "serviceUrl", + "doc": "Deid service url.", + "type": { + "$id": "226", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties.serviceUrl", + "serializationOptions": { + "$id": "227", + "json": { + "$id": "228", + "name": "serviceUrl" + } + } + }, + { + "$id": "229", + "kind": "property", + "name": "privateEndpointConnections", + "serializedName": "privateEndpointConnections", + "doc": "List of private endpoint connections.", + "type": { + "$id": "230", + "kind": "array", + "name": "ArrayPrivateEndpointConnection", + "valueType": { + "$id": "231", + "kind": "model", + "name": "PrivateEndpointConnection", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnection", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The private endpoint connection resource", + "decorators": [], + "baseModel": { + "$ref": "167" + }, + "properties": [ + { + "$id": "232", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The private endpoint connection properties", + "type": { + "$id": "233", + "kind": "model", + "name": "PrivateEndpointConnectionProperties", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Properties of the private endpoint connection.", + "decorators": [], + "properties": [ + { + "$id": "234", + "kind": "property", + "name": "groupIds", + "serializedName": "groupIds", + "doc": "The group ids for the private endpoint resource.", + "type": { + "$id": "235", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.groupIds", + "serializationOptions": { + "$id": "237", + "json": { + "$id": "238", + "name": "groupIds" + } + } + }, + { + "$id": "239", + "kind": "property", + "name": "privateEndpoint", + "serializedName": "privateEndpoint", + "doc": "The private endpoint resource.", + "type": { + "$id": "240", + "kind": "model", + "name": "PrivateEndpoint", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpoint", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The Private Endpoint resource.", + "decorators": [], + "properties": [ + { + "$id": "241", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The resource identifier for private endpoint", + "type": { + "$id": "242", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpoint.id", + "serializationOptions": { + "$id": "244", + "json": { + "$id": "245", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.privateEndpoint", + "serializationOptions": { + "$id": "246", + "json": { + "$id": "247", + "name": "privateEndpoint" + } + } + }, + { + "$id": "248", + "kind": "property", + "name": "privateLinkServiceConnectionState", + "serializedName": "privateLinkServiceConnectionState", + "doc": "A collection of information about the state of the connection between service consumer and provider.", + "type": { + "$id": "249", + "kind": "model", + "name": "PrivateLinkServiceConnectionState", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A collection of information about the state of the connection between service consumer and provider.", + "decorators": [], + "properties": [ + { + "$id": "250", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.", + "type": { + "$ref": "30" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState.status", + "serializationOptions": { + "$id": "251", + "json": { + "$id": "252", + "name": "status" + } + } + }, + { + "$id": "253", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The reason for approval/rejection of the connection.", + "type": { + "$id": "254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState.description", + "serializationOptions": { + "$id": "255", + "json": { + "$id": "256", + "name": "description" + } + } + }, + { + "$id": "257", + "kind": "property", + "name": "actionsRequired", + "serializedName": "actionsRequired", + "doc": "A message indicating if changes on the service provider require any updates on the consumer.", + "type": { + "$id": "258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState.actionsRequired", + "serializationOptions": { + "$id": "259", + "json": { + "$id": "260", + "name": "actionsRequired" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.privateLinkServiceConnectionState", + "serializationOptions": { + "$id": "261", + "json": { + "$id": "262", + "name": "privateLinkServiceConnectionState" + } + } + }, + { + "$id": "263", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state of the private endpoint connection resource.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.provisioningState", + "serializationOptions": { + "$id": "264", + "json": { + "$id": "265", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnection.properties", + "serializationOptions": { + "$id": "266", + "json": { + "$id": "267", + "name": "properties" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties.privateEndpointConnections", + "serializationOptions": { + "$id": "268", + "json": { + "$id": "269", + "name": "privateEndpointConnections" + } + } + }, + { + "$id": "270", + "kind": "property", + "name": "publicNetworkAccess", + "serializedName": "publicNetworkAccess", + "doc": "Gets or sets allow or disallow public network access to resource", + "type": { + "$ref": "58" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties.publicNetworkAccess", + "serializationOptions": { + "$id": "271", + "json": { + "$id": "272", + "name": "publicNetworkAccess" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidService.properties", + "serializationOptions": { + "$id": "273", + "json": { + "$id": "274", + "name": "properties" + } + } + }, + { + "$id": "275", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the deid service", + "type": { + "$id": "276", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidService.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "277", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$id": "278", + "kind": "model", + "name": "ManagedServiceIdentity", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Managed service identity (system assigned and/or user assigned identities)", + "decorators": [], + "properties": [ + { + "$id": "279", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "280", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.principalId", + "serializationOptions": { + "$id": "282", + "json": { + "$id": "283", + "name": "principalId" + } + } + }, + { + "$id": "284", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "285", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.tenantId", + "serializationOptions": { + "$id": "287", + "json": { + "$id": "288", + "name": "tenantId" + } + } + }, + { + "$id": "289", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "64" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.type", + "serializationOptions": { + "$id": "290", + "json": { + "$id": "291", + "name": "type" + } + } + }, + { + "$id": "292", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "293", + "kind": "dict", + "keyType": { + "$id": "294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "295", + "kind": "nullable", + "type": { + "$id": "296", + "kind": "model", + "name": "UserAssignedIdentity", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity properties", + "decorators": [], + "properties": [ + { + "$id": "297", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client ID of the assigned identity.", + "type": { + "$id": "298", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.clientId", + "serializationOptions": { + "$id": "300", + "json": { + "$id": "301", + "name": "clientId" + } + } + }, + { + "$id": "302", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal ID of the assigned identity.", + "type": { + "$id": "303", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.principalId", + "serializationOptions": { + "$id": "305", + "json": { + "$id": "306", + "name": "principalId" + } + } + } + ] + }, + "namespace": "Azure.ResourceManager.HealthDataAIServices" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "307", + "json": { + "$id": "308", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidService.identity", + "serializationOptions": { + "$id": "309", + "json": { + "$id": "310", + "name": "identity" + } + } + } + ] + }, + { + "$ref": "221" + }, + { + "$ref": "231" + }, + { + "$ref": "233" + }, + { + "$ref": "240" + }, + { + "$ref": "249" + }, + { + "$ref": "167" + }, + { + "$ref": "183" + }, + { + "$ref": "278" + }, + { + "$ref": "296" + }, + { + "$ref": "166" + }, + { + "$id": "311", + "kind": "model", + "name": "DeidServiceListResult", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a DeidService list operation.", + "decorators": [], + "properties": [ + { + "$id": "312", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The DeidService items on this page", + "type": { + "$id": "313", + "kind": "array", + "name": "ArrayDeidService", + "valueType": { + "$ref": "165" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "314", + "json": { + "$id": "315", + "name": "value" + } + } + }, + { + "$id": "316", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "317", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "318", + "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": "319", + "json": { + "$id": "320", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "321", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "322", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "74" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "323", + "json": { + "$id": "324", + "name": "status" + } + } + }, + { + "$id": "325", + "kind": "path", + "name": "id", + "serializedName": "id", + "doc": "The unique identifier for the operationStatus resource", + "type": { + "$id": "326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.id", + "discriminator": false, + "flatten": false + }, + { + "$id": "327", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "328", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "329", + "json": { + "$id": "330", + "name": "name" + } + } + }, + { + "$id": "331", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "332", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "333", + "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": "334", + "json": { + "$id": "335", + "name": "startTime" + } + } + }, + { + "$id": "336", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "337", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "338", + "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": "339", + "json": { + "$id": "340", + "name": "endTime" + } + } + }, + { + "$id": "341", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "342", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "343", + "json": { + "$id": "344", + "name": "percentComplete" + } + } + }, + { + "$id": "345", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "133" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "346", + "json": { + "$id": "347", + "name": "error" + } + } + } + ] + }, + { + "$id": "348", + "kind": "model", + "name": "DeidUpdate", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidUpdate", + "usage": "Input,Json", + "doc": "Patch request body for DeidService", + "decorators": [], + "properties": [ + { + "$id": "349", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "350", + "kind": "dict", + "keyType": { + "$id": "351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidUpdate.tags", + "serializationOptions": { + "$id": "353", + "json": { + "$id": "354", + "name": "tags" + } + } + }, + { + "$id": "355", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "Updatable managed service identity", + "type": { + "$id": "356", + "kind": "model", + "name": "ManagedServiceIdentityUpdate", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.ManagedServiceIdentityUpdate", + "usage": "Input,Json", + "doc": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "357", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "64" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.ManagedServiceIdentityUpdate.type", + "serializationOptions": { + "$id": "358", + "json": { + "$id": "359", + "name": "type" + } + } + }, + { + "$id": "360", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "361", + "kind": "dict", + "keyType": { + "$id": "362", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "295" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.ManagedServiceIdentityUpdate.userAssignedIdentities", + "serializationOptions": { + "$id": "363", + "json": { + "$id": "364", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidUpdate.identity", + "serializationOptions": { + "$id": "365", + "json": { + "$id": "366", + "name": "identity" + } + } + }, + { + "$id": "367", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "RP-specific properties", + "type": { + "$id": "368", + "kind": "model", + "name": "DeidPropertiesUpdate", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidPropertiesUpdate", + "usage": "Input,Json", + "doc": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "369", + "kind": "property", + "name": "publicNetworkAccess", + "serializedName": "publicNetworkAccess", + "doc": "Gets or sets allow or disallow public network access to resource", + "type": { + "$ref": "58" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidPropertiesUpdate.publicNetworkAccess", + "serializationOptions": { + "$id": "370", + "json": { + "$id": "371", + "name": "publicNetworkAccess" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidUpdate.properties", + "serializationOptions": { + "$id": "372", + "json": { + "$id": "373", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "356" + }, + { + "$ref": "368" + }, + { + "$id": "374", + "kind": "model", + "name": "HealthDataAIServicesPrivateEndpointConnectionResource", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnectionResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Holder for private endpoint connections", + "decorators": [], + "baseModel": { + "$id": "375", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": { + "$ref": "167" + }, + "properties": [] + }, + "properties": [ + { + "$id": "376", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$ref": "233" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnectionResource.properties", + "serializationOptions": { + "$id": "377", + "json": { + "$id": "378", + "name": "properties" + } + } + }, + { + "$id": "379", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the private endpoint connection associated with the Azure resource.", + "type": { + "$id": "380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnectionResource.name", + "discriminator": false, + "flatten": false + } + ] + }, + { + "$ref": "375" + }, + { + "$id": "381", + "kind": "model", + "name": "PrivateEndpointConnectionResourceListResult", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a PrivateEndpointConnectionResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "382", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The PrivateEndpointConnectionResource items on this page", + "type": { + "$id": "383", + "kind": "array", + "name": "ArrayPrivateEndpointConnectionResource", + "valueType": { + "$ref": "374" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "384", + "json": { + "$id": "385", + "name": "value" + } + } + }, + { + "$id": "386", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "387", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "388", + "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": "389", + "json": { + "$id": "390", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "391", + "kind": "model", + "name": "PrivateLinkResourceListResult", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a PrivateLinkResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "392", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The PrivateLinkResource items on this page", + "type": { + "$id": "393", + "kind": "array", + "name": "ArrayPrivateLinkResource", + "valueType": { + "$id": "394", + "kind": "model", + "name": "PrivateLinkResource", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinkResource", + "usage": "Output,Json", + "doc": "Private Links for DeidService resource", + "decorators": [], + "baseModel": { + "$ref": "375" + }, + "properties": [ + { + "$id": "395", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "396", + "kind": "model", + "name": "PrivateLinkResourceProperties", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties", + "usage": "Output,Json", + "doc": "Properties of a private link resource.", + "decorators": [], + "properties": [ + { + "$id": "397", + "kind": "property", + "name": "groupId", + "serializedName": "groupId", + "doc": "The private link resource group id.", + "type": { + "$id": "398", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties.groupId", + "serializationOptions": { + "$id": "399", + "json": { + "$id": "400", + "name": "groupId" + } + } + }, + { + "$id": "401", + "kind": "property", + "name": "requiredMembers", + "serializedName": "requiredMembers", + "doc": "The private link resource required member names.", + "type": { + "$id": "402", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties.requiredMembers", + "serializationOptions": { + "$id": "404", + "json": { + "$id": "405", + "name": "requiredMembers" + } + } + }, + { + "$id": "406", + "kind": "property", + "name": "requiredZoneNames", + "serializedName": "requiredZoneNames", + "doc": "The private link resource private link DNS zone name.", + "type": { + "$id": "407", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "408", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties.requiredZoneNames", + "serializationOptions": { + "$id": "409", + "json": { + "$id": "410", + "name": "requiredZoneNames" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinkResource.properties", + "serializationOptions": { + "$id": "411", + "json": { + "$id": "412", + "name": "properties" + } + } + }, + { + "$id": "413", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the private link associated with the Azure resource.", + "type": { + "$id": "414", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinkResource.name", + "discriminator": false, + "flatten": false + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "415", + "json": { + "$id": "416", + "name": "value" + } + } + }, + { + "$id": "417", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "418", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "419", + "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": "420", + "json": { + "$id": "421", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "394" + }, + { + "$ref": "396" + } + ], + "clients": [ + { + "$id": "422", + "kind": "client", + "name": "HealthDataAIServicesClient", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "methods": [], + "parameters": [ + { + "$id": "423", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "424", + "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": "425", + "type": { + "$id": "426", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "427", + "name": "TypeSpec.@service", + "arguments": { + "$id": "428", + "options": { + "$id": "429", + "title": "Microsoft.HealthDataAIServices" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "children": [ + { + "$id": "430", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "methods": [ + { + "$id": "431", + "kind": "paging", + "name": "list", + "accessibility": "internal", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "doc": "List the operations for the provider", + "operation": { + "$id": "432", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "internal", + "parameters": [ + { + "$id": "433", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "434", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "435", + "type": { + "$id": "436", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "437", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "438", + "kind": "constant", + "valueType": { + "$id": "439", + "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": "440", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "86" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.HealthDataAIServices/operations", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "441", + "kind": "http", + "name": "Operations_List_MaximumSet - generated by [MaximumSet] rule. [stable]", + "description": "Operations_List_MaximumSet - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/Operations_List_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "442", + "parameter": { + "$ref": "433" + }, + "value": { + "$id": "443", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "2024-09-20" + } + } + ], + "responses": [ + { + "$id": "444", + "response": { + "$ref": "440" + }, + "statusCode": 200, + "bodyValue": { + "$id": "445", + "kind": "model", + "type": { + "$ref": "86" + }, + "value": { + "$id": "446", + "value": { + "$id": "447", + "kind": "array", + "type": { + "$ref": "88" + }, + "value": [ + { + "$id": "448", + "kind": "model", + "type": { + "$ref": "89" + }, + "value": { + "$id": "449", + "name": { + "$id": "450", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "vlozcqymdxttexvmhouwzob" + }, + "isDataAction": { + "$id": "451", + "kind": "boolean", + "type": { + "$ref": "95" + }, + "value": true + }, + "display": { + "$id": "452", + "kind": "model", + "type": { + "$ref": "99" + }, + "value": { + "$id": "453", + "provider": { + "$id": "454", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "hwy" + }, + "resource": { + "$id": "455", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "yxabgnzjshmqldqthxonpam" + }, + "operation": { + "$id": "456", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "quwaawjasjgpqhskxoxzx" + }, + "description": { + "$id": "457", + "kind": "string", + "type": { + "$ref": "113" + }, + "value": "ayqiodducsbwvzcgno" + } + } + }, + "origin": { + "$id": "458", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user" + }, + "actionType": { + "$id": "459", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "Internal" + } + } + } + ] + }, + "nextLink": { + "$id": "460", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + }, + { + "$id": "461", + "kind": "http", + "name": "Operations_List_MinimumSet - generated by [MinimumSet] rule. [stable]", + "description": "Operations_List_MinimumSet - generated by [MinimumSet] rule. [stable]", + "filePath": "2024-09-20/Operations_List_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "462", + "parameter": { + "$ref": "433" + }, + "value": { + "$id": "463", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "2024-09-20" + } + } + ], + "responses": [ + { + "$id": "464", + "response": { + "$ref": "440" + }, + "statusCode": 200, + "bodyValue": { + "$id": "465", + "kind": "model", + "type": { + "$ref": "86" + }, + "value": { + "$id": "466" + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "467", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "438" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "468", + "type": { + "$id": "469", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$ref": "89" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "pagingMetadata": { + "$id": "470", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "471", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ + { + "$id": "472", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "473", + "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": "474", + "type": { + "$id": "475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.Operations", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "parent": { + "$ref": "422" + } + }, + { + "$id": "476", + "kind": "client", + "name": "DeidServices", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "methods": [ + { + "$id": "477", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "doc": "Get a DeidService", + "operation": { + "$id": "478", + "name": "get", + "resourceName": "DeidService", + "doc": "Get a DeidService", + "accessibility": "public", + "parameters": [ + { + "$id": "479", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "481", + "type": { + "$id": "482", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "483", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "484", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "486", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "487", + "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": "488", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "489", + "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": "490", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "491", + "kind": "constant", + "valueType": { + "$id": "492", + "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": "493", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "165" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.get", + "decorators": [], + "examples": [ + { + "$id": "494", + "kind": "http", + "name": "DeidServices_Get - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_Get - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "495", + "parameter": { + "$ref": "479" + }, + "value": { + "$id": "496", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "2024-09-20" + } + }, + { + "$id": "497", + "parameter": { + "$ref": "483" + }, + "value": { + "$id": "498", + "kind": "string", + "type": { + "$ref": "484" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "499", + "parameter": { + "$ref": "486" + }, + "value": { + "$id": "500", + "kind": "string", + "type": { + "$ref": "487" + }, + "value": "rgopenapi" + } + }, + { + "$id": "501", + "parameter": { + "$ref": "488" + }, + "value": { + "$id": "502", + "kind": "string", + "type": { + "$ref": "489" + }, + "value": "deidTest" + } + } + ], + "responses": [ + { + "$id": "503", + "response": { + "$ref": "493" + }, + "statusCode": 200, + "bodyValue": { + "$id": "504", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "505", + "properties": { + "$id": "506", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "507", + "provisioningState": { + "$id": "508", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "publicNetworkAccess": { + "$id": "509", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + }, + "privateEndpointConnections": { + "$id": "510", + "kind": "array", + "type": { + "$ref": "230" + }, + "value": [ + { + "$id": "511", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "512", + "properties": { + "$id": "513", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "514", + "privateEndpoint": { + "$id": "515", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "516", + "id": { + "$id": "517", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "518", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "519", + "status": { + "$id": "520", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "521", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "522", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "ddxuoved" + } + } + }, + "groupIds": { + "$id": "523", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "524", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "525", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "526", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "527", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "528", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "529", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "530", + "createdBy": { + "$id": "531", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "532", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "533", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "534", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "535", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "536", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "serviceUrl": { + "$id": "537", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + } + } + }, + "identity": { + "$id": "538", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "539", + "type": { + "$id": "540", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "541", + "kind": "dict", + "type": { + "$ref": "293" + }, + "value": { + "$id": "542" + } + }, + "principalId": { + "$id": "543", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "544", + "kind": "string", + "type": { + "$ref": "285" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + } + } + }, + "tags": { + "$id": "545", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "546" + } + }, + "location": { + "$id": "547", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "548", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "549", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "550", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "551", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "552", + "createdBy": { + "$id": "553", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "554", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "555", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "556", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "557", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "558", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "559", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "560", + "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": "561", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "562", + "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": "563", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "491" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "564", + "type": { + "$ref": "165" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.get" + }, + { + "$id": "565", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "doc": "List DeidService resources by resource group", + "operation": { + "$id": "566", + "name": "listByResourceGroup", + "resourceName": "DeidService", + "doc": "List DeidService resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "567", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "568", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "569", + "type": { + "$id": "570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "571", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "572", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "574", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "575", + "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": "576", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "577", + "kind": "constant", + "valueType": { + "$id": "578", + "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": "579", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "311" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "580", + "kind": "http", + "name": "DeidServices_ListByResourceGroup - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_ListByResourceGroup - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "581", + "parameter": { + "$ref": "567" + }, + "value": { + "$id": "582", + "kind": "string", + "type": { + "$ref": "568" + }, + "value": "2024-09-20" + } + }, + { + "$id": "583", + "parameter": { + "$ref": "571" + }, + "value": { + "$id": "584", + "kind": "string", + "type": { + "$ref": "572" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "585", + "parameter": { + "$ref": "574" + }, + "value": { + "$id": "586", + "kind": "string", + "type": { + "$ref": "575" + }, + "value": "rgopenapi" + } + } + ], + "responses": [ + { + "$id": "587", + "response": { + "$ref": "579" + }, + "statusCode": 200, + "bodyValue": { + "$id": "588", + "kind": "model", + "type": { + "$ref": "311" + }, + "value": { + "$id": "589", + "value": { + "$id": "590", + "kind": "array", + "type": { + "$ref": "313" + }, + "value": [ + { + "$id": "591", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "592", + "properties": { + "$id": "593", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "594", + "provisioningState": { + "$id": "595", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "serviceUrl": { + "$id": "596", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + }, + "privateEndpointConnections": { + "$id": "597", + "kind": "array", + "type": { + "$ref": "230" + }, + "value": [ + { + "$id": "598", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "599", + "properties": { + "$id": "600", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "601", + "groupIds": { + "$id": "602", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "603", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "privateEndpoint": { + "$id": "604", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "605", + "id": { + "$id": "606", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "607", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "608", + "status": { + "$id": "609", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "610", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "611", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "ro" + } + } + }, + "provisioningState": { + "$id": "612", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "613", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "614", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "615", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "616", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "617", + "createdBy": { + "$id": "618", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "619", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "620", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "621", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "622", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "623", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "publicNetworkAccess": { + "$id": "624", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + } + } + }, + "identity": { + "$id": "625", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "626", + "principalId": { + "$id": "627", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "628", + "kind": "string", + "type": { + "$ref": "285" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + }, + "type": { + "$id": "629", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "630", + "kind": "dict", + "type": { + "$ref": "293" + }, + "value": { + "$id": "631" + } + } + } + }, + "tags": { + "$id": "632", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "633" + } + }, + "location": { + "$id": "634", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "635", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "636", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "637", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "638", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "639", + "createdBy": { + "$id": "640", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "641", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "642", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "643", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "644", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "645", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "646", + "kind": "string", + "type": { + "$ref": "317" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "647", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "648", + "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": "649", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "577" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "650", + "type": { + "$id": "651", + "kind": "array", + "name": "ArrayDeidService", + "valueType": { + "$ref": "165" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.listByResourceGroup", + "pagingMetadata": { + "$id": "652", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "653", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + }, + { + "$id": "654", + "kind": "paging", + "name": "listBySubscription", + "accessibility": "public", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "doc": "List DeidService resources by subscription ID", + "operation": { + "$id": "655", + "name": "listBySubscription", + "resourceName": "DeidService", + "doc": "List DeidService resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "656", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "658", + "type": { + "$id": "659", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "660", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "661", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "663", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "664", + "kind": "constant", + "valueType": { + "$id": "665", + "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": "666", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "311" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.HealthDataAIServices/deidServices", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "667", + "kind": "http", + "name": "DeidServices_ListBySubscription - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_ListBySubscription - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_ListBySubscription_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "668", + "parameter": { + "$ref": "656" + }, + "value": { + "$id": "669", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "2024-09-20" + } + }, + { + "$id": "670", + "parameter": { + "$ref": "660" + }, + "value": { + "$id": "671", + "kind": "string", + "type": { + "$ref": "661" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + } + ], + "responses": [ + { + "$id": "672", + "response": { + "$ref": "666" + }, + "statusCode": 200, + "bodyValue": { + "$id": "673", + "kind": "model", + "type": { + "$ref": "311" + }, + "value": { + "$id": "674", + "value": { + "$id": "675", + "kind": "array", + "type": { + "$ref": "313" + }, + "value": [ + { + "$id": "676", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "677", + "properties": { + "$id": "678", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "679", + "provisioningState": { + "$id": "680", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "serviceUrl": { + "$id": "681", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + }, + "privateEndpointConnections": { + "$id": "682", + "kind": "array", + "type": { + "$ref": "230" + }, + "value": [ + { + "$id": "683", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "684", + "properties": { + "$id": "685", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "686", + "groupIds": { + "$id": "687", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "688", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "privateEndpoint": { + "$id": "689", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "690", + "id": { + "$id": "691", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "692", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "693", + "status": { + "$id": "694", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "695", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "696", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "ro" + } + } + }, + "provisioningState": { + "$id": "697", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "698", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "699", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "700", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "701", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "702", + "createdBy": { + "$id": "703", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "704", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "705", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "706", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "707", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "708", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "publicNetworkAccess": { + "$id": "709", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + } + } + }, + "identity": { + "$id": "710", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "711", + "principalId": { + "$id": "712", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "713", + "kind": "string", + "type": { + "$ref": "285" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + }, + "type": { + "$id": "714", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "715", + "kind": "dict", + "type": { + "$ref": "293" + }, + "value": { + "$id": "716" + } + } + } + }, + "tags": { + "$id": "717", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "718" + } + }, + "location": { + "$id": "719", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "720", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "721", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "722", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "723", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "724", + "createdBy": { + "$id": "725", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "726", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "727", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "728", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "729", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "730", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "731", + "kind": "string", + "type": { + "$ref": "317" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "732", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "664" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "733", + "type": { + "$id": "734", + "kind": "array", + "name": "ArrayDeidService", + "valueType": { + "$ref": "165" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.listBySubscription", + "pagingMetadata": { + "$id": "735", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "736", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + }, + { + "$id": "737", + "kind": "lro", + "name": "create", + "accessibility": "public", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "doc": "Create a DeidService", + "operation": { + "$id": "738", + "name": "create", + "resourceName": "DeidService", + "doc": "Create a DeidService", + "accessibility": "public", + "parameters": [ + { + "$id": "739", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "740", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "741", + "type": { + "$id": "742", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "743", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "744", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "746", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "747", + "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": "748", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "749", + "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": "750", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "751", + "kind": "constant", + "valueType": { + "$id": "752", + "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": "753", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "754", + "kind": "constant", + "valueType": { + "$id": "755", + "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": "756", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "165" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "757", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "165" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "758", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "165" + }, + "headers": [ + { + "$id": "759", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "761", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "762", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.create", + "decorators": [], + "examples": [ + { + "$id": "763", + "kind": "http", + "name": "DeidServices_Create - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_Create - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_Create_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "764", + "parameter": { + "$ref": "739" + }, + "value": { + "$id": "765", + "kind": "string", + "type": { + "$ref": "740" + }, + "value": "2024-09-20" + } + }, + { + "$id": "766", + "parameter": { + "$ref": "743" + }, + "value": { + "$id": "767", + "kind": "string", + "type": { + "$ref": "744" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "768", + "parameter": { + "$ref": "746" + }, + "value": { + "$id": "769", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "rgopenapi" + } + }, + { + "$id": "770", + "parameter": { + "$ref": "748" + }, + "value": { + "$id": "771", + "kind": "string", + "type": { + "$ref": "749" + }, + "value": "deidTest" + } + }, + { + "$id": "772", + "parameter": { + "$ref": "756" + }, + "value": { + "$id": "773", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "774", + "properties": { + "$id": "775", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "776", + "publicNetworkAccess": { + "$id": "777", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + } + } + }, + "identity": { + "$id": "778", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "779", + "type": { + "$id": "780", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "781", + "kind": "dict", + "type": { + "$ref": "293" + }, + "value": { + "$id": "782" + } + } + } + }, + "tags": { + "$id": "783", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "784" + } + }, + "location": { + "$id": "785", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + } + } + } + } + ], + "responses": [ + { + "$id": "786", + "response": { + "$ref": "757" + }, + "statusCode": 200, + "bodyValue": { + "$id": "787", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "788", + "properties": { + "$id": "789", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "790", + "provisioningState": { + "$id": "791", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "publicNetworkAccess": { + "$id": "792", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + }, + "privateEndpointConnections": { + "$id": "793", + "kind": "array", + "type": { + "$ref": "230" + }, + "value": [ + { + "$id": "794", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "795", + "properties": { + "$id": "796", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "797", + "privateEndpoint": { + "$id": "798", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "799", + "id": { + "$id": "800", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "801", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "802", + "status": { + "$id": "803", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "804", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "805", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "ddxuoved" + } + } + }, + "groupIds": { + "$id": "806", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "807", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "808", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "809", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "810", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "811", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "812", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "813", + "createdBy": { + "$id": "814", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "815", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "816", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "817", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "818", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "819", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "serviceUrl": { + "$id": "820", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + } + } + }, + "identity": { + "$id": "821", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "822", + "type": { + "$id": "823", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "824", + "kind": "dict", + "type": { + "$ref": "293" + }, + "value": { + "$id": "825" + } + }, + "principalId": { + "$id": "826", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "827", + "kind": "string", + "type": { + "$ref": "285" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + } + } + }, + "tags": { + "$id": "828", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "829" + } + }, + "location": { + "$id": "830", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "831", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "832", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "833", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "834", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "835", + "createdBy": { + "$id": "836", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "837", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "838", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "839", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "840", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "841", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + }, + { + "$id": "842", + "response": { + "$ref": "758" + }, + "statusCode": 201, + "bodyValue": { + "$id": "843", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "844", + "properties": { + "$id": "845", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "846", + "provisioningState": { + "$id": "847", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "publicNetworkAccess": { + "$id": "848", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + }, + "privateEndpointConnections": { + "$id": "849", + "kind": "array", + "type": { + "$ref": "230" + }, + "value": [ + { + "$id": "850", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "851", + "properties": { + "$id": "852", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "853", + "privateEndpoint": { + "$id": "854", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "855", + "id": { + "$id": "856", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "857", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "858", + "status": { + "$id": "859", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "860", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "861", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "ddxuoved" + } + } + }, + "groupIds": { + "$id": "862", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "863", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "864", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "865", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "866", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "867", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "868", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "869", + "createdBy": { + "$id": "870", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "871", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "872", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "873", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "874", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "875", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "serviceUrl": { + "$id": "876", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + } + } + }, + "identity": { + "$id": "877", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "878", + "type": { + "$id": "879", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "880", + "kind": "dict", + "type": { + "$ref": "293" + }, + "value": { + "$id": "881" + } + }, + "principalId": { + "$id": "882", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "883", + "kind": "string", + "type": { + "$ref": "285" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + } + } + }, + "tags": { + "$id": "884", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "885" + } + }, + "location": { + "$id": "886", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "887", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "888", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "889", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "890", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "891", + "createdBy": { + "$id": "892", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "893", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "894", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "895", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "896", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "897", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "898", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "899", + "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": "900", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "901", + "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": "902", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "165" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "903", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "904", + "kind": "constant", + "valueType": { + "$id": "905", + "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": "906", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "907", + "kind": "constant", + "valueType": { + "$id": "908", + "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 + } + ], + "response": { + "$id": "909", + "type": { + "$ref": "165" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.create", + "lroMetadata": { + "$id": "910", + "finalStateVia": 0, + "finalResponse": { + "$id": "911", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "165" + } + } + } + }, + { + "$id": "912", + "kind": "lro", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "doc": "Update a DeidService", + "operation": { + "$id": "913", + "name": "update", + "resourceName": "DeidService", + "doc": "Update a DeidService", + "accessibility": "public", + "parameters": [ + { + "$id": "914", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "915", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "916", + "type": { + "$id": "917", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "918", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "919", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "921", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "922", + "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": "923", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "924", + "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": "925", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "926", + "kind": "constant", + "valueType": { + "$id": "927", + "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": "928", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "929", + "kind": "constant", + "valueType": { + "$id": "930", + "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": "931", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "348" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "932", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "165" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "933", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "934", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "935", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "936", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "937", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.update", + "decorators": [], + "examples": [ + { + "$id": "938", + "kind": "http", + "name": "DeidServices_Update - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_Update - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_Update_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "939", + "parameter": { + "$ref": "914" + }, + "value": { + "$id": "940", + "kind": "string", + "type": { + "$ref": "915" + }, + "value": "2024-09-20" + } + }, + { + "$id": "941", + "parameter": { + "$ref": "918" + }, + "value": { + "$id": "942", + "kind": "string", + "type": { + "$ref": "919" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "943", + "parameter": { + "$ref": "921" + }, + "value": { + "$id": "944", + "kind": "string", + "type": { + "$ref": "922" + }, + "value": "rgopenapi" + } + }, + { + "$id": "945", + "parameter": { + "$ref": "923" + }, + "value": { + "$id": "946", + "kind": "string", + "type": { + "$ref": "924" + }, + "value": "deidTest" + } + }, + { + "$id": "947", + "parameter": { + "$ref": "931" + }, + "value": { + "$id": "948", + "kind": "model", + "type": { + "$ref": "348" + }, + "value": { + "$id": "949", + "identity": { + "$id": "950", + "kind": "model", + "type": { + "$ref": "356" + }, + "value": { + "$id": "951", + "type": { + "$id": "952", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "953", + "kind": "dict", + "type": { + "$ref": "361" + }, + "value": { + "$id": "954" + } + } + } + }, + "tags": { + "$id": "955", + "kind": "dict", + "type": { + "$ref": "350" + }, + "value": { + "$id": "956" + } + }, + "properties": { + "$id": "957", + "kind": "model", + "type": { + "$ref": "368" + }, + "value": { + "$id": "958", + "publicNetworkAccess": { + "$id": "959", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "960", + "response": { + "$ref": "932" + }, + "statusCode": 200, + "bodyValue": { + "$id": "961", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "962", + "properties": { + "$id": "963", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "964", + "provisioningState": { + "$id": "965", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "publicNetworkAccess": { + "$id": "966", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + }, + "privateEndpointConnections": { + "$id": "967", + "kind": "array", + "type": { + "$ref": "230" + }, + "value": [ + { + "$id": "968", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "969", + "properties": { + "$id": "970", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "971", + "privateEndpoint": { + "$id": "972", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "973", + "id": { + "$id": "974", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "975", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "976", + "status": { + "$id": "977", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "978", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "979", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "ddxuoved" + } + } + }, + "groupIds": { + "$id": "980", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "981", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "982", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "983", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "984", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "985", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "986", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "987", + "createdBy": { + "$id": "988", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "989", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "990", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "991", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "992", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "993", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "serviceUrl": { + "$id": "994", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + } + } + }, + "identity": { + "$id": "995", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "996", + "type": { + "$id": "997", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "998", + "kind": "dict", + "type": { + "$ref": "293" + }, + "value": { + "$id": "999" + } + }, + "principalId": { + "$id": "1000", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "1001", + "kind": "string", + "type": { + "$ref": "285" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + } + } + }, + "tags": { + "$id": "1002", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "1003" + } + }, + "location": { + "$id": "1004", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "1005", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "1006", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "1007", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "1008", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "1009", + "createdBy": { + "$id": "1010", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "1011", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "1012", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1013", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1014", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1015", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + }, + { + "$id": "1016", + "response": { + "$ref": "933" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1017", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1018", + "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": "1019", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1020", + "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": "1021", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "348" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1022", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1023", + "kind": "constant", + "valueType": { + "$id": "1024", + "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": "1025", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "1026", + "kind": "constant", + "valueType": { + "$id": "1027", + "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 + } + ], + "response": { + "$id": "1028", + "type": { + "$ref": "165" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.update", + "lroMetadata": { + "$id": "1029", + "finalStateVia": 1, + "finalResponse": { + "$id": "1030", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "165" + } + } + } + }, + { + "$id": "1031", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "doc": "Delete a DeidService", + "operation": { + "$id": "1032", + "name": "delete", + "resourceName": "DeidService", + "doc": "Delete a DeidService", + "accessibility": "public", + "parameters": [ + { + "$id": "1033", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1035", + "type": { + "$id": "1036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1037", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1038", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1039", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1040", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1041", + "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": "1042", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1043", + "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": "1044", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1045", + "kind": "constant", + "valueType": { + "$id": "1046", + "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": "1047", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "1048", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1049", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1050", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1051", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "1052", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.delete", + "decorators": [], + "examples": [ + { + "$id": "1053", + "kind": "http", + "name": "DeidServices_Delete - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_Delete - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1054", + "parameter": { + "$ref": "1033" + }, + "value": { + "$id": "1055", + "kind": "string", + "type": { + "$ref": "1034" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1056", + "parameter": { + "$ref": "1037" + }, + "value": { + "$id": "1057", + "kind": "string", + "type": { + "$ref": "1038" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1058", + "parameter": { + "$ref": "1040" + }, + "value": { + "$id": "1059", + "kind": "string", + "type": { + "$ref": "1041" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1060", + "parameter": { + "$ref": "1042" + }, + "value": { + "$id": "1061", + "kind": "string", + "type": { + "$ref": "1043" + }, + "value": "deidTest" + } + } + ], + "responses": [ + { + "$id": "1062", + "response": { + "$ref": "1047" + }, + "statusCode": 202 + }, + { + "$id": "1063", + "response": { + "$ref": "1052" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1064", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1065", + "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": "1066", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1067", + "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": "1068", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "1069", + "kind": "constant", + "valueType": { + "$id": "1070", + "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 + } + ], + "response": { + "$id": "1071" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.delete", + "lroMetadata": { + "$id": "1072", + "finalStateVia": 1, + "finalResponse": { + "$id": "1073", + "statusCodes": [ + 204 + ] + } + } + } + ], + "parameters": [ + { + "$id": "1074", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1075", + "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": "1076", + "type": { + "$id": "1077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1078", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1079" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "parent": { + "$ref": "422" + } + }, + { + "$id": "1080", + "kind": "client", + "name": "PrivateEndpointConnections", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "Private connection operations", + "methods": [ + { + "$id": "1081", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "doc": "Get a specific private connection", + "operation": { + "$id": "1082", + "name": "get", + "resourceName": "PrivateEndpointConnectionResource", + "doc": "Get a specific private connection", + "accessibility": "public", + "parameters": [ + { + "$id": "1083", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1085", + "type": { + "$id": "1086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1087", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1088", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1089", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1090", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1091", + "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": "1092", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1093", + "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": "1094", + "name": "privateEndpointConnectionName", + "nameInRequest": "privateEndpointConnectionName", + "doc": "The name of the private endpoint connection associated with the Azure resource.", + "type": { + "$id": "1095", + "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": "1096", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1097", + "kind": "constant", + "valueType": { + "$id": "1098", + "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": "1099", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "374" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.get", + "decorators": [], + "examples": [ + { + "$id": "1100", + "kind": "http", + "name": "PrivateEndpointConnections_Get - generated by [MaximumSet] rule. [stable]", + "description": "PrivateEndpointConnections_Get - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateEndpointConnections_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1101", + "parameter": { + "$ref": "1083" + }, + "value": { + "$id": "1102", + "kind": "string", + "type": { + "$ref": "1084" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1103", + "parameter": { + "$ref": "1087" + }, + "value": { + "$id": "1104", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1105", + "parameter": { + "$ref": "1090" + }, + "value": { + "$id": "1106", + "kind": "string", + "type": { + "$ref": "1091" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1107", + "parameter": { + "$ref": "1092" + }, + "value": { + "$id": "1108", + "kind": "string", + "type": { + "$ref": "1093" + }, + "value": "deidTest" + } + }, + { + "$id": "1109", + "parameter": { + "$ref": "1094" + }, + "value": { + "$id": "1110", + "kind": "string", + "type": { + "$ref": "1095" + }, + "value": "kgwgrrpabvrsrrvpcgcnfmyfgyrl" + } + } + ], + "responses": [ + { + "$id": "1111", + "response": { + "$ref": "1099" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1112", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1113", + "properties": { + "$id": "1114", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1115", + "privateEndpoint": { + "$id": "1116", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1117", + "id": { + "$id": "1118", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "1119", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "1120", + "status": { + "$id": "1121", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1122", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "1123", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "xr" + } + } + }, + "groupIds": { + "$id": "1124", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "1125", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "1126", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1127", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateEndpointConnections/aduyb" + }, + "name": { + "$id": "1128", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "aduyb" + }, + "type": { + "$id": "1129", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "umjjkodjuhccrngl" + }, + "systemData": { + "$id": "1130", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "1131", + "createdBy": { + "$id": "1132", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "1133", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "1134", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1135", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1136", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1137", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1138", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1139", + "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": "1140", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1141", + "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": "1142", + "name": "privateEndpointConnectionName", + "nameInRequest": "privateEndpointConnectionName", + "doc": "The name of the private endpoint connection associated with the Azure resource.", + "type": { + "$id": "1143", + "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": "1144", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1097" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1145", + "type": { + "$ref": "374" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.get" + }, + { + "$id": "1146", + "kind": "lro", + "name": "create", + "accessibility": "public", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "doc": "Create a Private endpoint connection", + "operation": { + "$id": "1147", + "name": "create", + "resourceName": "PrivateEndpointConnectionResource", + "doc": "Create a Private endpoint connection", + "accessibility": "public", + "parameters": [ + { + "$id": "1148", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1150", + "type": { + "$id": "1151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1152", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1153", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1155", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1156", + "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": "1157", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1158", + "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": "1159", + "name": "privateEndpointConnectionName", + "nameInRequest": "privateEndpointConnectionName", + "doc": "The name of the private endpoint connection associated with the Azure resource.", + "type": { + "$id": "1160", + "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": "1161", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1162", + "kind": "constant", + "valueType": { + "$id": "1163", + "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": "1164", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1165", + "kind": "constant", + "valueType": { + "$id": "1166", + "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": "1167", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "374" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1168", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "374" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1169", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "374" + }, + "headers": [ + { + "$id": "1170", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "1171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1172", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1173", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.create", + "decorators": [], + "examples": [ + { + "$id": "1174", + "kind": "http", + "name": "PrivateEndpointConnections_Create - generated by [MaximumSet] rule. [stable]", + "description": "PrivateEndpointConnections_Create - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateEndpointConnections_Create_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1175", + "parameter": { + "$ref": "1148" + }, + "value": { + "$id": "1176", + "kind": "string", + "type": { + "$ref": "1149" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1177", + "parameter": { + "$ref": "1152" + }, + "value": { + "$id": "1178", + "kind": "string", + "type": { + "$ref": "1153" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1179", + "parameter": { + "$ref": "1155" + }, + "value": { + "$id": "1180", + "kind": "string", + "type": { + "$ref": "1156" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1181", + "parameter": { + "$ref": "1157" + }, + "value": { + "$id": "1182", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "deidTest" + } + }, + { + "$id": "1183", + "parameter": { + "$ref": "1159" + }, + "value": { + "$id": "1184", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "kgwgrrpabvrsrrvpcgcnfmyfgyrl" + } + }, + { + "$id": "1185", + "parameter": { + "$ref": "1167" + }, + "value": { + "$id": "1186", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1187", + "properties": { + "$id": "1188", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1189", + "privateEndpoint": { + "$id": "1190", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1191" + } + }, + "privateLinkServiceConnectionState": { + "$id": "1192", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "1193", + "status": { + "$id": "1194", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1195", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "1196", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "xr" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1197", + "response": { + "$ref": "1168" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1198", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1199", + "properties": { + "$id": "1200", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1201", + "privateEndpoint": { + "$id": "1202", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1203", + "id": { + "$id": "1204", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "1205", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "1206", + "status": { + "$id": "1207", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1208", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "1209", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "xr" + } + } + }, + "groupIds": { + "$id": "1210", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "1211", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "1212", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1213", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateEndpointConnections/aduyb" + }, + "name": { + "$id": "1214", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "aduyb" + }, + "type": { + "$id": "1215", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "umjjkodjuhccrngl" + }, + "systemData": { + "$id": "1216", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "1217", + "createdBy": { + "$id": "1218", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "1219", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "1220", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1221", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1222", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1223", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + }, + { + "$id": "1224", + "response": { + "$ref": "1169" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1225", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1226", + "properties": { + "$id": "1227", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1228", + "privateEndpoint": { + "$id": "1229", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1230", + "id": { + "$id": "1231", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "1232", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "1233", + "status": { + "$id": "1234", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1235", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "1236", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "xr" + } + } + }, + "groupIds": { + "$id": "1237", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "1238", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "1239", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1240", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateEndpointConnections/aduyb" + }, + "name": { + "$id": "1241", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "aduyb" + }, + "type": { + "$id": "1242", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "umjjkodjuhccrngl" + }, + "systemData": { + "$id": "1243", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "1244", + "createdBy": { + "$id": "1245", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "1246", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "1247", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1248", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1249", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1250", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1251", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1252", + "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": "1253", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1254", + "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": "1255", + "name": "privateEndpointConnectionName", + "nameInRequest": "privateEndpointConnectionName", + "doc": "The name of the private endpoint connection associated with the Azure resource.", + "type": { + "$id": "1256", + "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": "1257", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "374" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1258", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1259", + "kind": "constant", + "valueType": { + "$id": "1260", + "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": "1261", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "1262", + "kind": "constant", + "valueType": { + "$id": "1263", + "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 + } + ], + "response": { + "$id": "1264", + "type": { + "$ref": "374" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.create", + "lroMetadata": { + "$id": "1265", + "finalStateVia": 0, + "finalResponse": { + "$id": "1266", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "374" + } + } + } + }, + { + "$id": "1267", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "doc": "Delete the private endpoint connection", + "operation": { + "$id": "1268", + "name": "delete", + "resourceName": "PrivateEndpointConnectionResource", + "doc": "Delete the private endpoint connection", + "accessibility": "public", + "parameters": [ + { + "$id": "1269", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1270", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1271", + "type": { + "$id": "1272", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1273", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1274", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1276", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1277", + "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": "1278", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1279", + "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": "1280", + "name": "privateEndpointConnectionName", + "nameInRequest": "privateEndpointConnectionName", + "doc": "The name of the private endpoint connection associated with the Azure resource.", + "type": { + "$id": "1281", + "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": "1282", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1283", + "kind": "constant", + "valueType": { + "$id": "1284", + "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": "1285", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "1286", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1288", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1289", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "1290", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.delete", + "decorators": [], + "examples": [ + { + "$id": "1291", + "kind": "http", + "name": "PrivateEndpointConnections_Delete - generated by [MaximumSet] rule. [stable]", + "description": "PrivateEndpointConnections_Delete - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateEndpointConnections_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1292", + "parameter": { + "$ref": "1269" + }, + "value": { + "$id": "1293", + "kind": "string", + "type": { + "$ref": "1270" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1294", + "parameter": { + "$ref": "1273" + }, + "value": { + "$id": "1295", + "kind": "string", + "type": { + "$ref": "1274" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1296", + "parameter": { + "$ref": "1276" + }, + "value": { + "$id": "1297", + "kind": "string", + "type": { + "$ref": "1277" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1298", + "parameter": { + "$ref": "1278" + }, + "value": { + "$id": "1299", + "kind": "string", + "type": { + "$ref": "1279" + }, + "value": "deidTest" + } + }, + { + "$id": "1300", + "parameter": { + "$ref": "1280" + }, + "value": { + "$id": "1301", + "kind": "string", + "type": { + "$ref": "1281" + }, + "value": "kgwgrrpabvrsrrvpcgcnfmyfgyrl" + } + } + ], + "responses": [ + { + "$id": "1302", + "response": { + "$ref": "1285" + }, + "statusCode": 202 + }, + { + "$id": "1303", + "response": { + "$ref": "1290" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1304", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1305", + "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": "1306", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1307", + "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": "1308", + "name": "privateEndpointConnectionName", + "nameInRequest": "privateEndpointConnectionName", + "doc": "The name of the private endpoint connection associated with the Azure resource.", + "type": { + "$id": "1309", + "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": "1310", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "1311", + "kind": "constant", + "valueType": { + "$id": "1312", + "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 + } + ], + "response": { + "$id": "1313" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.delete", + "lroMetadata": { + "$id": "1314", + "finalStateVia": 1, + "finalResponse": { + "$id": "1315", + "statusCodes": [ + 204 + ] + } + } + }, + { + "$id": "1316", + "kind": "paging", + "name": "listByDeidService", + "accessibility": "public", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "doc": "List private endpoint connections on the given resource", + "operation": { + "$id": "1317", + "name": "listByDeidService", + "resourceName": "PrivateEndpointConnectionResource", + "doc": "List private endpoint connections on the given resource", + "accessibility": "public", + "parameters": [ + { + "$id": "1318", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1320", + "type": { + "$id": "1321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1322", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1323", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1324", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1325", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1326", + "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": "1327", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1328", + "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": "1329", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1330", + "kind": "constant", + "valueType": { + "$id": "1331", + "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": "1332", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "381" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.listByDeidService", + "decorators": [], + "examples": [ + { + "$id": "1333", + "kind": "http", + "name": "PrivateEndpointConnections_ListByDeidService - generated by [MaximumSet] rule. [stable]", + "description": "PrivateEndpointConnections_ListByDeidService - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateEndpointConnections_ListByDeidService_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1334", + "parameter": { + "$ref": "1318" + }, + "value": { + "$id": "1335", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1336", + "parameter": { + "$ref": "1322" + }, + "value": { + "$id": "1337", + "kind": "string", + "type": { + "$ref": "1323" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1338", + "parameter": { + "$ref": "1325" + }, + "value": { + "$id": "1339", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1340", + "parameter": { + "$ref": "1327" + }, + "value": { + "$id": "1341", + "kind": "string", + "type": { + "$ref": "1328" + }, + "value": "deidTest" + } + } + ], + "responses": [ + { + "$id": "1342", + "response": { + "$ref": "1332" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1343", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "1344", + "value": { + "$id": "1345", + "kind": "array", + "type": { + "$ref": "383" + }, + "value": [ + { + "$id": "1346", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1347", + "properties": { + "$id": "1348", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1349", + "privateEndpoint": { + "$id": "1350", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1351", + "id": { + "$id": "1352", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "1353", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "1354", + "status": { + "$id": "1355", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1356", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "1357", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "mmvcleuufspfrojjveuith" + } + } + }, + "groupIds": { + "$id": "1358", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "1359", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "1360", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1361", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateEndpointConnections/aduyb" + }, + "name": { + "$id": "1362", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "aduyb" + }, + "type": { + "$id": "1363", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "umjjkodjuhccrngl" + }, + "systemData": { + "$id": "1364", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "1365", + "createdBy": { + "$id": "1366", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "1367", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "1368", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1369", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1370", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1371", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1372", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1373", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1374", + "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": "1375", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1376", + "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": "1377", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1330" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1378", + "type": { + "$id": "1379", + "kind": "array", + "name": "ArrayPrivateEndpointConnectionResource", + "valueType": { + "$ref": "374" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.listByDeidService", + "pagingMetadata": { + "$id": "1380", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1381", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ + { + "$id": "1382", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1383", + "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": "1384", + "type": { + "$id": "1385", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1386", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1387" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "parent": { + "$ref": "422" + } + }, + { + "$id": "1388", + "kind": "client", + "name": "PrivateLinks", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "Operations for private links on DeidService resource", + "methods": [ + { + "$id": "1389", + "kind": "paging", + "name": "listByDeidService", + "accessibility": "public", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "doc": "List private links on the given resource", + "operation": { + "$id": "1390", + "name": "listByDeidService", + "resourceName": "PrivateLinkResource", + "doc": "List private links on the given resource", + "accessibility": "public", + "parameters": [ + { + "$id": "1391", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1392", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1393", + "type": { + "$id": "1394", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1395", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1396", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1398", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1399", + "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": "1400", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1401", + "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": "1402", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1403", + "kind": "constant", + "valueType": { + "$id": "1404", + "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": "1405", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "391" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateLinkResources", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinks.listByDeidService", + "decorators": [], + "examples": [ + { + "$id": "1406", + "kind": "http", + "name": "PrivateLinks_ListByDeidService - generated by [MaximumSet] rule. [stable]", + "description": "PrivateLinks_ListByDeidService - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateLinks_ListByDeidService_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1407", + "parameter": { + "$ref": "1391" + }, + "value": { + "$id": "1408", + "kind": "string", + "type": { + "$ref": "1392" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1409", + "parameter": { + "$ref": "1395" + }, + "value": { + "$id": "1410", + "kind": "string", + "type": { + "$ref": "1396" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1411", + "parameter": { + "$ref": "1398" + }, + "value": { + "$id": "1412", + "kind": "string", + "type": { + "$ref": "1399" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1413", + "parameter": { + "$ref": "1400" + }, + "value": { + "$id": "1414", + "kind": "string", + "type": { + "$ref": "1401" + }, + "value": "deidTest" + } + } + ], + "responses": [ + { + "$id": "1415", + "response": { + "$ref": "1405" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1416", + "kind": "model", + "type": { + "$ref": "391" + }, + "value": { + "$id": "1417", + "value": { + "$id": "1418", + "kind": "array", + "type": { + "$ref": "393" + }, + "value": [ + { + "$id": "1419", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "1420", + "properties": { + "$id": "1421", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "1422", + "groupId": { + "$id": "1423", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "flaloakbdcqjisfhfnkrxmt" + }, + "requiredMembers": { + "$id": "1424", + "kind": "array", + "type": { + "$ref": "402" + }, + "value": [ + { + "$id": "1425", + "kind": "string", + "type": { + "$ref": "403" + }, + "value": "wbraaugftjqa" + } + ] + }, + "requiredZoneNames": { + "$id": "1426", + "kind": "array", + "type": { + "$ref": "407" + }, + "value": [ + { + "$id": "1427", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "ndsmc" + } + ] + } + } + }, + "id": { + "$id": "1428", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateLinkResources/rmptbzejhgxhlfpdizsekhsq" + }, + "name": { + "$id": "1429", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "rmptbzejhgxhlfpdizsekhsq" + }, + "type": { + "$id": "1430", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "lplbvyjkvsujegzqr" + }, + "systemData": { + "$id": "1431", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "1432", + "createdBy": { + "$id": "1433", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "1434", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "1435", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1436", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1437", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1438", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1439", + "kind": "string", + "type": { + "$ref": "418" + }, + "value": "https://microsoft.com/arzijt" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1440", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1441", + "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": "1442", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1443", + "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": "1444", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1403" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1445", + "type": { + "$id": "1446", + "kind": "array", + "name": "ArrayPrivateLinkResource", + "valueType": { + "$ref": "394" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinks.listByDeidService", + "pagingMetadata": { + "$id": "1447", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1448", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ + { + "$id": "1449", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1450", + "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": "1451", + "type": { + "$id": "1452", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1453", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1454" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinks", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "parent": { + "$ref": "422" + } + } + ] + } + ], + "auth": { + "$id": "1455", + "oAuth2": { + "$id": "1456", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 4e3c032f60a4..a49c5a6e4669 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -53,6 +53,7 @@ trigger: - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry - sdk/containerservice/Azure.ResourceManager.ContainerService + - sdk/contoso/Azure.ResourceManager.Contoso - sdk/cosmosdb/Azure.ResourceManager.CosmosDB - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql - sdk/costmanagement/Azure.ResourceManager.CostManagement @@ -262,6 +263,7 @@ pr: - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry - sdk/containerservice/Azure.ResourceManager.ContainerService + - sdk/contoso/Azure.ResourceManager.Contoso - sdk/cosmosdb/Azure.ResourceManager.CosmosDB - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql - sdk/costmanagement/Azure.ResourceManager.CostManagement diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..4e749e6b85b1 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -12,6 +12,8 @@ trigger: - sdk/storage/Azure.Storage.DataMovement/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ - 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/