From fa2dd8d9ede951fc41db5598e7648fbd9bcb2e9f Mon Sep 17 00:00:00 2001 From: Francis Tran Date: Wed, 20 Sep 2023 22:34:28 -0700 Subject: [PATCH 1/3] initial fleet .net sdk generation --- .../Azure.ResourceManager.Fleet.sln | 65 ++ .../Azure.ResourceManager.Fleet/CHANGELOG.md | 17 + .../Directory.Build.props | 6 + .../Azure.ResourceManager.Fleet/README.md | 80 ++ ...re.ResourceManager.Fleet.netstandard2.0.cs | 397 +++++++++ .../Azure.ResourceManager.Fleet/assets.json | 6 + ...Azure.ResourceManager.Fleet.Samples.csproj | 10 + .../Samples/Sample_FleetCollection.cs | 169 ++++ .../Samples/Sample_FleetMemberCollection.cs | 163 ++++ .../Samples/Sample_FleetMemberResource.cs | 118 +++ .../Generated/Samples/Sample_FleetResource.cs | 180 ++++ .../Samples/Sample_UpdateRunCollection.cs | 181 ++++ .../Samples/Sample_UpdateRunResource.cs | 201 +++++ .../src/Azure.ResourceManager.Fleet.csproj | 8 + .../src/Generated/ArmFleetModelFactory.cs | 186 +++++ .../Generated/Extensions/FleetExtensions.cs | 207 +++++ .../ResourceGroupResourceExtensionClient.cs | 41 + .../SubscriptionResourceExtensionClient.cs | 88 ++ .../src/Generated/FleetCollection.cs | 346 ++++++++ .../src/Generated/FleetData.cs | 56 ++ .../src/Generated/FleetMemberCollection.cs | 345 ++++++++ .../src/Generated/FleetMemberData.cs | 52 ++ .../src/Generated/FleetMemberResource.cs | 302 +++++++ .../src/Generated/FleetResource.cs | 780 ++++++++++++++++++ .../LongRunningOperation/FleetArmOperation.cs | 70 ++ .../FleetArmOperationOfT.cs | 76 ++ .../FleetMemberOperationSource.cs | 40 + .../FleetOperationSource.cs | 40 + .../UpdateRunOperationSource.cs | 40 + .../APIServerAccessProfile.Serialization.cs | 78 ++ .../Models/APIServerAccessProfile.cs | 38 + .../Models/AgentProfile.Serialization.cs | 48 ++ .../src/Generated/Models/AgentProfile.cs | 30 + .../FleetCredentialResult.Serialization.cs | 44 + .../Generated/Models/FleetCredentialResult.cs | 34 + .../FleetCredentialResults.Serialization.cs | 43 + .../Models/FleetCredentialResults.cs | 32 + .../Models/FleetData.Serialization.cs | 164 ++++ .../Models/FleetHubProfile.Serialization.cs | 86 ++ .../src/Generated/Models/FleetHubProfile.cs | 58 ++ .../Models/FleetListResult.Serialization.cs | 51 ++ .../src/Generated/Models/FleetListResult.cs | 43 + .../Models/FleetMemberData.Serialization.cs | 125 +++ .../FleetMemberListResult.Serialization.cs | 51 ++ .../Generated/Models/FleetMemberListResult.cs | 43 + .../Models/FleetMemberPatch.Serialization.cs | 29 + .../src/Generated/Models/FleetMemberPatch.cs | 21 + .../Models/FleetMemberProvisioningState.cs | 63 ++ .../Models/FleetPatch.Serialization.cs | 37 + .../src/Generated/Models/FleetPatch.cs | 28 + .../Models/FleetProvisioningState.cs | 63 ++ .../ManagedClusterUpdate.Serialization.cs | 56 ++ .../Generated/Models/ManagedClusterUpdate.cs | 49 ++ ...ManagedClusterUpgradeSpec.Serialization.cs | 52 ++ .../Models/ManagedClusterUpgradeSpec.cs | 46 ++ .../Models/ManagedClusterUpgradeType.cs | 51 ++ .../MemberUpdateStatus.Serialization.cs | 61 ++ .../Generated/Models/MemberUpdateStatus.cs | 44 + .../NodeImageSelection.Serialization.cs | 41 + .../Generated/Models/NodeImageSelection.cs | 23 + .../NodeImageSelectionStatus.Serialization.cs | 43 + .../Models/NodeImageSelectionStatus.cs | 32 + .../Models/NodeImageSelectionType.cs | 51 ++ .../Models/NodeImageVersion.Serialization.cs | 33 + .../src/Generated/Models/NodeImageVersion.cs | 28 + .../Models/UpdateGroup.Serialization.cs | 41 + .../src/Generated/Models/UpdateGroup.cs | 37 + .../Models/UpdateGroupStatus.Serialization.cs | 59 ++ .../src/Generated/Models/UpdateGroupStatus.cs | 40 + .../Models/UpdateRunData.Serialization.cs | 139 ++++ .../UpdateRunListResult.Serialization.cs | 51 ++ .../Generated/Models/UpdateRunListResult.cs | 43 + .../Models/UpdateRunProvisioningState.cs | 54 ++ .../Models/UpdateRunStatus.Serialization.cs | 63 ++ .../src/Generated/Models/UpdateRunStatus.cs | 45 + .../Models/UpdateRunStrategy.Serialization.cs | 52 ++ .../src/Generated/Models/UpdateRunStrategy.cs | 38 + .../Models/UpdateStage.Serialization.cs | 82 ++ .../src/Generated/Models/UpdateStage.cs | 58 ++ .../Models/UpdateStageStatus.Serialization.cs | 69 ++ .../src/Generated/Models/UpdateStageStatus.cs | 44 + .../src/Generated/Models/UpdateState.cs | 66 ++ .../Models/UpdateStatus.Serialization.cs | 69 ++ .../src/Generated/Models/UpdateStatus.cs | 43 + .../Models/WaitStatus.Serialization.cs | 47 ++ .../src/Generated/Models/WaitStatus.cs | 32 + .../src/Generated/ProviderConstants.cs | 16 + .../FleetMembersRestOperations.cs | 553 +++++++++++++ .../RestOperations/FleetsRestOperations.cs | 733 ++++++++++++++++ .../UpdateRunsRestOperations.cs | 629 ++++++++++++++ .../src/Generated/UpdateRunCollection.cs | 345 ++++++++ .../src/Generated/UpdateRunData.cs | 72 ++ .../src/Generated/UpdateRunResource.cs | 443 ++++++++++ .../src/Properties/AssemblyInfo.cs | 9 + .../src/autorest.md | 55 ++ .../Azure.ResourceManager.Fleet.Tests.csproj | 5 + .../tests/FleetManagementTestBase.cs | 43 + .../tests/FleetManagementTestEnvironment.cs | 11 + sdk/fleet/ci.mgmt.yml | 49 ++ sdk/resourcemanager/ci.mgmt.yml | 586 ++++++------- 100 files changed, 10518 insertions(+), 292 deletions(-) create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/Azure.ResourceManager.Fleet.sln create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/CHANGELOG.md create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/Directory.Build.props create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/README.md create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/api/Azure.ResourceManager.Fleet.netstandard2.0.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/assets.json create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/samples/Azure.ResourceManager.Fleet.Samples.csproj create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetCollection.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberCollection.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberResource.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetResource.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunCollection.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunResource.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Azure.ResourceManager.Fleet.csproj create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/ArmFleetModelFactory.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/FleetExtensions.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetCollection.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetData.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberCollection.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberData.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberResource.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetResource.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperation.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperationOfT.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetOperationSource.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetData.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberData.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberProvisioningState.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetProvisioningState.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeType.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionType.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunData.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunProvisioningState.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateState.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.Serialization.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/ProviderConstants.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetMembersRestOperations.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetsRestOperations.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunCollection.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunData.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunResource.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/Properties/AssemblyInfo.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/src/autorest.md create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/tests/Azure.ResourceManager.Fleet.Tests.csproj create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestBase.cs create mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestEnvironment.cs create mode 100644 sdk/fleet/ci.mgmt.yml diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/Azure.ResourceManager.Fleet.sln b/sdk/fleet/Azure.ResourceManager.Fleet/Azure.ResourceManager.Fleet.sln new file mode 100644 index 0000000000000..b28021436ff89 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/Azure.ResourceManager.Fleet.sln @@ -0,0 +1,65 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30309.148 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.Fleet", "src\Azure.ResourceManager.Fleet.csproj", "{848F28F3-DA60-4234-A348-872B4D46BDF2}" +EndProject +Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.Fleet.Tests", "tests\Azure.ResourceManager.Fleet.Tests.csproj", "{BAFD4CFA-48E6-4408-8054-0C62C3B2196D}" +EndProject +Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.Fleet.Samples", "samples\Azure.ResourceManager.Fleet.Samples.csproj", "{AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}" +EndProject +Global + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A6FFC348-C044-4BD3-BAA3-D3DFA56A5D85} + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {848F28F3-DA60-4234-A348-872B4D46BDF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {848F28F3-DA60-4234-A348-872B4D46BDF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {848F28F3-DA60-4234-A348-872B4D46BDF2}.Debug|x64.ActiveCfg = Debug|Any CPU + {848F28F3-DA60-4234-A348-872B4D46BDF2}.Debug|x64.Build.0 = Debug|Any CPU + {848F28F3-DA60-4234-A348-872B4D46BDF2}.Debug|x86.ActiveCfg = Debug|Any CPU + {848F28F3-DA60-4234-A348-872B4D46BDF2}.Debug|x86.Build.0 = Debug|Any CPU + {848F28F3-DA60-4234-A348-872B4D46BDF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {848F28F3-DA60-4234-A348-872B4D46BDF2}.Release|Any CPU.Build.0 = Release|Any CPU + {848F28F3-DA60-4234-A348-872B4D46BDF2}.Release|x64.ActiveCfg = Release|Any CPU + {848F28F3-DA60-4234-A348-872B4D46BDF2}.Release|x64.Build.0 = Release|Any CPU + {848F28F3-DA60-4234-A348-872B4D46BDF2}.Release|x86.ActiveCfg = Release|Any CPU + {848F28F3-DA60-4234-A348-872B4D46BDF2}.Release|x86.Build.0 = Release|Any CPU + {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Debug|x64.ActiveCfg = Debug|Any CPU + {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Debug|x64.Build.0 = Debug|Any CPU + {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Debug|x86.ActiveCfg = Debug|Any CPU + {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Debug|x86.Build.0 = Debug|Any CPU + {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Release|Any CPU.Build.0 = Release|Any CPU + {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Release|x64.ActiveCfg = Release|Any CPU + {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Release|x64.Build.0 = Release|Any CPU + {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Release|x86.ActiveCfg = Release|Any CPU + {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Release|x86.Build.0 = Release|Any CPU + {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Debug|x64.ActiveCfg = Debug|Any CPU + {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Debug|x64.Build.0 = Debug|Any CPU + {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Debug|x86.ActiveCfg = Debug|Any CPU + {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Debug|x86.Build.0 = Debug|Any CPU + {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Release|Any CPU.Build.0 = Release|Any CPU + {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Release|x64.ActiveCfg = Release|Any CPU + {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Release|x64.Build.0 = Release|Any CPU + {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Release|x86.ActiveCfg = Release|Any CPU + {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/CHANGELOG.md b/sdk/fleet/Azure.ResourceManager.Fleet/CHANGELOG.md new file mode 100644 index 0000000000000..23f86d1e896ee --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/CHANGELOG.md @@ -0,0 +1,17 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### General New Features + +This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). + +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/Directory.Build.props b/sdk/fleet/Azure.ResourceManager.Fleet/Directory.Build.props new file mode 100644 index 0000000000000..1a9611bd49242 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/README.md b/sdk/fleet/Azure.ResourceManager.Fleet/README.md new file mode 100644 index 0000000000000..52f07949c8e20 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure Fleet 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 Fleet management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.Fleet --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) + +## Documentation + +Documentation is available to help you learn how to use this package: + +- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). +- [API References](https://docs.microsoft.com/dotnet/api/?view=azure-dotnet). +- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). + +## Examples + +Code samples for using the management library for .NET can be found in the following locations +- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples) + +## Troubleshooting + +- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). +- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. + +## Next steps + +For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/). + +## Contributing + +For details on contributing to this repository, see the [contributing +guide][cg]. + +This project welcomes contributions and suggestions. Most contributions +require you to agree to a Contributor License Agreement (CLA) declaring +that you have the right to, and actually do, grant us the rights to use +your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine +whether you need to provide a CLA and decorate the PR appropriately +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action once across all repositories +using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For +more information, see the [Code of Conduct FAQ][coc_faq] or contact + with any other questions or comments. + + +[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ \ No newline at end of file diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/api/Azure.ResourceManager.Fleet.netstandard2.0.cs b/sdk/fleet/Azure.ResourceManager.Fleet/api/Azure.ResourceManager.Fleet.netstandard2.0.cs new file mode 100644 index 0000000000000..a4d05b2cdbd95 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/api/Azure.ResourceManager.Fleet.netstandard2.0.cs @@ -0,0 +1,397 @@ +namespace Azure.ResourceManager.Fleet +{ + public partial class FleetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FleetCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.Fleet.FleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.Fleet.FleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fleetName, 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 fleetName, 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 FleetData : Azure.ResourceManager.Models.TrackedResourceData + { + public FleetData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Fleet.Models.FleetHubProfile HubProfile { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.Fleet.Models.FleetProvisioningState? ProvisioningState { get { throw null; } } + } + public static partial class FleetExtensions + { + public static Azure.Response GetFleet(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetFleetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Fleet.FleetMemberResource GetFleetMemberResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Fleet.FleetResource GetFleetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Fleet.FleetCollection GetFleets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetFleets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetFleetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Fleet.UpdateRunResource GetUpdateRunResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class FleetMemberCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FleetMemberCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.Fleet.FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.Fleet.FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fleetMemberName, 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 fleetMemberName, 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 FleetMemberData : Azure.ResourceManager.Models.ResourceData + { + public FleetMemberData() { } + public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } set { } } + public Azure.ETag? ETag { get { throw null; } } + public string Group { get { throw null; } set { } } + public Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class FleetMemberResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FleetMemberResource() { } + public virtual Azure.ResourceManager.Fleet.FleetMemberData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Fleet.Models.FleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Fleet.Models.FleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class FleetResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FleetResource() { } + public virtual Azure.ResourceManager.Fleet.FleetData 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 fleetName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, 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 GetCredentials(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCredentialsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetFleetMember(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFleetMemberAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Fleet.FleetMemberCollection GetFleetMembers() { throw null; } + public virtual Azure.Response GetUpdateRun(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetUpdateRunAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Fleet.UpdateRunCollection GetUpdateRuns() { 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; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Fleet.Models.FleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Fleet.Models.FleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class UpdateRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected UpdateRunCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.Fleet.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.Fleet.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string updateRunName, 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 updateRunName, 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 UpdateRunData : Azure.ResourceManager.Models.ResourceData + { + public UpdateRunData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Fleet.Models.ManagedClusterUpdate ManagedClusterUpdate { get { throw null; } set { } } + public Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Fleet.Models.UpdateRunStatus Status { get { throw null; } } + public System.Collections.Generic.IList StrategyStages { get { throw null; } set { } } + } + public partial class UpdateRunResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected UpdateRunResource() { } + public virtual Azure.ResourceManager.Fleet.UpdateRunData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Fleet.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Fleet.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class APIServerAccessProfile + { + public APIServerAccessProfile() { } + public bool? EnablePrivateCluster { get { throw null; } set { } } + public bool? EnableVnetIntegration { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + } + public static partial class ArmFleetModelFactory + { + public static Azure.ResourceManager.Fleet.Models.FleetCredentialResult FleetCredentialResult(string name = null, byte[] value = null) { throw null; } + public static Azure.ResourceManager.Fleet.Models.FleetCredentialResults FleetCredentialResults(System.Collections.Generic.IEnumerable kubeconfigs = null) { throw null; } + public static Azure.ResourceManager.Fleet.FleetData FleetData(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.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Fleet.Models.FleetProvisioningState? provisioningState = default(Azure.ResourceManager.Fleet.Models.FleetProvisioningState?), Azure.ResourceManager.Fleet.Models.FleetHubProfile hubProfile = null) { throw null; } + public static Azure.ResourceManager.Fleet.Models.FleetHubProfile FleetHubProfile(string dnsPrefix = null, Azure.ResourceManager.Fleet.Models.APIServerAccessProfile apiServerAccessProfile = null, Azure.Core.ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null) { throw null; } + public static Azure.ResourceManager.Fleet.FleetMemberData FleetMemberData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.Core.ResourceIdentifier clusterResourceId = null, string group = null, Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState? provisioningState = default(Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Fleet.Models.MemberUpdateStatus MemberUpdateStatus(Azure.ResourceManager.Fleet.Models.UpdateStatus status = null, string name = null, string clusterResourceId = null, string operationId = null, string message = null) { throw null; } + public static Azure.ResourceManager.Fleet.Models.NodeImageVersion NodeImageVersion(string version = null) { throw null; } + public static Azure.ResourceManager.Fleet.Models.UpdateGroupStatus UpdateGroupStatus(Azure.ResourceManager.Fleet.Models.UpdateStatus status = null, string name = null, System.Collections.Generic.IEnumerable members = null) { throw null; } + public static Azure.ResourceManager.Fleet.UpdateRunData UpdateRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState? provisioningState = default(Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState?), System.Collections.Generic.IEnumerable strategyStages = null, Azure.ResourceManager.Fleet.Models.ManagedClusterUpdate managedClusterUpdate = null, Azure.ResourceManager.Fleet.Models.UpdateRunStatus status = null) { throw null; } + public static Azure.ResourceManager.Fleet.Models.UpdateRunStatus UpdateRunStatus(Azure.ResourceManager.Fleet.Models.UpdateStatus status = null, System.Collections.Generic.IEnumerable stages = null, System.Collections.Generic.IEnumerable selectedNodeImageVersions = null) { throw null; } + public static Azure.ResourceManager.Fleet.Models.UpdateStageStatus UpdateStageStatus(Azure.ResourceManager.Fleet.Models.UpdateStatus status = null, string name = null, System.Collections.Generic.IEnumerable groups = null, Azure.ResourceManager.Fleet.Models.WaitStatus afterStageWaitStatus = null) { throw null; } + public static Azure.ResourceManager.Fleet.Models.UpdateStatus UpdateStatus(System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Fleet.Models.UpdateState? state = default(Azure.ResourceManager.Fleet.Models.UpdateState?), Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.Fleet.Models.WaitStatus WaitStatus(Azure.ResourceManager.Fleet.Models.UpdateStatus status = null, int? waitDurationInSeconds = default(int?)) { throw null; } + } + public partial class FleetCredentialResult + { + internal FleetCredentialResult() { } + public string Name { get { throw null; } } + public byte[] Value { get { throw null; } } + } + public partial class FleetCredentialResults + { + internal FleetCredentialResults() { } + public System.Collections.Generic.IReadOnlyList Kubeconfigs { get { throw null; } } + } + public partial class FleetHubProfile + { + public FleetHubProfile() { } + public Azure.Core.ResourceIdentifier AgentSubnetId { get { throw null; } set { } } + public Azure.ResourceManager.Fleet.Models.APIServerAccessProfile ApiServerAccessProfile { get { throw null; } set { } } + public string DnsPrefix { get { throw null; } set { } } + public string Fqdn { get { throw null; } } + public string KubernetesVersion { get { throw null; } } + } + public partial class FleetMemberPatch + { + public FleetMemberPatch() { } + public string Group { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FleetMemberProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FleetMemberProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState Joining { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState Leaving { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState 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.Fleet.Models.FleetMemberProvisioningState left, Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState left, Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class FleetPatch + { + public FleetPatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FleetProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FleetProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.Fleet.Models.FleetProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.FleetProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.FleetProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.FleetProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.FleetProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.FleetProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Fleet.Models.FleetProvisioningState 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.Fleet.Models.FleetProvisioningState left, Azure.ResourceManager.Fleet.Models.FleetProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Fleet.Models.FleetProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Fleet.Models.FleetProvisioningState left, Azure.ResourceManager.Fleet.Models.FleetProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ManagedClusterUpdate + { + public ManagedClusterUpdate(Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeSpec upgrade) { } + public Azure.ResourceManager.Fleet.Models.NodeImageSelectionType? SelectionType { get { throw null; } set { } } + public Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeSpec Upgrade { get { throw null; } set { } } + } + public partial class ManagedClusterUpgradeSpec + { + public ManagedClusterUpgradeSpec(Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType upgradeType) { } + public string KubernetesVersion { get { throw null; } set { } } + public Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType UpgradeType { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ManagedClusterUpgradeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ManagedClusterUpgradeType(string value) { throw null; } + public static Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType Full { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType NodeImageOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType 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.Fleet.Models.ManagedClusterUpgradeType left, Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType right) { throw null; } + public static implicit operator Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType left, Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MemberUpdateStatus + { + internal MemberUpdateStatus() { } + public string ClusterResourceId { get { throw null; } } + public string Message { get { throw null; } } + public string Name { get { throw null; } } + public string OperationId { get { throw null; } } + public Azure.ResourceManager.Fleet.Models.UpdateStatus Status { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NodeImageSelectionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NodeImageSelectionType(string value) { throw null; } + public static Azure.ResourceManager.Fleet.Models.NodeImageSelectionType Consistent { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.NodeImageSelectionType Latest { get { throw null; } } + public bool Equals(Azure.ResourceManager.Fleet.Models.NodeImageSelectionType 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.Fleet.Models.NodeImageSelectionType left, Azure.ResourceManager.Fleet.Models.NodeImageSelectionType right) { throw null; } + public static implicit operator Azure.ResourceManager.Fleet.Models.NodeImageSelectionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Fleet.Models.NodeImageSelectionType left, Azure.ResourceManager.Fleet.Models.NodeImageSelectionType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NodeImageVersion + { + internal NodeImageVersion() { } + public string Version { get { throw null; } } + } + public partial class UpdateGroup + { + public UpdateGroup(string name) { } + public string Name { get { throw null; } set { } } + } + public partial class UpdateGroupStatus + { + internal UpdateGroupStatus() { } + public System.Collections.Generic.IReadOnlyList Members { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.Fleet.Models.UpdateStatus Status { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UpdateRunProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UpdateRunProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState 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.Fleet.Models.UpdateRunProvisioningState left, Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState left, Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UpdateRunStatus + { + internal UpdateRunStatus() { } + public System.Collections.Generic.IReadOnlyList SelectedNodeImageVersions { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Stages { get { throw null; } } + public Azure.ResourceManager.Fleet.Models.UpdateStatus Status { get { throw null; } } + } + public partial class UpdateStage + { + public UpdateStage(string name) { } + public int? AfterStageWaitInSeconds { get { throw null; } set { } } + public System.Collections.Generic.IList Groups { get { throw null; } } + public string Name { get { throw null; } set { } } + } + public partial class UpdateStageStatus + { + internal UpdateStageStatus() { } + public Azure.ResourceManager.Fleet.Models.WaitStatus AfterStageWaitStatus { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Groups { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.Fleet.Models.UpdateStatus Status { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UpdateState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UpdateState(string value) { throw null; } + public static Azure.ResourceManager.Fleet.Models.UpdateState Completed { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.UpdateState Failed { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.UpdateState NotStarted { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.UpdateState Running { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.UpdateState Skipped { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.UpdateState Stopped { get { throw null; } } + public static Azure.ResourceManager.Fleet.Models.UpdateState Stopping { get { throw null; } } + public bool Equals(Azure.ResourceManager.Fleet.Models.UpdateState 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.Fleet.Models.UpdateState left, Azure.ResourceManager.Fleet.Models.UpdateState right) { throw null; } + public static implicit operator Azure.ResourceManager.Fleet.Models.UpdateState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Fleet.Models.UpdateState left, Azure.ResourceManager.Fleet.Models.UpdateState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UpdateStatus + { + internal UpdateStatus() { } + public System.DateTimeOffset? CompletedOn { get { throw null; } } + public Azure.ResponseError Error { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.Fleet.Models.UpdateState? State { get { throw null; } } + } + public partial class WaitStatus + { + internal WaitStatus() { } + public Azure.ResourceManager.Fleet.Models.UpdateStatus Status { get { throw null; } } + public int? WaitDurationInSeconds { get { throw null; } } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/assets.json b/sdk/fleet/Azure.ResourceManager.Fleet/assets.json new file mode 100644 index 0000000000000..be79f7436dca2 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net//Azure.ResourceManager.Fleet", + "Tag": "" +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Azure.ResourceManager.Fleet.Samples.csproj b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Azure.ResourceManager.Fleet.Samples.csproj new file mode 100644 index 0000000000000..ef5d212668519 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Azure.ResourceManager.Fleet.Samples.csproj @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetCollection.cs b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetCollection.cs new file mode 100644 index 0000000000000..aab1c26daa5f0 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetCollection.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Fleet.Samples +{ + public partial class Sample_FleetCollection + { + // Lists the Fleet resources in a resource group. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListsTheFleetResourcesInAResourceGroup() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListByResourceGroup.json + // this example is just showing the usage of "Fleets_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 = "subid1"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FleetResource + FleetCollection collection = resourceGroupResource.GetFleets(); + + // invoke the operation and iterate over the result + await foreach (FleetResource 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 + FleetData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Gets a Fleet resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAFleetResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Get.json + // this example is just showing the usage of "Fleets_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 = "subid1"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FleetResource + FleetCollection collection = resourceGroupResource.GetFleets(); + + // invoke the operation + string fleetName = "fleet1"; + FleetResource result = await collection.GetAsync(fleetName); + + // 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 + FleetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Gets a Fleet resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetsAFleetResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Get.json + // this example is just showing the usage of "Fleets_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 = "subid1"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FleetResource + FleetCollection collection = resourceGroupResource.GetFleets(); + + // invoke the operation + string fleetName = "fleet1"; + bool result = await collection.ExistsAsync(fleetName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Creates a Fleet resource with a long running operation. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreatesAFleetResourceWithALongRunningOperation() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_CreateOrUpdate.json + // this example is just showing the usage of "Fleets_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 = "subid1"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FleetResource + FleetCollection collection = resourceGroupResource.GetFleets(); + + // invoke the operation + string fleetName = "fleet1"; + FleetData data = new FleetData(new AzureLocation("East US")) + { + HubProfile = new FleetHubProfile() + { + DnsPrefix = "dnsprefix1", + }, + Tags = +{ +["archv2"] = "", +["tier"] = "production", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetName, data); + FleetResource 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 + FleetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberCollection.cs b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberCollection.cs new file mode 100644 index 0000000000000..b1454567bdb78 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberCollection.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Fleet; + +namespace Azure.ResourceManager.Fleet.Samples +{ + public partial class Sample_FleetMemberCollection + { + // Lists the members of a Fleet. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListsTheMembersOfAFleet() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_ListByFleet.json + // this example is just showing the usage of "FleetMembers_ListByFleet" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetMemberResource + FleetMemberCollection collection = fleet.GetFleetMembers(); + + // invoke the operation and iterate over the result + await foreach (FleetMemberResource 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 + FleetMemberData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Gets a FleetMember resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAFleetMemberResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Get.json + // this example is just showing the usage of "FleetMembers_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 FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetMemberResource + FleetMemberCollection collection = fleet.GetFleetMembers(); + + // invoke the operation + string fleetMemberName = "member-1"; + FleetMemberResource result = await collection.GetAsync(fleetMemberName); + + // 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 + FleetMemberData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Gets a FleetMember resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetsAFleetMemberResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Get.json + // this example is just showing the usage of "FleetMembers_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 FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetMemberResource + FleetMemberCollection collection = fleet.GetFleetMembers(); + + // invoke the operation + string fleetMemberName = "member-1"; + bool result = await collection.ExistsAsync(fleetMemberName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Creates a FleetMember resource with a long running operation. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreatesAFleetMemberResourceWithALongRunningOperation() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Create.json + // this example is just showing the usage of "FleetMembers_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetMemberResource + FleetMemberCollection collection = fleet.GetFleetMembers(); + + // invoke the operation + string fleetMemberName = "member-1"; + FleetMemberData data = new FleetMemberData() + { + ClusterResourceId = new ResourceIdentifier("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetMemberName, data); + FleetMemberResource 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 + FleetMemberData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberResource.cs b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberResource.cs new file mode 100644 index 0000000000000..c97d212915ded --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberResource.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.Fleet.Models; + +namespace Azure.ResourceManager.Fleet.Samples +{ + public partial class Sample_FleetMemberResource + { + // Gets a FleetMember resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAFleetMemberResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Get.json + // this example is just showing the usage of "FleetMembers_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 FleetMemberResource created on azure + // for more information of creating FleetMemberResource, please refer to the document of FleetMemberResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + string fleetMemberName = "member-1"; + ResourceIdentifier fleetMemberResourceId = FleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); + FleetMemberResource fleetMember = client.GetFleetMemberResource(fleetMemberResourceId); + + // invoke the operation + FleetMemberResource result = await fleetMember.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 + FleetMemberData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Updates a FleetMember resource synchronously. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdatesAFleetMemberResourceSynchronously() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Update.json + // this example is just showing the usage of "FleetMembers_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 FleetMemberResource created on azure + // for more information of creating FleetMemberResource, please refer to the document of FleetMemberResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + string fleetMemberName = "member-1"; + ResourceIdentifier fleetMemberResourceId = FleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); + FleetMemberResource fleetMember = client.GetFleetMemberResource(fleetMemberResourceId); + + // invoke the operation + FleetMemberPatch patch = new FleetMemberPatch() + { + Group = "staging", + }; + ArmOperation lro = await fleetMember.UpdateAsync(WaitUntil.Completed, patch); + FleetMemberResource 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 + FleetMemberData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Deletes a FleetMember resource asynchronously with a long running operation. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeletesAFleetMemberResourceAsynchronouslyWithALongRunningOperation() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Delete.json + // this example is just showing the usage of "FleetMembers_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 FleetMemberResource created on azure + // for more information of creating FleetMemberResource, please refer to the document of FleetMemberResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + string fleetMemberName = "member-1"; + ResourceIdentifier fleetMemberResourceId = FleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); + FleetMemberResource fleetMember = client.GetFleetMemberResource(fleetMemberResourceId); + + // invoke the operation + await fleetMember.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetResource.cs b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetResource.cs new file mode 100644 index 0000000000000..98f7eaf95e609 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetResource.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Fleet.Samples +{ + public partial class Sample_FleetResource + { + // Lists the Fleet resources in a subscription. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetFleets_ListsTheFleetResourcesInASubscription() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListBySub.json + // this example is just showing the usage of "Fleets_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 = "subid1"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (FleetResource item in subscriptionResource.GetFleetsAsync()) + { + // 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 + FleetData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Gets a Fleet resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAFleetResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Get.json + // this example is just showing the usage of "Fleets_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 FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // invoke the operation + FleetResource result = await fleet.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 + FleetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Update a Fleet. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateAFleet() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_PatchTags.json + // this example is just showing the usage of "Fleets_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 FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // invoke the operation + FleetPatch patch = new FleetPatch() + { + Tags = +{ +["env"] = "prod", +["tier"] = "secure", +}, + }; + string ifMatch = "dfjkwelr7384"; + ArmOperation lro = await fleet.UpdateAsync(WaitUntil.Completed, patch, ifMatch: ifMatch); + FleetResource 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 + FleetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Deletes a Fleet resource asynchronously with a long running operation. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeletesAFleetResourceAsynchronouslyWithALongRunningOperation() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Delete.json + // this example is just showing the usage of "Fleets_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 FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // invoke the operation + await fleet.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Lists the user credentials of a Fleet. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetCredentials_ListsTheUserCredentialsOfAFleet() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListCredentialsResult.json + // this example is just showing the usage of "Fleets_ListCredentials" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // invoke the operation + FleetCredentialResults result = await fleet.GetCredentialsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunCollection.cs b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunCollection.cs new file mode 100644 index 0000000000000..aada239d4f7ca --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunCollection.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.Fleet.Models; + +namespace Azure.ResourceManager.Fleet.Samples +{ + public partial class Sample_UpdateRunCollection + { + // Lists the UpdateRun resources by fleet. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListsTheUpdateRunResourcesByFleet() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_ListByFleet.json + // this example is just showing the usage of "UpdateRuns_ListByFleet" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this UpdateRunResource + UpdateRunCollection collection = fleet.GetUpdateRuns(); + + // invoke the operation and iterate over the result + await foreach (UpdateRunResource 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 + UpdateRunData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Gets an UpdateRun resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAnUpdateRunResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Get.json + // this example is just showing the usage of "UpdateRuns_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 FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this UpdateRunResource + UpdateRunCollection collection = fleet.GetUpdateRuns(); + + // invoke the operation + string updateRunName = "run1"; + UpdateRunResource result = await collection.GetAsync(updateRunName); + + // 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 + UpdateRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Gets an UpdateRun resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetsAnUpdateRunResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Get.json + // this example is just showing the usage of "UpdateRuns_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 FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this UpdateRunResource + UpdateRunCollection collection = fleet.GetUpdateRuns(); + + // invoke the operation + string updateRunName = "run1"; + bool result = await collection.ExistsAsync(updateRunName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Create an UpdateRun. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateAnUpdateRun() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_CreateOrUpdate.json + // this example is just showing the usage of "UpdateRuns_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 FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this UpdateRunResource + UpdateRunCollection collection = fleet.GetUpdateRuns(); + + // invoke the operation + string updateRunName = "run1"; + UpdateRunData data = new UpdateRunData() + { + StrategyStages = +{ +new UpdateStage("stage1") +{ +Groups = +{ +new UpdateGroup("group-a") +}, +AfterStageWaitInSeconds = 3600, +} +}, + ManagedClusterUpdate = new ManagedClusterUpdate(new ManagedClusterUpgradeSpec(ManagedClusterUpgradeType.Full) + { + KubernetesVersion = "1.26.1", + }) + { + SelectionType = NodeImageSelectionType.Latest, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, updateRunName, data); + UpdateRunResource 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 + UpdateRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunResource.cs new file mode 100644 index 0000000000000..76df5af25de8f --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunResource.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.Fleet.Models; + +namespace Azure.ResourceManager.Fleet.Samples +{ + public partial class Sample_UpdateRunResource + { + // Gets an UpdateRun resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAnUpdateRunResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Get.json + // this example is just showing the usage of "UpdateRuns_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 UpdateRunResource created on azure + // for more information of creating UpdateRunResource, please refer to the document of UpdateRunResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + string updateRunName = "run1"; + ResourceIdentifier updateRunResourceId = UpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + UpdateRunResource updateRun = client.GetUpdateRunResource(updateRunResourceId); + + // invoke the operation + UpdateRunResource result = await updateRun.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 + UpdateRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create an UpdateRun. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateAnUpdateRun() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_CreateOrUpdate.json + // this example is just showing the usage of "UpdateRuns_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 UpdateRunResource created on azure + // for more information of creating UpdateRunResource, please refer to the document of UpdateRunResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + string updateRunName = "run1"; + ResourceIdentifier updateRunResourceId = UpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + UpdateRunResource updateRun = client.GetUpdateRunResource(updateRunResourceId); + + // invoke the operation + UpdateRunData data = new UpdateRunData() + { + StrategyStages = +{ +new UpdateStage("stage1") +{ +Groups = +{ +new UpdateGroup("group-a") +}, +AfterStageWaitInSeconds = 3600, +} +}, + ManagedClusterUpdate = new ManagedClusterUpdate(new ManagedClusterUpgradeSpec(ManagedClusterUpgradeType.Full) + { + KubernetesVersion = "1.26.1", + }) + { + SelectionType = NodeImageSelectionType.Latest, + }, + }; + ArmOperation lro = await updateRun.UpdateAsync(WaitUntil.Completed, data); + UpdateRunResource 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 + UpdateRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete an updateRun resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAnUpdateRunResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Delete.json + // this example is just showing the usage of "UpdateRuns_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 UpdateRunResource created on azure + // for more information of creating UpdateRunResource, please refer to the document of UpdateRunResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + string updateRunName = "run1"; + ResourceIdentifier updateRunResourceId = UpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + UpdateRunResource updateRun = client.GetUpdateRunResource(updateRunResourceId); + + // invoke the operation + await updateRun.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Starts an UpdateRun. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Start_StartsAnUpdateRun() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Start.json + // this example is just showing the usage of "UpdateRuns_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this UpdateRunResource created on azure + // for more information of creating UpdateRunResource, please refer to the document of UpdateRunResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + string updateRunName = "run1"; + ResourceIdentifier updateRunResourceId = UpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + UpdateRunResource updateRun = client.GetUpdateRunResource(updateRunResourceId); + + // invoke the operation + ArmOperation lro = await updateRun.StartAsync(WaitUntil.Completed); + UpdateRunResource 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 + UpdateRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Stops an UpdateRun. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Stop_StopsAnUpdateRun() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Stop.json + // this example is just showing the usage of "UpdateRuns_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this UpdateRunResource created on azure + // for more information of creating UpdateRunResource, please refer to the document of UpdateRunResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + string updateRunName = "run1"; + ResourceIdentifier updateRunResourceId = UpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + UpdateRunResource updateRun = client.GetUpdateRunResource(updateRunResourceId); + + // invoke the operation + ArmOperation lro = await updateRun.StopAsync(WaitUntil.Completed); + UpdateRunResource 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 + UpdateRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Azure.ResourceManager.Fleet.csproj b/sdk/fleet/Azure.ResourceManager.Fleet/src/Azure.ResourceManager.Fleet.csproj new file mode 100644 index 0000000000000..265c9eb98b991 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Azure.ResourceManager.Fleet.csproj @@ -0,0 +1,8 @@ + + + 1.0.0-beta.1 + Azure.ResourceManager.Fleet + Azure Resource Manager client SDK for Azure resource provider Fleet. + azure;management;arm;resource manager;fleet + + diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/ArmFleetModelFactory.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/ArmFleetModelFactory.cs new file mode 100644 index 0000000000000..3b083fb431789 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/ArmFleetModelFactory.cs @@ -0,0 +1,186 @@ +// 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; +using Azure.Core; +using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// Model factory for models. + public static partial class ArmFleetModelFactory + { + /// Initializes a new instance of FleetData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Managed identity. + /// The status of the last operation. + /// The FleetHubProfile configures the Fleet's hub. + /// A new instance for mocking. + public static FleetData FleetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? eTag = null, ManagedServiceIdentity identity = null, FleetProvisioningState? provisioningState = null, FleetHubProfile hubProfile = null) + { + tags ??= new Dictionary(); + + return new FleetData(id, name, resourceType, systemData, tags, location, eTag, identity, provisioningState, hubProfile); + } + + /// Initializes a new instance of FleetHubProfile. + /// DNS prefix used to create the FQDN for the Fleet hub. + /// The access profile for the Fleet hub API server. + /// The agent profile for the Fleet hub. + /// The FQDN of the Fleet hub. + /// The Kubernetes version of the Fleet hub. + /// A new instance for mocking. + public static FleetHubProfile FleetHubProfile(string dnsPrefix = null, APIServerAccessProfile apiServerAccessProfile = null, ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null) + { + return new FleetHubProfile(dnsPrefix, apiServerAccessProfile, agentSubnetId != null ? new AgentProfile(agentSubnetId) : null, fqdn, kubernetesVersion); + } + + /// Initializes a new instance of FleetCredentialResults. + /// Array of base64-encoded Kubernetes configuration files. + /// A new instance for mocking. + public static FleetCredentialResults FleetCredentialResults(IEnumerable kubeconfigs = null) + { + kubeconfigs ??= new List(); + + return new FleetCredentialResults(kubeconfigs?.ToList()); + } + + /// Initializes a new instance of FleetCredentialResult. + /// The name of the credential. + /// Base64-encoded Kubernetes configuration file. + /// A new instance for mocking. + public static FleetCredentialResult FleetCredentialResult(string name = null, byte[] value = null) + { + return new FleetCredentialResult(name, value); + } + + /// Initializes a new instance of FleetMemberData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. + /// The group this member belongs to for multi-cluster update management. + /// The status of the last operation. + /// A new instance for mocking. + public static FleetMemberData FleetMemberData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, ResourceIdentifier clusterResourceId = null, string group = null, FleetMemberProvisioningState? provisioningState = null) + { + return new FleetMemberData(id, name, resourceType, systemData, eTag, clusterResourceId, group, provisioningState); + } + + /// Initializes a new instance of UpdateRunData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// The provisioning state of the UpdateRun resource. + /// + /// The strategy defines the order in which the clusters will be updated. + /// If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single UpdateGroup targeting all members. + /// The strategy of the UpdateRun can be modified until the run is started. + /// + /// The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started. + /// The status of the UpdateRun. + /// A new instance for mocking. + public static UpdateRunData UpdateRunData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, UpdateRunProvisioningState? provisioningState = null, IEnumerable strategyStages = null, ManagedClusterUpdate managedClusterUpdate = null, UpdateRunStatus status = null) + { + strategyStages ??= new List(); + + return new UpdateRunData(id, name, resourceType, systemData, eTag, provisioningState, strategyStages != null ? new UpdateRunStrategy(strategyStages?.ToList()) : null, managedClusterUpdate, status); + } + + /// Initializes a new instance of UpdateRunStatus. + /// The status of the UpdateRun. + /// The stages composing an update run. Stages are run sequentially withing an UpdateRun. + /// The node image upgrade specs for the update run. It is only set in update run when `NodeImageSelection.type` is `Consistent`. + /// A new instance for mocking. + public static UpdateRunStatus UpdateRunStatus(UpdateStatus status = null, IEnumerable stages = null, IEnumerable selectedNodeImageVersions = null) + { + stages ??= new List(); + selectedNodeImageVersions ??= new List(); + + return new UpdateRunStatus(status, stages?.ToList(), selectedNodeImageVersions != null ? new NodeImageSelectionStatus(selectedNodeImageVersions?.ToList()) : null); + } + + /// Initializes a new instance of UpdateStatus. + /// The time the operation or group was started. + /// The time the operation or group was completed. + /// The State of the operation or group. + /// The error details when a failure is encountered. + /// A new instance for mocking. + public static UpdateStatus UpdateStatus(DateTimeOffset? startOn = null, DateTimeOffset? completedOn = null, UpdateState? state = null, ResponseError error = null) + { + return new UpdateStatus(startOn, completedOn, state, error); + } + + /// Initializes a new instance of UpdateStageStatus. + /// The status of the UpdateStage. + /// The name of the UpdateStage. + /// The list of groups to be updated as part of this UpdateStage. + /// The status of the wait period configured on the UpdateStage. + /// A new instance for mocking. + public static UpdateStageStatus UpdateStageStatus(UpdateStatus status = null, string name = null, IEnumerable groups = null, WaitStatus afterStageWaitStatus = null) + { + groups ??= new List(); + + return new UpdateStageStatus(status, name, groups?.ToList(), afterStageWaitStatus); + } + + /// Initializes a new instance of UpdateGroupStatus. + /// The status of the UpdateGroup. + /// The name of the UpdateGroup. + /// The list of member this UpdateGroup updates. + /// A new instance for mocking. + public static UpdateGroupStatus UpdateGroupStatus(UpdateStatus status = null, string name = null, IEnumerable members = null) + { + members ??= new List(); + + return new UpdateGroupStatus(status, name, members?.ToList()); + } + + /// Initializes a new instance of MemberUpdateStatus. + /// The status of the MemberUpdate operation. + /// The name of the FleetMember. + /// The Azure resource id of the target Kubernetes cluster. + /// The operation resource id of the latest attempt to perform the operation. + /// The status message after processing the member update operation. + /// A new instance for mocking. + public static MemberUpdateStatus MemberUpdateStatus(UpdateStatus status = null, string name = null, string clusterResourceId = null, string operationId = null, string message = null) + { + return new MemberUpdateStatus(status, name, clusterResourceId, operationId, message); + } + + /// Initializes a new instance of WaitStatus. + /// The status of the wait duration. + /// The wait duration configured in seconds. + /// A new instance for mocking. + public static WaitStatus WaitStatus(UpdateStatus status = null, int? waitDurationInSeconds = null) + { + return new WaitStatus(status, waitDurationInSeconds); + } + + /// Initializes a new instance of NodeImageVersion. + /// The image version to upgrade the nodes to (e.g., 'AKSUbuntu-1804gen2containerd-2022.12.13'). + /// A new instance for mocking. + public static NodeImageVersion NodeImageVersion(string version = null) + { + return new NodeImageVersion(version); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/FleetExtensions.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/FleetExtensions.cs new file mode 100644 index 0000000000000..ab2e36280f8aa --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/FleetExtensions.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Fleet +{ + /// A class to add extension methods to Azure.ResourceManager.Fleet. + public static partial class FleetExtensions + { + private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmResource resource) + { + return resource.GetCachedClient(client => + { + return new ResourceGroupResourceExtensionClient(client, resource.Id); + }); + } + + private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmClient client, ResourceIdentifier scope) + { + return client.GetResourceClient(() => + { + return new ResourceGroupResourceExtensionClient(client, scope); + }); + } + + private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtensionClient(ArmResource resource) + { + return resource.GetCachedClient(client => + { + return new SubscriptionResourceExtensionClient(client, resource.Id); + }); + } + + private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifier scope) + { + return client.GetResourceClient(() => + { + return new SubscriptionResourceExtensionClient(client, scope); + }); + } + #region FleetResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static FleetResource GetFleetResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + FleetResource.ValidateResourceId(id); + return new FleetResource(client, id); + } + ); + } + #endregion + + #region FleetMemberResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static FleetMemberResource GetFleetMemberResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + FleetMemberResource.ValidateResourceId(id); + return new FleetMemberResource(client, id); + } + ); + } + #endregion + + #region UpdateRunResource + /// + /// 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 instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static UpdateRunResource GetUpdateRunResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + UpdateRunResource.ValidateResourceId(id); + return new UpdateRunResource(client, id); + } + ); + } + #endregion + + /// Gets a collection of FleetResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of FleetResources and their operations over a FleetResource. + public static FleetCollection GetFleets(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetFleets(); + } + + /// + /// Gets a Fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// The instance the method will execute against. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetFleetAsync(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetFleets().GetAsync(fleetName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// The instance the method will execute against. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetFleet(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetFleets().Get(fleetName, cancellationToken); + } + + /// + /// Lists fleets in the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/fleets + /// + /// + /// Operation Id + /// Fleets_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetFleetsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetFleetsAsync(cancellationToken); + } + + /// + /// Lists fleets in the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/fleets + /// + /// + /// Operation Id + /// Fleets_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetFleets(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetFleets(cancellationToken); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs new file mode 100644 index 0000000000000..9cfe39d72442b --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Fleet +{ + /// A class to add extension methods to ResourceGroupResource. + internal partial class ResourceGroupResourceExtensionClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected ResourceGroupResourceExtensionClient() + { + } + + /// 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 ResourceGroupResourceExtensionClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of FleetResources in the ResourceGroupResource. + /// An object representing collection of FleetResources and their operations over a FleetResource. + public virtual FleetCollection GetFleets() + { + return GetCachedClient(Client => new FleetCollection(Client, Id)); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs new file mode 100644 index 0000000000000..2b8818f07e4a0 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Fleet +{ + /// A class to add extension methods to SubscriptionResource. + internal partial class SubscriptionResourceExtensionClient : ArmResource + { + private ClientDiagnostics _fleetClientDiagnostics; + private FleetsRestOperations _fleetRestClient; + + /// Initializes a new instance of the class for mocking. + protected SubscriptionResourceExtensionClient() + { + } + + /// 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 SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics FleetClientDiagnostics => _fleetClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Fleet", FleetResource.ResourceType.Namespace, Diagnostics); + private FleetsRestOperations FleetRestClient => _fleetRestClient ??= new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(FleetResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Lists fleets in the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/fleets + /// + /// + /// Operation Id + /// Fleets_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetFleetsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => FleetRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FleetRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), FleetClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetFleets", "value", "nextLink", cancellationToken); + } + + /// + /// Lists fleets in the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/fleets + /// + /// + /// Operation Id + /// Fleets_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetFleets(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => FleetRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FleetRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), FleetClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetFleets", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetCollection.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetCollection.cs new file mode 100644 index 0000000000000..dcc698e99f6a3 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetCollection.cs @@ -0,0 +1,346 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Fleet +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetFleets method from an instance of . + /// + public partial class FleetCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _fleetClientDiagnostics; + private readonly FleetsRestOperations _fleetRestClient; + + /// Initializes a new instance of the class for mocking. + protected FleetCollection() + { + } + + /// 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 FleetCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fleetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Fleet", FleetResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(FleetResource.ResourceType, out string fleetApiVersion); + _fleetRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetApiVersion); +#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)); + } + + /// + /// Creates or updates a Fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_CreateOrUpdate + /// + /// + /// + /// 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 Fleet resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// 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 fleetName, FleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _fleetRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new FleetArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a Fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_CreateOrUpdate + /// + /// + /// + /// 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 Fleet resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// 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 fleetName, FleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _fleetRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new FleetArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// The name of the Fleet resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Get"); + scope.Start(); + try + { + var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// The name of the Fleet resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Get"); + scope.Start(); + try + { + var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists fleets in the specified subscription and resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets + /// + /// + /// Operation Id + /// Fleets_ListByResourceGroup + /// + /// + /// + /// 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) => _fleetRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), _fleetClientDiagnostics, Pipeline, "FleetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists fleets in the specified subscription and resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets + /// + /// + /// Operation Id + /// Fleets_ListByResourceGroup + /// + /// + /// + /// 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) => _fleetRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), _fleetClientDiagnostics, Pipeline, "FleetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// The name of the Fleet resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Exists"); + scope.Start(); + try + { + var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, 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.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// The name of the Fleet resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Exists"); + scope.Start(); + try + { + var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetData.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetData.cs new file mode 100644 index 0000000000000..49f54f7c99821 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetData.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Fleet +{ + /// + /// A class representing the Fleet data model. + /// The Fleet resource. + /// + public partial class FleetData : TrackedResourceData + { + /// Initializes a new instance of FleetData. + /// The location. + public FleetData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of FleetData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Managed identity. + /// The status of the last operation. + /// The FleetHubProfile configures the Fleet's hub. + internal FleetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? eTag, ManagedServiceIdentity identity, FleetProvisioningState? provisioningState, FleetHubProfile hubProfile) : base(id, name, resourceType, systemData, tags, location) + { + ETag = eTag; + Identity = identity; + ProvisioningState = provisioningState; + HubProfile = hubProfile; + } + + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + /// Managed identity. + public ManagedServiceIdentity Identity { get; set; } + /// The status of the last operation. + public FleetProvisioningState? ProvisioningState { get; } + /// The FleetHubProfile configures the Fleet's hub. + public FleetHubProfile HubProfile { get; set; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberCollection.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberCollection.cs new file mode 100644 index 0000000000000..5ef265e73f875 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberCollection.cs @@ -0,0 +1,345 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Fleet +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetFleetMembers method from an instance of . + /// + public partial class FleetMemberCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _fleetMemberClientDiagnostics; + private readonly FleetMembersRestOperations _fleetMemberRestClient; + + /// Initializes a new instance of the class for mocking. + protected FleetMemberCollection() + { + } + + /// 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 FleetMemberCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fleetMemberClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Fleet", FleetMemberResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(FleetMemberResource.ResourceType, out string fleetMemberApiVersion); + _fleetMemberRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetMemberApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != FleetResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, FleetResource.ResourceType), nameof(id)); + } + + /// + /// Create a FleetMember + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Create + /// + /// + /// + /// 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 Fleet member resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// 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 fleetMemberName, FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _fleetMemberRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new FleetArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).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 FleetMember + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Create + /// + /// + /// + /// 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 Fleet member resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// 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 fleetMemberName, FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _fleetMemberRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new FleetArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a FleetMember + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Get + /// + /// + /// + /// The name of the Fleet member resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string fleetMemberName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.Get"); + scope.Start(); + try + { + var response = await _fleetMemberRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetMemberResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a FleetMember + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Get + /// + /// + /// + /// The name of the Fleet member resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string fleetMemberName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.Get"); + scope.Start(); + try + { + var response = _fleetMemberRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetMemberResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List FleetMember resources by Fleet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members + /// + /// + /// Operation Id + /// FleetMembers_ListByFleet + /// + /// + /// + /// 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) => _fleetMemberRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetMemberRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FleetMemberResource(Client, FleetMemberData.DeserializeFleetMemberData(e)), _fleetMemberClientDiagnostics, Pipeline, "FleetMemberCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List FleetMember resources by Fleet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members + /// + /// + /// Operation Id + /// FleetMembers_ListByFleet + /// + /// + /// + /// 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) => _fleetMemberRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetMemberRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FleetMemberResource(Client, FleetMemberData.DeserializeFleetMemberData(e)), _fleetMemberClientDiagnostics, Pipeline, "FleetMemberCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Get + /// + /// + /// + /// The name of the Fleet member resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string fleetMemberName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.Exists"); + scope.Start(); + try + { + var response = await _fleetMemberRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, 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.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Get + /// + /// + /// + /// The name of the Fleet member resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string fleetMemberName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.Exists"); + scope.Start(); + try + { + var response = _fleetMemberRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberData.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberData.cs new file mode 100644 index 0000000000000..b509d77384838 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberData.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; +using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Fleet +{ + /// + /// A class representing the FleetMember data model. + /// A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. + /// + public partial class FleetMemberData : ResourceData + { + /// Initializes a new instance of FleetMemberData. + public FleetMemberData() + { + } + + /// Initializes a new instance of FleetMemberData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. + /// The group this member belongs to for multi-cluster update management. + /// The status of the last operation. + internal FleetMemberData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, ResourceIdentifier clusterResourceId, string group, FleetMemberProvisioningState? provisioningState) : base(id, name, resourceType, systemData) + { + ETag = eTag; + ClusterResourceId = clusterResourceId; + Group = group; + ProvisioningState = provisioningState; + } + + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + /// The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. + public ResourceIdentifier ClusterResourceId { get; set; } + /// The group this member belongs to for multi-cluster update management. + public string Group { get; set; } + /// The status of the last operation. + public FleetMemberProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberResource.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberResource.cs new file mode 100644 index 0000000000000..2f028f6514a96 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberResource.cs @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Fleet.Models; + +namespace Azure.ResourceManager.Fleet +{ + /// + /// A Class representing a FleetMember along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetFleetMemberResource method. + /// Otherwise you can get one from its parent resource using the GetFleetMember method. + /// + public partial class FleetMemberResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _fleetMemberClientDiagnostics; + private readonly FleetMembersRestOperations _fleetMemberRestClient; + private readonly FleetMemberData _data; + + /// Initializes a new instance of the class for mocking. + protected FleetMemberResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal FleetMemberResource(ArmClient client, FleetMemberData 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 FleetMemberResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fleetMemberClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Fleet", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string fleetMemberApiVersion); + _fleetMemberRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetMemberApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ContainerService/fleets/members"; + + /// 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 FleetMemberData 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 FleetMember + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberResource.Get"); + scope.Start(); + try + { + var response = await _fleetMemberRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetMemberResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a FleetMember + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberResource.Get"); + scope.Start(); + try + { + var response = _fleetMemberRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetMemberResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a FleetMember + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Delete + /// + /// + /// + /// 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 request should only proceed if an entity matches this string. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberResource.Delete"); + scope.Start(); + try + { + var response = await _fleetMemberRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new FleetArmOperation(_fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).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 FleetMember + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Delete + /// + /// + /// + /// 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 request should only proceed if an entity matches this string. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberResource.Delete"); + scope.Start(); + try + { + var response = _fleetMemberRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new FleetArmOperation(_fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a FleetMember + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, FleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberResource.Update"); + scope.Start(); + try + { + var response = await _fleetMemberRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new FleetArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a FleetMember + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, FleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberResource.Update"); + scope.Start(); + try + { + var response = _fleetMemberRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken); + var operation = new FleetArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetResource.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetResource.cs new file mode 100644 index 0000000000000..5f49b9a1b1a21 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetResource.cs @@ -0,0 +1,780 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Fleet +{ + /// + /// A Class representing a Fleet along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetFleetResource method. + /// Otherwise you can get one from its parent resource using the GetFleet method. + /// + public partial class FleetResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _fleetClientDiagnostics; + private readonly FleetsRestOperations _fleetRestClient; + private readonly FleetData _data; + + /// Initializes a new instance of the class for mocking. + protected FleetResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal FleetResource(ArmClient client, FleetData 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 FleetResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fleetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Fleet", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string fleetApiVersion); + _fleetRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ContainerService/fleets"; + + /// 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 FleetData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of FleetMemberResources in the Fleet. + /// An object representing collection of FleetMemberResources and their operations over a FleetMemberResource. + public virtual FleetMemberCollection GetFleetMembers() + { + return GetCachedClient(Client => new FleetMemberCollection(Client, Id)); + } + + /// + /// Get a FleetMember + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Get + /// + /// + /// + /// The name of the Fleet member resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetFleetMemberAsync(string fleetMemberName, CancellationToken cancellationToken = default) + { + return await GetFleetMembers().GetAsync(fleetMemberName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a FleetMember + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Get + /// + /// + /// + /// The name of the Fleet member resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetFleetMember(string fleetMemberName, CancellationToken cancellationToken = default) + { + return GetFleetMembers().Get(fleetMemberName, cancellationToken); + } + + /// Gets a collection of UpdateRunResources in the Fleet. + /// An object representing collection of UpdateRunResources and their operations over a UpdateRunResource. + public virtual UpdateRunCollection GetUpdateRuns() + { + return GetCachedClient(Client => new UpdateRunCollection(Client, Id)); + } + + /// + /// Get a UpdateRun + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_Get + /// + /// + /// + /// The name of the UpdateRun resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetUpdateRunAsync(string updateRunName, CancellationToken cancellationToken = default) + { + return await GetUpdateRuns().GetAsync(updateRunName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a UpdateRun + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_Get + /// + /// + /// + /// The name of the UpdateRun resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetUpdateRun(string updateRunName, CancellationToken cancellationToken = default) + { + return GetUpdateRuns().Get(updateRunName, cancellationToken); + } + + /// + /// Gets a Fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Get"); + scope.Start(); + try + { + var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Get"); + scope.Start(); + try + { + var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Fleet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Delete + /// + /// + /// + /// 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 request should only proceed if an entity matches this string. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Delete"); + scope.Start(); + try + { + var response = await _fleetRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new FleetArmOperation(_fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).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 Fleet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Delete + /// + /// + /// + /// 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 request should only proceed if an entity matches this string. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Delete"); + scope.Start(); + try + { + var response = _fleetRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken); + var operation = new FleetArmOperation(_fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Fleet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, FleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Update"); + scope.Start(); + try + { + var response = await _fleetRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new FleetArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Fleet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, FleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Update"); + scope.Start(); + try + { + var response = _fleetRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken); + var operation = new FleetArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the user credentials of a Fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/listCredentials + /// + /// + /// Operation Id + /// Fleets_ListCredentials + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetCredentialsAsync(CancellationToken cancellationToken = default) + { + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.GetCredentials"); + scope.Start(); + try + { + var response = await _fleetRestClient.ListCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the user credentials of a Fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/listCredentials + /// + /// + /// Operation Id + /// Fleets_ListCredentials + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetCredentials(CancellationToken cancellationToken = default) + { + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.GetCredentials"); + scope.Start(); + try + { + var response = _fleetRestClient.ListCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// 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 = _fleetClientDiagnostics.CreateScope("FleetResource.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 _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new FleetPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// 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 = _fleetClientDiagnostics.CreateScope("FleetResource.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 = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new FleetPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// 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 = _fleetClientDiagnostics.CreateScope("FleetResource.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 _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new FleetPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// 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 = _fleetClientDiagnostics.CreateScope("FleetResource.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 = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new FleetPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// 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 = _fleetClientDiagnostics.CreateScope("FleetResource.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 _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new FleetPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// 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 = _fleetClientDiagnostics.CreateScope("FleetResource.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 = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new FleetPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperation.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperation.cs new file mode 100644 index 0000000000000..2d4a005231c6e --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperation.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Fleet +{ +#pragma warning disable SA1649 // File name should match first type name + internal class FleetArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + + /// Initializes a new instance of FleetArmOperation for mocking. + protected FleetArmOperation() + { + } + + internal FleetArmOperation(Response response) + { + _operation = OperationInternal.Succeeded(response); + } + + internal FleetArmOperation(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); + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "FleetArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + /// +#pragma warning disable CA1822 + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public override string Id => throw new NotImplementedException(); +#pragma warning restore CA1822 + + /// + 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/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperationOfT.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperationOfT.cs new file mode 100644 index 0000000000000..3672c40adf89e --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperationOfT.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Fleet +{ +#pragma warning disable SA1649 // File name should match first type name + internal class FleetArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + + /// Initializes a new instance of FleetArmOperation for mocking. + protected FleetArmOperation() + { + } + + internal FleetArmOperation(Response response) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + } + + internal FleetArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(source, pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "FleetArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + /// +#pragma warning disable CA1822 + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public override string Id => throw new NotImplementedException(); +#pragma warning restore CA1822 + + /// + 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/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs new file mode 100644 index 0000000000000..54183c3f98f8e --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Fleet +{ + internal class FleetMemberOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal FleetMemberOperationSource(ArmClient client) + { + _client = client; + } + + FleetMemberResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = FleetMemberData.DeserializeFleetMemberData(document.RootElement); + return new FleetMemberResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = FleetMemberData.DeserializeFleetMemberData(document.RootElement); + return new FleetMemberResource(_client, data); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetOperationSource.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetOperationSource.cs new file mode 100644 index 0000000000000..c7d7a0eb544cd --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Fleet +{ + internal class FleetOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal FleetOperationSource(ArmClient client) + { + _client = client; + } + + FleetResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = FleetData.DeserializeFleetData(document.RootElement); + return new FleetResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = FleetData.DeserializeFleetData(document.RootElement); + return new FleetResource(_client, data); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs new file mode 100644 index 0000000000000..9f31045776300 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Fleet +{ + internal class UpdateRunOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal UpdateRunOperationSource(ArmClient client) + { + _client = client; + } + + UpdateRunResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = UpdateRunData.DeserializeUpdateRunData(document.RootElement); + return new UpdateRunResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = UpdateRunData.DeserializeUpdateRunData(document.RootElement); + return new UpdateRunResource(_client, data); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.Serialization.cs new file mode 100644 index 0000000000000..1ec1a99a8e581 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class APIServerAccessProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EnablePrivateCluster)) + { + writer.WritePropertyName("enablePrivateCluster"u8); + writer.WriteBooleanValue(EnablePrivateCluster.Value); + } + if (Optional.IsDefined(EnableVnetIntegration)) + { + writer.WritePropertyName("enableVnetIntegration"u8); + writer.WriteBooleanValue(EnableVnetIntegration.Value); + } + if (Optional.IsDefined(SubnetId)) + { + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + } + writer.WriteEndObject(); + } + + internal static APIServerAccessProfile DeserializeAPIServerAccessProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional enablePrivateCluster = default; + Optional enableVnetIntegration = default; + Optional subnetId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enablePrivateCluster"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enablePrivateCluster = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("enableVnetIntegration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableVnetIntegration = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new APIServerAccessProfile(Optional.ToNullable(enablePrivateCluster), Optional.ToNullable(enableVnetIntegration), subnetId.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.cs new file mode 100644 index 0000000000000..79bcc63de0bfe --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// Access profile for the Fleet hub API server. + public partial class APIServerAccessProfile + { + /// Initializes a new instance of APIServerAccessProfile. + public APIServerAccessProfile() + { + } + + /// Initializes a new instance of APIServerAccessProfile. + /// Whether to create the Fleet hub as a private cluster or not. + /// Whether to enable apiserver vnet integration for the Fleet hub or not. + /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new Fleet with BYO vnet. + internal APIServerAccessProfile(bool? enablePrivateCluster, bool? enableVnetIntegration, ResourceIdentifier subnetId) + { + EnablePrivateCluster = enablePrivateCluster; + EnableVnetIntegration = enableVnetIntegration; + SubnetId = subnetId; + } + + /// Whether to create the Fleet hub as a private cluster or not. + public bool? EnablePrivateCluster { get; set; } + /// Whether to enable apiserver vnet integration for the Fleet hub or not. + public bool? EnableVnetIntegration { get; set; } + /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new Fleet with BYO vnet. + public ResourceIdentifier SubnetId { get; set; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.Serialization.cs new file mode 100644 index 0000000000000..ef9024630a65e --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + internal partial class AgentProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SubnetId)) + { + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + } + writer.WriteEndObject(); + } + + internal static AgentProfile DeserializeAgentProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional subnetId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new AgentProfile(subnetId.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.cs new file mode 100644 index 0000000000000..0d0802dd91f89 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// Agent profile for the Fleet hub. + internal partial class AgentProfile + { + /// Initializes a new instance of AgentProfile. + public AgentProfile() + { + } + + /// Initializes a new instance of AgentProfile. + /// The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet will be generated and used. + internal AgentProfile(ResourceIdentifier subnetId) + { + SubnetId = subnetId; + } + + /// The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet will be generated and used. + public ResourceIdentifier SubnetId { get; set; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.Serialization.cs new file mode 100644 index 0000000000000..e0a857adca9a5 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.Serialization.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class FleetCredentialResult + { + internal static FleetCredentialResult DeserializeFleetCredentialResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = property.Value.GetBytesFromBase64("D"); + continue; + } + } + return new FleetCredentialResult(name.Value, value.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.cs new file mode 100644 index 0000000000000..a2f88999caeb1 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// One credential result item. + public partial class FleetCredentialResult + { + /// Initializes a new instance of FleetCredentialResult. + internal FleetCredentialResult() + { + } + + /// Initializes a new instance of FleetCredentialResult. + /// The name of the credential. + /// Base64-encoded Kubernetes configuration file. + internal FleetCredentialResult(string name, byte[] value) + { + Name = name; + Value = value; + } + + /// The name of the credential. + public string Name { get; } + /// Base64-encoded Kubernetes configuration file. + public byte[] Value { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.Serialization.cs new file mode 100644 index 0000000000000..f87cecb3f635e --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.Serialization.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class FleetCredentialResults + { + internal static FleetCredentialResults DeserializeFleetCredentialResults(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> kubeconfigs = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kubeconfigs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FleetCredentialResult.DeserializeFleetCredentialResult(item)); + } + kubeconfigs = array; + continue; + } + } + return new FleetCredentialResults(Optional.ToList(kubeconfigs)); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.cs new file mode 100644 index 0000000000000..43b2cbf280acc --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The Credential results response. + public partial class FleetCredentialResults + { + /// Initializes a new instance of FleetCredentialResults. + internal FleetCredentialResults() + { + Kubeconfigs = new ChangeTrackingList(); + } + + /// Initializes a new instance of FleetCredentialResults. + /// Array of base64-encoded Kubernetes configuration files. + internal FleetCredentialResults(IReadOnlyList kubeconfigs) + { + Kubeconfigs = kubeconfigs; + } + + /// Array of base64-encoded Kubernetes configuration files. + public IReadOnlyList Kubeconfigs { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetData.Serialization.cs new file mode 100644 index 0000000000000..6259668b1c5a7 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetData.Serialization.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; +using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Fleet +{ + public partial class FleetData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(HubProfile)) + { + writer.WritePropertyName("hubProfile"u8); + writer.WriteObjectValue(HubProfile); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static FleetData DeserializeFleetData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional eTag = default; + Optional identity = default; + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional provisioningState = default; + Optional hubProfile = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + eTag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + 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 (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new FleetProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("hubProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hubProfile = FleetHubProfile.DeserializeFleetHubProfile(property0.Value); + continue; + } + } + continue; + } + } + return new FleetData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(eTag), identity, Optional.ToNullable(provisioningState), hubProfile.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.Serialization.cs new file mode 100644 index 0000000000000..bbeefa33fae81 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.Serialization.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class FleetHubProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DnsPrefix)) + { + writer.WritePropertyName("dnsPrefix"u8); + writer.WriteStringValue(DnsPrefix); + } + if (Optional.IsDefined(ApiServerAccessProfile)) + { + writer.WritePropertyName("apiServerAccessProfile"u8); + writer.WriteObjectValue(ApiServerAccessProfile); + } + if (Optional.IsDefined(AgentProfile)) + { + writer.WritePropertyName("agentProfile"u8); + writer.WriteObjectValue(AgentProfile); + } + writer.WriteEndObject(); + } + + internal static FleetHubProfile DeserializeFleetHubProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional dnsPrefix = default; + Optional apiServerAccessProfile = default; + Optional agentProfile = default; + Optional fqdn = default; + Optional kubernetesVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dnsPrefix"u8)) + { + dnsPrefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiServerAccessProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + apiServerAccessProfile = APIServerAccessProfile.DeserializeAPIServerAccessProfile(property.Value); + continue; + } + if (property.NameEquals("agentProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + agentProfile = AgentProfile.DeserializeAgentProfile(property.Value); + continue; + } + if (property.NameEquals("fqdn"u8)) + { + fqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("kubernetesVersion"u8)) + { + kubernetesVersion = property.Value.GetString(); + continue; + } + } + return new FleetHubProfile(dnsPrefix.Value, apiServerAccessProfile.Value, agentProfile.Value, fqdn.Value, kubernetesVersion.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.cs new file mode 100644 index 0000000000000..6dd6a17414cf4 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The FleetHubProfile configures the fleet hub. + public partial class FleetHubProfile + { + /// Initializes a new instance of FleetHubProfile. + public FleetHubProfile() + { + } + + /// Initializes a new instance of FleetHubProfile. + /// DNS prefix used to create the FQDN for the Fleet hub. + /// The access profile for the Fleet hub API server. + /// The agent profile for the Fleet hub. + /// The FQDN of the Fleet hub. + /// The Kubernetes version of the Fleet hub. + internal FleetHubProfile(string dnsPrefix, APIServerAccessProfile apiServerAccessProfile, AgentProfile agentProfile, string fqdn, string kubernetesVersion) + { + DnsPrefix = dnsPrefix; + ApiServerAccessProfile = apiServerAccessProfile; + AgentProfile = agentProfile; + Fqdn = fqdn; + KubernetesVersion = kubernetesVersion; + } + + /// DNS prefix used to create the FQDN for the Fleet hub. + public string DnsPrefix { get; set; } + /// The access profile for the Fleet hub API server. + public APIServerAccessProfile ApiServerAccessProfile { get; set; } + /// The agent profile for the Fleet hub. + internal AgentProfile AgentProfile { get; set; } + /// The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet will be generated and used. + public ResourceIdentifier AgentSubnetId + { + get => AgentProfile is null ? default : AgentProfile.SubnetId; + set + { + if (AgentProfile is null) + AgentProfile = new AgentProfile(); + AgentProfile.SubnetId = value; + } + } + + /// The FQDN of the Fleet hub. + public string Fqdn { get; } + /// The Kubernetes version of the Fleet hub. + public string KubernetesVersion { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.Serialization.cs new file mode 100644 index 0000000000000..9d44a2b968611 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Fleet; + +namespace Azure.ResourceManager.Fleet.Models +{ + internal partial class FleetListResult + { + internal static FleetListResult DeserializeFleetListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FleetData.DeserializeFleetData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + } + return new FleetListResult(value, nextLink.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.cs new file mode 100644 index 0000000000000..0788638a5ebff --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.cs @@ -0,0 +1,43 @@ +// 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.Fleet; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The response of a Fleet list operation. + internal partial class FleetListResult + { + /// Initializes a new instance of FleetListResult. + /// The Fleet items on this page. + /// is null. + internal FleetListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of FleetListResult. + /// The Fleet items on this page. + /// The link to the next page of items. + internal FleetListResult(IReadOnlyList value, Uri nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The Fleet items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberData.Serialization.cs new file mode 100644 index 0000000000000..1bd1bdaea87f7 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberData.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; +using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Fleet +{ + public partial class FleetMemberData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ClusterResourceId)) + { + writer.WritePropertyName("clusterResourceId"u8); + writer.WriteStringValue(ClusterResourceId); + } + if (Optional.IsDefined(Group)) + { + writer.WritePropertyName("group"u8); + writer.WriteStringValue(Group); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static FleetMemberData DeserializeFleetMemberData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional eTag = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional clusterResourceId = default; + Optional group = default; + Optional provisioningState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + eTag = new ETag(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 (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("clusterResourceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterResourceId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("group"u8)) + { + group = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new FleetMemberProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new FleetMemberData(id, name, type, systemData.Value, Optional.ToNullable(eTag), clusterResourceId.Value, group.Value, Optional.ToNullable(provisioningState)); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.Serialization.cs new file mode 100644 index 0000000000000..dac6686e03304 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Fleet; + +namespace Azure.ResourceManager.Fleet.Models +{ + internal partial class FleetMemberListResult + { + internal static FleetMemberListResult DeserializeFleetMemberListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FleetMemberData.DeserializeFleetMemberData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + } + return new FleetMemberListResult(value, nextLink.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.cs new file mode 100644 index 0000000000000..39e579f08fcbe --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.cs @@ -0,0 +1,43 @@ +// 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.Fleet; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The response of a FleetMember list operation. + internal partial class FleetMemberListResult + { + /// Initializes a new instance of FleetMemberListResult. + /// The FleetMember items on this page. + /// is null. + internal FleetMemberListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of FleetMemberListResult. + /// The FleetMember items on this page. + /// The link to the next page of items. + internal FleetMemberListResult(IReadOnlyList value, Uri nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The FleetMember items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.Serialization.cs new file mode 100644 index 0000000000000..67de68baa70ff --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class FleetMemberPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Group)) + { + writer.WritePropertyName("group"u8); + writer.WriteStringValue(Group); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.cs new file mode 100644 index 0000000000000..1c390d4c3ad4d --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The type used for update operations of the FleetMember. + public partial class FleetMemberPatch + { + /// Initializes a new instance of FleetMemberPatch. + public FleetMemberPatch() + { + } + + /// The group this member belongs to for multi-cluster update management. + public string Group { get; set; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberProvisioningState.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberProvisioningState.cs new file mode 100644 index 0000000000000..9896b122c4420 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The provisioning state of the last accepted operation. + public readonly partial struct FleetMemberProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FleetMemberProvisioningState(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 JoiningValue = "Joining"; + private const string LeavingValue = "Leaving"; + private const string UpdatingValue = "Updating"; + + /// Resource has been created. + public static FleetMemberProvisioningState Succeeded { get; } = new FleetMemberProvisioningState(SucceededValue); + /// Resource creation failed. + public static FleetMemberProvisioningState Failed { get; } = new FleetMemberProvisioningState(FailedValue); + /// Resource creation was canceled. + public static FleetMemberProvisioningState Canceled { get; } = new FleetMemberProvisioningState(CanceledValue); + /// The provisioning state of a member joining a fleet. + public static FleetMemberProvisioningState Joining { get; } = new FleetMemberProvisioningState(JoiningValue); + /// The provisioning state of a member leaving a fleet. + public static FleetMemberProvisioningState Leaving { get; } = new FleetMemberProvisioningState(LeavingValue); + /// The provisioning state of a member being updated. + public static FleetMemberProvisioningState Updating { get; } = new FleetMemberProvisioningState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(FleetMemberProvisioningState left, FleetMemberProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FleetMemberProvisioningState left, FleetMemberProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FleetMemberProvisioningState(string value) => new FleetMemberProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FleetMemberProvisioningState other && Equals(other); + /// + public bool Equals(FleetMemberProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.Serialization.cs new file mode 100644 index 0000000000000..b0df44547afba --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class FleetPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.cs new file mode 100644 index 0000000000000..62e5ff687b872 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// Properties of a Fleet that can be patched. + public partial class FleetPatch + { + /// Initializes a new instance of FleetPatch. + public FleetPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Resource tags. + public IDictionary Tags { get; } + /// Managed identity. + public ManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetProvisioningState.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetProvisioningState.cs new file mode 100644 index 0000000000000..a348c2c5064e4 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The provisioning state of the last accepted operation. + public readonly partial struct FleetProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FleetProvisioningState(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 CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + + /// Resource has been created. + public static FleetProvisioningState Succeeded { get; } = new FleetProvisioningState(SucceededValue); + /// Resource creation failed. + public static FleetProvisioningState Failed { get; } = new FleetProvisioningState(FailedValue); + /// Resource creation was canceled. + public static FleetProvisioningState Canceled { get; } = new FleetProvisioningState(CanceledValue); + /// The provisioning state of a fleet being created. + public static FleetProvisioningState Creating { get; } = new FleetProvisioningState(CreatingValue); + /// The provisioning state of a fleet being updated. + public static FleetProvisioningState Updating { get; } = new FleetProvisioningState(UpdatingValue); + /// The provisioning state of a fleet being deleted. + public static FleetProvisioningState Deleting { get; } = new FleetProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(FleetProvisioningState left, FleetProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FleetProvisioningState left, FleetProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FleetProvisioningState(string value) => new FleetProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FleetProvisioningState other && Equals(other); + /// + public bool Equals(FleetProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.Serialization.cs new file mode 100644 index 0000000000000..c157622966f14 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class ManagedClusterUpdate : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("upgrade"u8); + writer.WriteObjectValue(Upgrade); + if (Optional.IsDefined(NodeImageSelection)) + { + writer.WritePropertyName("nodeImageSelection"u8); + writer.WriteObjectValue(NodeImageSelection); + } + writer.WriteEndObject(); + } + + internal static ManagedClusterUpdate DeserializeManagedClusterUpdate(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedClusterUpgradeSpec upgrade = default; + Optional nodeImageSelection = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("upgrade"u8)) + { + upgrade = ManagedClusterUpgradeSpec.DeserializeManagedClusterUpgradeSpec(property.Value); + continue; + } + if (property.NameEquals("nodeImageSelection"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeImageSelection = NodeImageSelection.DeserializeNodeImageSelection(property.Value); + continue; + } + } + return new ManagedClusterUpdate(upgrade, nodeImageSelection.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.cs new file mode 100644 index 0000000000000..4f8254e62e3df --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The update to be applied to the ManagedClusters. + public partial class ManagedClusterUpdate + { + /// Initializes a new instance of ManagedClusterUpdate. + /// The upgrade to apply to the ManagedClusters. + /// is null. + public ManagedClusterUpdate(ManagedClusterUpgradeSpec upgrade) + { + Argument.AssertNotNull(upgrade, nameof(upgrade)); + + Upgrade = upgrade; + } + + /// Initializes a new instance of ManagedClusterUpdate. + /// The upgrade to apply to the ManagedClusters. + /// The node image upgrade to be applied to the target nodes in update run. + internal ManagedClusterUpdate(ManagedClusterUpgradeSpec upgrade, NodeImageSelection nodeImageSelection) + { + Upgrade = upgrade; + NodeImageSelection = nodeImageSelection; + } + + /// The upgrade to apply to the ManagedClusters. + public ManagedClusterUpgradeSpec Upgrade { get; set; } + /// The node image upgrade to be applied to the target nodes in update run. + internal NodeImageSelection NodeImageSelection { get; set; } + /// The node image upgrade type. + public NodeImageSelectionType? SelectionType + { + get => NodeImageSelection is null ? default(NodeImageSelectionType?) : NodeImageSelection.SelectionType; + set + { + NodeImageSelection = value.HasValue ? new NodeImageSelection(value.Value) : null; + } + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs new file mode 100644 index 0000000000000..286704d125fa6 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class ManagedClusterUpgradeSpec : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(UpgradeType.ToString()); + if (Optional.IsDefined(KubernetesVersion)) + { + writer.WritePropertyName("kubernetesVersion"u8); + writer.WriteStringValue(KubernetesVersion); + } + writer.WriteEndObject(); + } + + internal static ManagedClusterUpgradeSpec DeserializeManagedClusterUpgradeSpec(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedClusterUpgradeType type = default; + Optional kubernetesVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new ManagedClusterUpgradeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("kubernetesVersion"u8)) + { + kubernetesVersion = property.Value.GetString(); + continue; + } + } + return new ManagedClusterUpgradeSpec(type, kubernetesVersion.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.cs new file mode 100644 index 0000000000000..db3287baef42c --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The upgrade to apply to a ManagedCluster. + public partial class ManagedClusterUpgradeSpec + { + /// Initializes a new instance of ManagedClusterUpgradeSpec. + /// + /// The upgrade type. + /// Full requires the KubernetesVersion property to be set. + /// NodeImageOnly requires the KubernetesVersion property not to be set. + /// + public ManagedClusterUpgradeSpec(ManagedClusterUpgradeType upgradeType) + { + UpgradeType = upgradeType; + } + + /// Initializes a new instance of ManagedClusterUpgradeSpec. + /// + /// The upgrade type. + /// Full requires the KubernetesVersion property to be set. + /// NodeImageOnly requires the KubernetesVersion property not to be set. + /// + /// The Kubernetes version to upgrade the member clusters to. + internal ManagedClusterUpgradeSpec(ManagedClusterUpgradeType upgradeType, string kubernetesVersion) + { + UpgradeType = upgradeType; + KubernetesVersion = kubernetesVersion; + } + + /// + /// The upgrade type. + /// Full requires the KubernetesVersion property to be set. + /// NodeImageOnly requires the KubernetesVersion property not to be set. + /// + public ManagedClusterUpgradeType UpgradeType { get; set; } + /// The Kubernetes version to upgrade the member clusters to. + public string KubernetesVersion { get; set; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeType.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeType.cs new file mode 100644 index 0000000000000..5fd027ae673e5 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The type of upgrade to perform when targeting ManagedClusters. + public readonly partial struct ManagedClusterUpgradeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ManagedClusterUpgradeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FullValue = "Full"; + private const string NodeImageOnlyValue = "NodeImageOnly"; + + /// Full upgrades the control plane and all agent pools of the target ManagedClusters. + public static ManagedClusterUpgradeType Full { get; } = new ManagedClusterUpgradeType(FullValue); + /// NodeImageOnly upgrades only the node images of the target ManagedClusters. + public static ManagedClusterUpgradeType NodeImageOnly { get; } = new ManagedClusterUpgradeType(NodeImageOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(ManagedClusterUpgradeType left, ManagedClusterUpgradeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ManagedClusterUpgradeType left, ManagedClusterUpgradeType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ManagedClusterUpgradeType(string value) => new ManagedClusterUpgradeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ManagedClusterUpgradeType other && Equals(other); + /// + public bool Equals(ManagedClusterUpgradeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs new file mode 100644 index 0000000000000..6d539fc4f7dca --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class MemberUpdateStatus + { + internal static MemberUpdateStatus DeserializeMemberUpdateStatus(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional status = default; + Optional name = default; + Optional clusterResourceId = default; + Optional operationId = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = UpdateStatus.DeserializeUpdateStatus(property.Value); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("clusterResourceId"u8)) + { + clusterResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + } + return new MemberUpdateStatus(status.Value, name.Value, clusterResourceId.Value, operationId.Value, message.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.cs new file mode 100644 index 0000000000000..22168cbfa5edd --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The status of a member update operation. + public partial class MemberUpdateStatus + { + /// Initializes a new instance of MemberUpdateStatus. + internal MemberUpdateStatus() + { + } + + /// Initializes a new instance of MemberUpdateStatus. + /// The status of the MemberUpdate operation. + /// The name of the FleetMember. + /// The Azure resource id of the target Kubernetes cluster. + /// The operation resource id of the latest attempt to perform the operation. + /// The status message after processing the member update operation. + internal MemberUpdateStatus(UpdateStatus status, string name, string clusterResourceId, string operationId, string message) + { + Status = status; + Name = name; + ClusterResourceId = clusterResourceId; + OperationId = operationId; + Message = message; + } + + /// The status of the MemberUpdate operation. + public UpdateStatus Status { get; } + /// The name of the FleetMember. + public string Name { get; } + /// The Azure resource id of the target Kubernetes cluster. + public string ClusterResourceId { get; } + /// The operation resource id of the latest attempt to perform the operation. + public string OperationId { get; } + /// The status message after processing the member update operation. + public string Message { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.Serialization.cs new file mode 100644 index 0000000000000..1c44df3786031 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + internal partial class NodeImageSelection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(SelectionType.ToString()); + writer.WriteEndObject(); + } + + internal static NodeImageSelection DeserializeNodeImageSelection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NodeImageSelectionType type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new NodeImageSelectionType(property.Value.GetString()); + continue; + } + } + return new NodeImageSelection(type); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.cs new file mode 100644 index 0000000000000..38c4a512c0891 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The node image upgrade to be applied to the target nodes in update run. + internal partial class NodeImageSelection + { + /// Initializes a new instance of NodeImageSelection. + /// The node image upgrade type. + public NodeImageSelection(NodeImageSelectionType selectionType) + { + SelectionType = selectionType; + } + + /// The node image upgrade type. + public NodeImageSelectionType SelectionType { get; set; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs new file mode 100644 index 0000000000000..66965679af557 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + internal partial class NodeImageSelectionStatus + { + internal static NodeImageSelectionStatus DeserializeNodeImageSelectionStatus(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> selectedNodeImageVersions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("selectedNodeImageVersions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NodeImageVersion.DeserializeNodeImageVersion(item)); + } + selectedNodeImageVersions = array; + continue; + } + } + return new NodeImageSelectionStatus(Optional.ToList(selectedNodeImageVersions)); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.cs new file mode 100644 index 0000000000000..416329caaab9c --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The node image upgrade specs for the update run. + internal partial class NodeImageSelectionStatus + { + /// Initializes a new instance of NodeImageSelectionStatus. + internal NodeImageSelectionStatus() + { + SelectedNodeImageVersions = new ChangeTrackingList(); + } + + /// Initializes a new instance of NodeImageSelectionStatus. + /// The image versions to upgrade the nodes to. + internal NodeImageSelectionStatus(IReadOnlyList selectedNodeImageVersions) + { + SelectedNodeImageVersions = selectedNodeImageVersions; + } + + /// The image versions to upgrade the nodes to. + public IReadOnlyList SelectedNodeImageVersions { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionType.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionType.cs new file mode 100644 index 0000000000000..f7de3f8cf8038 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The node image upgrade type. + public readonly partial struct NodeImageSelectionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NodeImageSelectionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LatestValue = "Latest"; + private const string ConsistentValue = "Consistent"; + + /// Use the latest image version when upgrading nodes. Clusters may use different image versions (e.g., 'AKSUbuntu-1804gen2containerd-2021.10.12' and 'AKSUbuntu-1804gen2containerd-2021.10.19') because, for example, the latest available version is different in different regions. + public static NodeImageSelectionType Latest { get; } = new NodeImageSelectionType(LatestValue); + /// The image versions to upgrade nodes to are selected as described below: for each node pool in managed clusters affected by the update run, the system selects the latest image version such that it is available across all other node pools (in all other clusters) of the same image type. As a result, all node pools of the same image type will be upgraded to the same image version. For example, if the latest image version for image type 'AKSUbuntu-1804gen2containerd' is 'AKSUbuntu-1804gen2containerd-2021.10.12' for a node pool in cluster A in region X, and is 'AKSUbuntu-1804gen2containerd-2021.10.17' for a node pool in cluster B in region Y, the system will upgrade both node pools to image version 'AKSUbuntu-1804gen2containerd-2021.10.12'. + public static NodeImageSelectionType Consistent { get; } = new NodeImageSelectionType(ConsistentValue); + /// Determines if two values are the same. + public static bool operator ==(NodeImageSelectionType left, NodeImageSelectionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NodeImageSelectionType left, NodeImageSelectionType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NodeImageSelectionType(string value) => new NodeImageSelectionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NodeImageSelectionType other && Equals(other); + /// + public bool Equals(NodeImageSelectionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.Serialization.cs new file mode 100644 index 0000000000000..19b0830d690c2 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class NodeImageVersion + { + internal static NodeImageVersion DeserializeNodeImageVersion(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + } + return new NodeImageVersion(version.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.cs new file mode 100644 index 0000000000000..528f441a166b2 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The node upgrade image version. + public partial class NodeImageVersion + { + /// Initializes a new instance of NodeImageVersion. + internal NodeImageVersion() + { + } + + /// Initializes a new instance of NodeImageVersion. + /// The image version to upgrade the nodes to (e.g., 'AKSUbuntu-1804gen2containerd-2022.12.13'). + internal NodeImageVersion(string version) + { + Version = version; + } + + /// The image version to upgrade the nodes to (e.g., 'AKSUbuntu-1804gen2containerd-2022.12.13'). + public string Version { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.Serialization.cs new file mode 100644 index 0000000000000..edf2c1923ec32 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class UpdateGroup : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WriteEndObject(); + } + + internal static UpdateGroup DeserializeUpdateGroup(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + } + return new UpdateGroup(name); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.cs new file mode 100644 index 0000000000000..879b52f34e1b2 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// A group to be updated. + public partial class UpdateGroup + { + /// Initializes a new instance of UpdateGroup. + /// + /// The name of the Fleet member group to update. + /// It should match the name of an existing FleetMember group. + /// A group can only appear once across all UpdateStages in the UpdateRun. + /// + /// is null. + public UpdateGroup(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// + /// The name of the Fleet member group to update. + /// It should match the name of an existing FleetMember group. + /// A group can only appear once across all UpdateStages in the UpdateRun. + /// + public string Name { get; set; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.Serialization.cs new file mode 100644 index 0000000000000..6a5af4a00ae5c --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class UpdateGroupStatus + { + internal static UpdateGroupStatus DeserializeUpdateGroupStatus(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional status = default; + Optional name = default; + Optional> members = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = UpdateStatus.DeserializeUpdateStatus(property.Value); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("members"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MemberUpdateStatus.DeserializeMemberUpdateStatus(item)); + } + members = array; + continue; + } + } + return new UpdateGroupStatus(status.Value, name.Value, Optional.ToList(members)); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.cs new file mode 100644 index 0000000000000..cc00735705853 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The status of a UpdateGroup. + public partial class UpdateGroupStatus + { + /// Initializes a new instance of UpdateGroupStatus. + internal UpdateGroupStatus() + { + Members = new ChangeTrackingList(); + } + + /// Initializes a new instance of UpdateGroupStatus. + /// The status of the UpdateGroup. + /// The name of the UpdateGroup. + /// The list of member this UpdateGroup updates. + internal UpdateGroupStatus(UpdateStatus status, string name, IReadOnlyList members) + { + Status = status; + Name = name; + Members = members; + } + + /// The status of the UpdateGroup. + public UpdateStatus Status { get; } + /// The name of the UpdateGroup. + public string Name { get; } + /// The list of member this UpdateGroup updates. + public IReadOnlyList Members { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunData.Serialization.cs new file mode 100644 index 0000000000000..94830f045a646 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunData.Serialization.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; +using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Fleet +{ + public partial class UpdateRunData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Strategy)) + { + writer.WritePropertyName("strategy"u8); + writer.WriteObjectValue(Strategy); + } + if (Optional.IsDefined(ManagedClusterUpdate)) + { + writer.WritePropertyName("managedClusterUpdate"u8); + writer.WriteObjectValue(ManagedClusterUpdate); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static UpdateRunData DeserializeUpdateRunData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional eTag = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional provisioningState = default; + Optional strategy = default; + Optional managedClusterUpdate = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + eTag = new ETag(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 (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new UpdateRunProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("strategy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + strategy = UpdateRunStrategy.DeserializeUpdateRunStrategy(property0.Value); + continue; + } + if (property0.NameEquals("managedClusterUpdate"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedClusterUpdate = ManagedClusterUpdate.DeserializeManagedClusterUpdate(property0.Value); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = UpdateRunStatus.DeserializeUpdateRunStatus(property0.Value); + continue; + } + } + continue; + } + } + return new UpdateRunData(id, name, type, systemData.Value, Optional.ToNullable(eTag), Optional.ToNullable(provisioningState), strategy.Value, managedClusterUpdate.Value, status.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.Serialization.cs new file mode 100644 index 0000000000000..913cb3c4ee50f --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Fleet; + +namespace Azure.ResourceManager.Fleet.Models +{ + internal partial class UpdateRunListResult + { + internal static UpdateRunListResult DeserializeUpdateRunListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UpdateRunData.DeserializeUpdateRunData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + } + return new UpdateRunListResult(value, nextLink.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.cs new file mode 100644 index 0000000000000..952d2285656f7 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.cs @@ -0,0 +1,43 @@ +// 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.Fleet; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The response of a UpdateRun list operation. + internal partial class UpdateRunListResult + { + /// Initializes a new instance of UpdateRunListResult. + /// The UpdateRun items on this page. + /// is null. + internal UpdateRunListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of UpdateRunListResult. + /// The UpdateRun items on this page. + /// The link to the next page of items. + internal UpdateRunListResult(IReadOnlyList value, Uri nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The UpdateRun items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunProvisioningState.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunProvisioningState.cs new file mode 100644 index 0000000000000..690de077bccd3 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The provisioning state of the UpdateRun resource. + public readonly partial struct UpdateRunProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public UpdateRunProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static UpdateRunProvisioningState Succeeded { get; } = new UpdateRunProvisioningState(SucceededValue); + /// Resource creation failed. + public static UpdateRunProvisioningState Failed { get; } = new UpdateRunProvisioningState(FailedValue); + /// Resource creation was canceled. + public static UpdateRunProvisioningState Canceled { get; } = new UpdateRunProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(UpdateRunProvisioningState left, UpdateRunProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(UpdateRunProvisioningState left, UpdateRunProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator UpdateRunProvisioningState(string value) => new UpdateRunProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is UpdateRunProvisioningState other && Equals(other); + /// + public bool Equals(UpdateRunProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.Serialization.cs new file mode 100644 index 0000000000000..544ef0b29efab --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class UpdateRunStatus + { + internal static UpdateRunStatus DeserializeUpdateRunStatus(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional status = default; + Optional> stages = default; + Optional nodeImageSelection = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = UpdateStatus.DeserializeUpdateStatus(property.Value); + continue; + } + if (property.NameEquals("stages"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UpdateStageStatus.DeserializeUpdateStageStatus(item)); + } + stages = array; + continue; + } + if (property.NameEquals("nodeImageSelection"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeImageSelection = NodeImageSelectionStatus.DeserializeNodeImageSelectionStatus(property.Value); + continue; + } + } + return new UpdateRunStatus(status.Value, Optional.ToList(stages), nodeImageSelection.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.cs new file mode 100644 index 0000000000000..cfd9a031c3d57 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The status of a UpdateRun. + public partial class UpdateRunStatus + { + /// Initializes a new instance of UpdateRunStatus. + internal UpdateRunStatus() + { + Stages = new ChangeTrackingList(); + } + + /// Initializes a new instance of UpdateRunStatus. + /// The status of the UpdateRun. + /// The stages composing an update run. Stages are run sequentially withing an UpdateRun. + /// The node image upgrade specs for the update run. It is only set in update run when `NodeImageSelection.type` is `Consistent`. + internal UpdateRunStatus(UpdateStatus status, IReadOnlyList stages, NodeImageSelectionStatus nodeImageSelection) + { + Status = status; + Stages = stages; + NodeImageSelection = nodeImageSelection; + } + + /// The status of the UpdateRun. + public UpdateStatus Status { get; } + /// The stages composing an update run. Stages are run sequentially withing an UpdateRun. + public IReadOnlyList Stages { get; } + /// The node image upgrade specs for the update run. It is only set in update run when `NodeImageSelection.type` is `Consistent`. + internal NodeImageSelectionStatus NodeImageSelection { get; } + /// The image versions to upgrade the nodes to. + public IReadOnlyList SelectedNodeImageVersions + { + get => NodeImageSelection?.SelectedNodeImageVersions; + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.Serialization.cs new file mode 100644 index 0000000000000..d6465c699d6de --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + internal partial class UpdateRunStrategy : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("stages"u8); + writer.WriteStartArray(); + foreach (var item in Stages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static UpdateRunStrategy DeserializeUpdateRunStrategy(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList stages = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("stages"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UpdateStage.DeserializeUpdateStage(item)); + } + stages = array; + continue; + } + } + return new UpdateRunStrategy(stages); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.cs new file mode 100644 index 0000000000000..ae999d0edc08f --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.cs @@ -0,0 +1,38 @@ +// 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; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The UpdateRunStrategy configures the sequence of Stages and Groups in which the clusters will be updated. + internal partial class UpdateRunStrategy + { + /// Initializes a new instance of UpdateRunStrategy. + /// The list of stages that compose this update run. + /// is null. + public UpdateRunStrategy(IEnumerable stages) + { + Argument.AssertNotNull(stages, nameof(stages)); + + Stages = stages.ToList(); + } + + /// Initializes a new instance of UpdateRunStrategy. + /// The list of stages that compose this update run. + internal UpdateRunStrategy(IList stages) + { + Stages = stages; + } + + /// The list of stages that compose this update run. + public IList Stages { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.Serialization.cs new file mode 100644 index 0000000000000..0469cecf17356 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.Serialization.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class UpdateStage : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsCollectionDefined(Groups)) + { + writer.WritePropertyName("groups"u8); + writer.WriteStartArray(); + foreach (var item in Groups) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AfterStageWaitInSeconds)) + { + writer.WritePropertyName("afterStageWaitInSeconds"u8); + writer.WriteNumberValue(AfterStageWaitInSeconds.Value); + } + writer.WriteEndObject(); + } + + internal static UpdateStage DeserializeUpdateStage(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + Optional> groups = default; + Optional afterStageWaitInSeconds = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("groups"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UpdateGroup.DeserializeUpdateGroup(item)); + } + groups = array; + continue; + } + if (property.NameEquals("afterStageWaitInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + afterStageWaitInSeconds = property.Value.GetInt32(); + continue; + } + } + return new UpdateStage(name, Optional.ToList(groups), Optional.ToNullable(afterStageWaitInSeconds)); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.cs new file mode 100644 index 0000000000000..51a73f1453fa7 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// + /// Contains the groups to be updated by an UpdateRun. + /// Update order: + /// - Sequential between stages: Stages run sequentially. The previous stage must complete before the next one starts. + /// - Parallel within a stage: Groups within a stage run in parallel. + /// - Sequential within a group: Clusters within a group are updated sequentially. + /// + public partial class UpdateStage + { + /// Initializes a new instance of UpdateStage. + /// The name of the stage. Must be unique within the UpdateRun. + /// is null. + public UpdateStage(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + Groups = new ChangeTrackingList(); + } + + /// Initializes a new instance of UpdateStage. + /// The name of the stage. Must be unique within the UpdateRun. + /// + /// A list of group names that compose the stage. + /// The groups will be updated in parallel. Each group name can only appear once in the UpdateRun. + /// + /// The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified. + internal UpdateStage(string name, IList groups, int? afterStageWaitInSeconds) + { + Name = name; + Groups = groups; + AfterStageWaitInSeconds = afterStageWaitInSeconds; + } + + /// The name of the stage. Must be unique within the UpdateRun. + public string Name { get; set; } + /// + /// A list of group names that compose the stage. + /// The groups will be updated in parallel. Each group name can only appear once in the UpdateRun. + /// + public IList Groups { get; } + /// The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified. + public int? AfterStageWaitInSeconds { get; set; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.Serialization.cs new file mode 100644 index 0000000000000..6b27eea6ecce9 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class UpdateStageStatus + { + internal static UpdateStageStatus DeserializeUpdateStageStatus(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional status = default; + Optional name = default; + Optional> groups = default; + Optional afterStageWaitStatus = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = UpdateStatus.DeserializeUpdateStatus(property.Value); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("groups"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UpdateGroupStatus.DeserializeUpdateGroupStatus(item)); + } + groups = array; + continue; + } + if (property.NameEquals("afterStageWaitStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + afterStageWaitStatus = WaitStatus.DeserializeWaitStatus(property.Value); + continue; + } + } + return new UpdateStageStatus(status.Value, name.Value, Optional.ToList(groups), afterStageWaitStatus.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.cs new file mode 100644 index 0000000000000..e5d5af1cc55d6 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The status of a UpdateStage. + public partial class UpdateStageStatus + { + /// Initializes a new instance of UpdateStageStatus. + internal UpdateStageStatus() + { + Groups = new ChangeTrackingList(); + } + + /// Initializes a new instance of UpdateStageStatus. + /// The status of the UpdateStage. + /// The name of the UpdateStage. + /// The list of groups to be updated as part of this UpdateStage. + /// The status of the wait period configured on the UpdateStage. + internal UpdateStageStatus(UpdateStatus status, string name, IReadOnlyList groups, WaitStatus afterStageWaitStatus) + { + Status = status; + Name = name; + Groups = groups; + AfterStageWaitStatus = afterStageWaitStatus; + } + + /// The status of the UpdateStage. + public UpdateStatus Status { get; } + /// The name of the UpdateStage. + public string Name { get; } + /// The list of groups to be updated as part of this UpdateStage. + public IReadOnlyList Groups { get; } + /// The status of the wait period configured on the UpdateStage. + public WaitStatus AfterStageWaitStatus { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateState.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateState.cs new file mode 100644 index 0000000000000..738825d80667a --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateState.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.Fleet.Models +{ + /// The state of the UpdateRun, UpdateStage, UpdateGroup, or MemberUpdate. + public readonly partial struct UpdateState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public UpdateState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "NotStarted"; + private const string RunningValue = "Running"; + private const string StoppingValue = "Stopping"; + private const string StoppedValue = "Stopped"; + private const string SkippedValue = "Skipped"; + private const string FailedValue = "Failed"; + private const string CompletedValue = "Completed"; + + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has not been started. + public static UpdateState NotStarted { get; } = new UpdateState(NotStartedValue); + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is running. + public static UpdateState Running { get; } = new UpdateState(RunningValue); + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is being stopped. + public static UpdateState Stopping { get; } = new UpdateState(StoppingValue); + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has stopped. + public static UpdateState Stopped { get; } = new UpdateState(StoppedValue); + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has been skipped. + public static UpdateState Skipped { get; } = new UpdateState(SkippedValue); + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has failed. + public static UpdateState Failed { get; } = new UpdateState(FailedValue); + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has completed. + public static UpdateState Completed { get; } = new UpdateState(CompletedValue); + /// Determines if two values are the same. + public static bool operator ==(UpdateState left, UpdateState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(UpdateState left, UpdateState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator UpdateState(string value) => new UpdateState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is UpdateState other && Equals(other); + /// + public bool Equals(UpdateState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.Serialization.cs new file mode 100644 index 0000000000000..adc98db6e93d2 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class UpdateStatus + { + internal static UpdateStatus DeserializeUpdateStatus(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional startTime = default; + Optional completedTime = default; + Optional state = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("completedTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + completedTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new UpdateState(property.Value.GetString()); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new UpdateStatus(Optional.ToNullable(startTime), Optional.ToNullable(completedTime), Optional.ToNullable(state), error.Value); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.cs new file mode 100644 index 0000000000000..df30bccfe05d9 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The status for an operation or group of operations. + public partial class UpdateStatus + { + /// Initializes a new instance of UpdateStatus. + internal UpdateStatus() + { + } + + /// Initializes a new instance of UpdateStatus. + /// The time the operation or group was started. + /// The time the operation or group was completed. + /// The State of the operation or group. + /// The error details when a failure is encountered. + internal UpdateStatus(DateTimeOffset? startOn, DateTimeOffset? completedOn, UpdateState? state, ResponseError error) + { + StartOn = startOn; + CompletedOn = completedOn; + State = state; + Error = error; + } + + /// The time the operation or group was started. + public DateTimeOffset? StartOn { get; } + /// The time the operation or group was completed. + public DateTimeOffset? CompletedOn { get; } + /// The State of the operation or group. + public UpdateState? State { get; } + /// The error details when a failure is encountered. + public ResponseError Error { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.Serialization.cs new file mode 100644 index 0000000000000..bd21c42b31c18 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fleet.Models +{ + public partial class WaitStatus + { + internal static WaitStatus DeserializeWaitStatus(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional status = default; + Optional waitDurationInSeconds = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = UpdateStatus.DeserializeUpdateStatus(property.Value); + continue; + } + if (property.NameEquals("waitDurationInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + waitDurationInSeconds = property.Value.GetInt32(); + continue; + } + } + return new WaitStatus(status.Value, Optional.ToNullable(waitDurationInSeconds)); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.cs new file mode 100644 index 0000000000000..e7b5c9d0eb81f --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Fleet.Models +{ + /// The status of the wait duration. + public partial class WaitStatus + { + /// Initializes a new instance of WaitStatus. + internal WaitStatus() + { + } + + /// Initializes a new instance of WaitStatus. + /// The status of the wait duration. + /// The wait duration configured in seconds. + internal WaitStatus(UpdateStatus status, int? waitDurationInSeconds) + { + Status = status; + WaitDurationInSeconds = waitDurationInSeconds; + } + + /// The status of the wait duration. + public UpdateStatus Status { get; } + /// The wait duration configured in seconds. + public int? WaitDurationInSeconds { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/ProviderConstants.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/ProviderConstants.cs new file mode 100644 index 0000000000000..9e32272d8198f --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/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.Fleet +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetMembersRestOperations.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetMembersRestOperations.cs new file mode 100644 index 0000000000000..e83c6fe2c4351 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetMembersRestOperations.cs @@ -0,0 +1,553 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Fleet.Models; + +namespace Azure.ResourceManager.Fleet +{ + internal partial class FleetMembersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FleetMembersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public FleetMembersRestOperations(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 ?? "2023-06-15-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByFleetRequest(string subscriptionId, string resourceGroupName, string fleetName) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/members", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List FleetMember resources by Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetRequest(subscriptionId, resourceGroupName, fleetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetMemberListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FleetMemberListResult.DeserializeFleetMemberListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List FleetMember resources by Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByFleet(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetRequest(subscriptionId, resourceGroupName, fleetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetMemberListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FleetMemberListResult.DeserializeFleetMemberListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/members/", false); + uri.AppendPath(fleetMemberName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a FleetMember. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the Fleet member resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, fleetMemberName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetMemberData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FleetMemberData.DeserializeFleetMemberData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FleetMemberData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a FleetMember. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the Fleet member resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, fleetMemberName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetMemberData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FleetMemberData.DeserializeFleetMemberData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FleetMemberData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, FleetMemberData data, string ifMatch, string ifNoneMatch) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/members/", false); + uri.AppendPath(fleetMemberName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a FleetMember. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the Fleet member resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fleetName, fleetMemberName, data, ifMatch, ifNoneMatch); + 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 FleetMember. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the Fleet member resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fleetName, fleetMemberName, data, ifMatch, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, FleetMemberPatch patch, string ifMatch) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/members/", false); + uri.AppendPath(fleetMemberName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a FleetMember. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the Fleet member resource. + /// The resource properties to be updated. + /// The request should only proceed if an entity matches this string. + /// 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 fleetName, string fleetMemberName, FleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fleetName, fleetMemberName, patch, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a FleetMember. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the Fleet member resource. + /// The resource properties to be updated. + /// The request should only proceed if an entity matches this string. + /// 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 fleetName, string fleetMemberName, FleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fleetName, fleetMemberName, patch, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, string ifMatch) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/members/", false); + uri.AppendPath(fleetMemberName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a FleetMember. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the Fleet member resource. + /// The request should only proceed if an entity matches this string. + /// 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 fleetName, string fleetMemberName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, fleetMemberName, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a FleetMember. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the Fleet member resource. + /// The request should only proceed if an entity matches this string. + /// 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 fleetName, string fleetMemberName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, fleetMemberName, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByFleetNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string fleetName) + { + 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 FleetMember resources by Fleet. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetMemberListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FleetMemberListResult.DeserializeFleetMemberListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List FleetMember resources by Fleet. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByFleetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetMemberListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FleetMemberListResult.DeserializeFleetMemberListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetsRestOperations.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetsRestOperations.cs new file mode 100644 index 0000000000000..a6d4b047693c6 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetsRestOperations.cs @@ -0,0 +1,733 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Fleet.Models; + +namespace Azure.ResourceManager.Fleet +{ + internal partial class FleetsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FleetsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public FleetsRestOperations(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 ?? "2023-06-15-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + 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.ContainerService/fleets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists fleets in the specified subscription. + /// The ID of the target subscription. + /// 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: + { + FleetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists fleets in the specified subscription. + /// The ID of the target subscription. + /// 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: + { + FleetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + 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.ContainerService/fleets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists fleets in the specified subscription and resource group. + /// The ID of the target subscription. + /// 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: + { + FleetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists fleets in the specified subscription and resource group. + /// The ID of the target subscription. + /// 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: + { + FleetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fleetName) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FleetData.DeserializeFleetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FleetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FleetData.DeserializeFleetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FleetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, FleetData data, string ifMatch, string ifNoneMatch) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// 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 fleetName, FleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, data, ifMatch, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// 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 fleetName, FleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, data, ifMatch, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, FleetPatch patch, string ifMatch) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The resource properties to be updated. + /// The request should only proceed if an entity matches this string. + /// 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 fleetName, FleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fleetName, patch, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The resource properties to be updated. + /// The request should only proceed if an entity matches this string. + /// 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 fleetName, FleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fleetName, patch, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fleetName, string ifMatch) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The request should only proceed if an entity matches this string. + /// 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 fleetName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The request should only proceed if an entity matches this string. + /// 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 fleetName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListCredentialsRequest(string subscriptionId, string resourceGroupName, string fleetName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/listCredentials", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the user credentials of a Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListCredentialsAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListCredentialsRequest(subscriptionId, resourceGroupName, fleetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetCredentialResults value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FleetCredentialResults.DeserializeFleetCredentialResults(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the user credentials of a Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListCredentials(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListCredentialsRequest(subscriptionId, resourceGroupName, fleetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetCredentialResults value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FleetCredentialResults.DeserializeFleetCredentialResults(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + 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; + } + + /// Lists fleets in the specified subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// 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: + { + FleetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists fleets in the specified subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// 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: + { + FleetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + 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; + } + + /// Lists fleets in the specified subscription and resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// 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: + { + FleetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists fleets in the specified subscription and resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// 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: + { + FleetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs new file mode 100644 index 0000000000000..f81206b26b917 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs @@ -0,0 +1,629 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Fleet.Models; + +namespace Azure.ResourceManager.Fleet +{ + internal partial class UpdateRunsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of UpdateRunsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public UpdateRunsRestOperations(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 ?? "2023-06-15-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByFleetRequest(string subscriptionId, string resourceGroupName, string fleetName) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/updateRuns", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List UpdateRun resources by Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetRequest(subscriptionId, resourceGroupName, fleetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + UpdateRunListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = UpdateRunListResult.DeserializeUpdateRunListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List UpdateRun resources by Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByFleet(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetRequest(subscriptionId, resourceGroupName, fleetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + UpdateRunListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = UpdateRunListResult.DeserializeUpdateRunListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/updateRuns/", false); + uri.AppendPath(updateRunName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a UpdateRun. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the UpdateRun resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, updateRunName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + UpdateRunData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = UpdateRunData.DeserializeUpdateRunData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((UpdateRunData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a UpdateRun. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the UpdateRun resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, updateRunName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + UpdateRunData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = UpdateRunData.DeserializeUpdateRunData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((UpdateRunData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, UpdateRunData data, string ifMatch, string ifNoneMatch) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/updateRuns/", false); + uri.AppendPath(updateRunName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a UpdateRun. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the UpdateRun resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// 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 fleetName, string updateRunName, UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, updateRunName, data, ifMatch, ifNoneMatch); + 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 UpdateRun. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the UpdateRun resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// 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 fleetName, string updateRunName, UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, updateRunName, data, ifMatch, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, string ifMatch) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/updateRuns/", false); + uri.AppendPath(updateRunName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a UpdateRun. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the UpdateRun resource. + /// The request should only proceed if an entity matches this string. + /// 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 fleetName, string updateRunName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, updateRunName, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a UpdateRun. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the UpdateRun resource. + /// The request should only proceed if an entity matches this string. + /// 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 fleetName, string updateRunName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, updateRunName, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/updateRuns/", false); + uri.AppendPath(updateRunName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Starts an UpdateRun. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the UpdateRun resource. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartAsync(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, fleetName, updateRunName, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts an UpdateRun. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the UpdateRun resource. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Start(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, fleetName, updateRunName, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/updateRuns/", false); + uri.AppendPath(updateRunName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Stops an UpdateRun. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the UpdateRun resource. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StopAsync(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, fleetName, updateRunName, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops an UpdateRun. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the UpdateRun resource. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Stop(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, fleetName, updateRunName, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByFleetNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string fleetName) + { + 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 UpdateRun resources by Fleet. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + UpdateRunListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = UpdateRunListResult.DeserializeUpdateRunListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List UpdateRun resources by Fleet. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByFleetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + UpdateRunListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = UpdateRunListResult.DeserializeUpdateRunListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunCollection.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunCollection.cs new file mode 100644 index 0000000000000..2890f50953ba1 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunCollection.cs @@ -0,0 +1,345 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Fleet +{ + /// + /// 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 GetUpdateRuns method from an instance of . + /// + public partial class UpdateRunCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _updateRunClientDiagnostics; + private readonly UpdateRunsRestOperations _updateRunRestClient; + + /// Initializes a new instance of the class for mocking. + protected UpdateRunCollection() + { + } + + /// 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 UpdateRunCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _updateRunClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Fleet", UpdateRunResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(UpdateRunResource.ResourceType, out string updateRunApiVersion); + _updateRunRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, updateRunApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != FleetResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, FleetResource.ResourceType), nameof(id)); + } + + /// + /// Create a UpdateRun + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_CreateOrUpdate + /// + /// + /// + /// 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 UpdateRun resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// 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 updateRunName, UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _updateRunRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).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 UpdateRun + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_CreateOrUpdate + /// + /// + /// + /// 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 UpdateRun resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// 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 updateRunName, UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _updateRunRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a UpdateRun + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_Get + /// + /// + /// + /// The name of the UpdateRun resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string updateRunName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.Get"); + scope.Start(); + try + { + var response = await _updateRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new UpdateRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a UpdateRun + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_Get + /// + /// + /// + /// The name of the UpdateRun resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string updateRunName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.Get"); + scope.Start(); + try + { + var response = _updateRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new UpdateRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List UpdateRun resources by Fleet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns + /// + /// + /// Operation Id + /// UpdateRuns_ListByFleet + /// + /// + /// + /// 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) => _updateRunRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _updateRunRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new UpdateRunResource(Client, UpdateRunData.DeserializeUpdateRunData(e)), _updateRunClientDiagnostics, Pipeline, "UpdateRunCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List UpdateRun resources by Fleet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns + /// + /// + /// Operation Id + /// UpdateRuns_ListByFleet + /// + /// + /// + /// 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) => _updateRunRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _updateRunRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new UpdateRunResource(Client, UpdateRunData.DeserializeUpdateRunData(e)), _updateRunClientDiagnostics, Pipeline, "UpdateRunCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_Get + /// + /// + /// + /// The name of the UpdateRun resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string updateRunName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.Exists"); + scope.Start(); + try + { + var response = await _updateRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, 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.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_Get + /// + /// + /// + /// The name of the UpdateRun resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string updateRunName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.Exists"); + scope.Start(); + try + { + var response = _updateRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunData.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunData.cs new file mode 100644 index 0000000000000..1d7368efde10e --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunData.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Fleet +{ + /// + /// A class representing the UpdateRun data model. + /// An UpdateRun is a multi-stage process to perform update operations across members of a Fleet. + /// + public partial class UpdateRunData : ResourceData + { + /// Initializes a new instance of UpdateRunData. + public UpdateRunData() + { + } + + /// Initializes a new instance of UpdateRunData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// The provisioning state of the UpdateRun resource. + /// + /// The strategy defines the order in which the clusters will be updated. + /// If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single UpdateGroup targeting all members. + /// The strategy of the UpdateRun can be modified until the run is started. + /// + /// The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started. + /// The status of the UpdateRun. + internal UpdateRunData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, UpdateRunProvisioningState? provisioningState, UpdateRunStrategy strategy, ManagedClusterUpdate managedClusterUpdate, UpdateRunStatus status) : base(id, name, resourceType, systemData) + { + ETag = eTag; + ProvisioningState = provisioningState; + Strategy = strategy; + ManagedClusterUpdate = managedClusterUpdate; + Status = status; + } + + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + /// The provisioning state of the UpdateRun resource. + public UpdateRunProvisioningState? ProvisioningState { get; } + /// + /// The strategy defines the order in which the clusters will be updated. + /// If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single UpdateGroup targeting all members. + /// The strategy of the UpdateRun can be modified until the run is started. + /// + internal UpdateRunStrategy Strategy { get; set; } + /// The list of stages that compose this update run. + public IList StrategyStages + { + get => Strategy is null ? default : Strategy.Stages; + set => Strategy = new UpdateRunStrategy(value); + } + + /// The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started. + public ManagedClusterUpdate ManagedClusterUpdate { get; set; } + /// The status of the UpdateRun. + public UpdateRunStatus Status { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunResource.cs new file mode 100644 index 0000000000000..3f512864fe9a9 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunResource.cs @@ -0,0 +1,443 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Fleet +{ + /// + /// A Class representing an UpdateRun 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 GetUpdateRunResource method. + /// Otherwise you can get one from its parent resource using the GetUpdateRun method. + /// + public partial class UpdateRunResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _updateRunClientDiagnostics; + private readonly UpdateRunsRestOperations _updateRunRestClient; + private readonly UpdateRunData _data; + + /// Initializes a new instance of the class for mocking. + protected UpdateRunResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal UpdateRunResource(ArmClient client, UpdateRunData 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 UpdateRunResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _updateRunClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Fleet", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string updateRunApiVersion); + _updateRunRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, updateRunApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ContainerService/fleets/updateRuns"; + + /// 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 UpdateRunData 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 UpdateRun + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Get"); + scope.Start(); + try + { + var response = await _updateRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new UpdateRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a UpdateRun + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Get"); + scope.Start(); + try + { + var response = _updateRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new UpdateRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a UpdateRun + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_Delete + /// + /// + /// + /// 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 request should only proceed if an entity matches this string. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Delete"); + scope.Start(); + try + { + var response = await _updateRunRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new FleetArmOperation(_updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).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 UpdateRun + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_Delete + /// + /// + /// + /// 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 request should only proceed if an entity matches this string. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Delete"); + scope.Start(); + try + { + var response = _updateRunRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new FleetArmOperation(_updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a UpdateRun + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Update"); + scope.Start(); + try + { + var response = await _updateRunRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).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 UpdateRun + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Update"); + scope.Start(); + try + { + var response = _updateRunRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts an UpdateRun. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/start + /// + /// + /// Operation Id + /// UpdateRuns_Start + /// + /// + /// + /// 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 request should only proceed if an entity matches this string. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Start"); + scope.Start(); + try + { + var response = await _updateRunRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts an UpdateRun. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/start + /// + /// + /// Operation Id + /// UpdateRuns_Start + /// + /// + /// + /// 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 request should only proceed if an entity matches this string. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Start"); + scope.Start(); + try + { + var response = _updateRunRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops an UpdateRun. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/stop + /// + /// + /// Operation Id + /// UpdateRuns_Stop + /// + /// + /// + /// 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 request should only proceed if an entity matches this string. + /// The cancellation token to use. + public virtual async Task> StopAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Stop"); + scope.Start(); + try + { + var response = await _updateRunRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops an UpdateRun. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/stop + /// + /// + /// Operation Id + /// UpdateRuns_Stop + /// + /// + /// + /// 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 request should only proceed if an entity matches this string. + /// The cancellation token to use. + public virtual ArmOperation Stop(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Stop"); + scope.Start(); + try + { + var response = _updateRunRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Properties/AssemblyInfo.cs b/sdk/fleet/Azure.ResourceManager.Fleet/src/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000..540b4d0179441 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/Properties/AssemblyInfo.cs @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: Azure.Core.AzureResourceProviderNamespace("Fleet")] + +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] +[assembly: InternalsVisibleTo("Azure.ResourceManager.Fleet.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/autorest.md b/sdk/fleet/Azure.ResourceManager.Fleet/src/autorest.md new file mode 100644 index 0000000000000..cab0296bced1e --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/src/autorest.md @@ -0,0 +1,55 @@ +# Generated code configuration + +Run `dotnet build /t:GenerateCode` to generate code. + +``` yaml +azure-arm: true +csharp: true +library-name: Fleet +namespace: Azure.ResourceManager.Fleet +require: https://github.com/Azure/azure-rest-api-specs/blob/de06c42bd985fb66b6a49c907aaf5baee693bc7b/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md +output-folder: $(this-folder)/Generated +clear-output-folder: true +sample-gen: + output-folder: $(this-folder)/../samples/Generated + clear-output-folder: true +skip-csproj: true +modelerfour: + flatten-payloads: false + +#mgmt-debug: +# show-serialized-names: true + + + +format-by-name-rules: + 'tenantId': 'uuid' + 'ETag': 'etag' + 'location': 'azure-location' + '*Uri': 'Uri' + '*Uris': 'Uri' + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + Vmos: VmOS + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + +``` \ No newline at end of file diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/tests/Azure.ResourceManager.Fleet.Tests.csproj b/sdk/fleet/Azure.ResourceManager.Fleet/tests/Azure.ResourceManager.Fleet.Tests.csproj new file mode 100644 index 0000000000000..42651d75795bc --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/tests/Azure.ResourceManager.Fleet.Tests.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestBase.cs b/sdk/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestBase.cs new file mode 100644 index 0000000000000..fd3d31965559d --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestBase.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.Fleet.Tests +{ + public class FleetManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected FleetManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected FleetManagementTestBase(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/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestEnvironment.cs b/sdk/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestEnvironment.cs new file mode 100644 index 0000000000000..5a50263d54883 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.Fleet.Tests +{ + public class FleetManagementTestEnvironment : TestEnvironment + { + } +} \ No newline at end of file diff --git a/sdk/fleet/ci.mgmt.yml b/sdk/fleet/ci.mgmt.yml new file mode 100644 index 0000000000000..003ec43421b18 --- /dev/null +++ b/sdk/fleet/ci.mgmt.yml @@ -0,0 +1,49 @@ +# 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/fleet/ci.mgmt.yml + - sdk/fleet/Azure.ResourceManager.Fleet/ + + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/fleet/ci.mgmt.yml + - sdk/fleet/Azure.ResourceManager.Fleet/ + + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/fleet/ci.mgmt.yml + - sdk/fleet/Azure.ResourceManager.Fleet/ + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: fleet + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.Fleet + safeName: AzureResourceManagerFleet diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index e9486a555e2c8..4b564cbdf13bc 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -11,175 +11,176 @@ trigger: - sdk/resourcemanager - common/ManagementTestShared - common/ManagementCoreShared + - sdk/maps/Azure.ResourceManager.Maps + - sdk/kusto/Azure.ResourceManager.Kusto + - sdk/storagemover/Azure.ResourceManager.StorageMover + - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw + - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking + - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph + - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise + - sdk/postgresql/Azure.ResourceManager.PostgreSql + - sdk/dynatrace/Azure.ResourceManager.Dynatrace + - sdk/storagepool/Azure.ResourceManager.StoragePool + - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices + - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric + - sdk/servicebus/Azure.ResourceManager.ServiceBus - sdk/advisor/Azure.ResourceManager.Advisor + - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector + - sdk/apimanagement/Azure.ResourceManager.ApiManagement + - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs + - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere + - sdk/netapp/Azure.ResourceManager.NetApp - sdk/agrifood/Azure.ResourceManager.AgFoodPlatform - - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement + - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs + - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability + - sdk/confluent/Azure.ResourceManager.Confluent + - sdk/monitor/Azure.ResourceManager.Monitor + - sdk/labservices/Azure.ResourceManager.LabServices + - sdk/managedservices/Azure.ResourceManager.ManagedServices + - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis + - sdk/storagesync/Azure.ResourceManager.StorageSync + - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork + - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry + - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins + - sdk/containerinstance/Azure.ResourceManager.ContainerInstance + - sdk/loadtestservice/Azure.ResourceManager.LoadTesting + - sdk/securitycenter/Azure.ResourceManager.SecurityCenter + - sdk/avs/Azure.ResourceManager.Avs + - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities + - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor + - sdk/storagecache/Azure.ResourceManager.StorageCache + - sdk/qumulo/Azure.ResourceManager.Qumulo + - sdk/elastic/Azure.ResourceManager.Elastic - sdk/analysisservices/Azure.ResourceManager.Analysis - - sdk/apicenter/Azure.ResourceManager.ApiCenter - - sdk/apimanagement/Azure.ResourceManager.ApiManagement - - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation - - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration - - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights - - sdk/appplatform/Azure.ResourceManager.AppPlatform + - sdk/keyvault/Azure.ResourceManager.KeyVault + - sdk/redis/Azure.ResourceManager.Redis + - sdk/signalr/Azure.ResourceManager.SignalR + - sdk/reservations/Azure.ResourceManager.Reservations + - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth - sdk/arc-scvmm/Azure.ResourceManager.ArcScVmm - - sdk/attestation/Azure.ResourceManager.Attestation - - sdk/authorization/Azure.ResourceManager.Authorization - - sdk/automanage/Azure.ResourceManager.Automanage - - sdk/automation/Azure.ResourceManager.Automation - - sdk/avs/Azure.ResourceManager.Avs - - sdk/azurestackhci/Azure.ResourceManager.Hci - - sdk/batch/Azure.ResourceManager.Batch - - sdk/billing/Azure.ResourceManager.Billing - - sdk/billingbenefits/Azure.ResourceManager.BillingBenefits - - sdk/blueprint/Azure.ResourceManager.Blueprint - - sdk/botservice/Azure.ResourceManager.BotService - - sdk/cdn/Azure.ResourceManager.Cdn - - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis - - sdk/chaos/Azure.ResourceManager.Chaos - - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices - - sdk/communication/Azure.ResourceManager.Communication - - sdk/compute/Azure.ResourceManager.Compute - - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger - - sdk/confluent/Azure.ResourceManager.Confluent - - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere + - sdk/resourcemover/Azure.ResourceManager.ResourceMover - sdk/consumption/Azure.ResourceManager.Consumption - - sdk/containerapps/Azure.ResourceManager.AppContainers - - sdk/containerinstance/Azure.ResourceManager.ContainerInstance - - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry - - sdk/containerservice/Azure.ResourceManager.ContainerService - - sdk/cosmosdb/Azure.ResourceManager.CosmosDB + - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger + - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement + - sdk/frontdoor/Azure.ResourceManager.FrontDoor + - sdk/resources/Azure.ResourceManager.Resources + - sdk/datafactory/Azure.ResourceManager.DataFactory + - sdk/managementpartner/Azure.ResourceManager.ManagementPartner + - sdk/marketplace/Azure.ResourceManager.Marketplace + - sdk/privatedns/Azure.ResourceManager.PrivateDns + - sdk/network/Azure.ResourceManager.Network + - sdk/webpubsub/Azure.ResourceManager.WebPubSub + - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity + - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices + - sdk/trafficmanager/Azure.ResourceManager.TrafficManager + - sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager + - sdk/billingbenefits/Azure.ResourceManager.BillingBenefits + - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration + - sdk/logic/Azure.ResourceManager.Logic + - sdk/servicelinker/Azure.ResourceManager.ServiceLinker + - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/grafana/Azure.ResourceManager.Grafana - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql - - sdk/costmanagement/Azure.ResourceManager.CostManagement - - sdk/customer-insights/Azure.ResourceManager.CustomerInsights - - sdk/databox/Azure.ResourceManager.DataBox + - sdk/sphere/Azure.ResourceManager.Sphere + - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine + - sdk/elasticsan/Azure.ResourceManager.ElasticSan + - sdk/hybridcompute/Azure.ResourceManager.HybridCompute + - sdk/peering/Azure.ResourceManager.Peering - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge - - sdk/datadog/Azure.ResourceManager.Datadog - - sdk/datafactory/Azure.ResourceManager.DataFactory - - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics - - sdk/datalake-store/Azure.ResourceManager.DataLakeStore + - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps + - sdk/storage/Azure.ResourceManager.Storage + - sdk/iot/Azure.ResourceManager.IotFirmwareDefense + - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork + - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation + - sdk/subscription/Azure.ResourceManager.Subscription + - sdk/search/Azure.ResourceManager.Search + - sdk/policyinsights/Azure.ResourceManager.PolicyInsights + - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering - sdk/datamigration/Azure.ResourceManager.DataMigration - - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup + - sdk/workloads/Azure.ResourceManager.Workloads + - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning + - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights - sdk/datashare/Azure.ResourceManager.DataShare - - sdk/defendereasm/Azure.ResourceManager.DefenderEasm - - sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager - - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization - - sdk/devcenter/Azure.ResourceManager.DevCenter - - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices + - sdk/healthbot/Azure.ResourceManager.HealthBot + - sdk/cosmosdb/Azure.ResourceManager.CosmosDB + - sdk/containerservice/Azure.ResourceManager.ContainerService + - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration + - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations + - sdk/selfhelp/Azure.ResourceManager.SelfHelp - sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate - - sdk/devspaces/Azure.ResourceManager.DevSpaces - - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs - - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins - - sdk/dns/Azure.ResourceManager.Dns - - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - - sdk/dynatrace/Azure.ResourceManager.Dynatrace - - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/elastic/Azure.ResourceManager.Elastic - - sdk/elasticsan/Azure.ResourceManager.ElasticSan - - sdk/eventgrid/Azure.ResourceManager.EventGrid + - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup - sdk/eventhub/Azure.ResourceManager.EventHubs - - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations - - sdk/fluidrelay/Azure.ResourceManager.FluidRelay - - sdk/frontdoor/Azure.ResourceManager.FrontDoor - - sdk/grafana/Azure.ResourceManager.Grafana - - sdk/graphservices/Azure.ResourceManager.GraphServices - - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration - - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules + - sdk/cdn/Azure.ResourceManager.Cdn + - sdk/compute/Azure.ResourceManager.Compute + - sdk/support/Azure.ResourceManager.Support + - sdk/servicefabric/Azure.ResourceManager.ServiceFabric + - sdk/nginx/Azure.ResourceManager.Nginx + - sdk/devspaces/Azure.ResourceManager.DevSpaces + - sdk/customer-insights/Azure.ResourceManager.CustomerInsights + - sdk/networkfunction/Azure.ResourceManager.NetworkFunction + - sdk/voiceservices/Azure.ResourceManager.VoiceServices + - sdk/orbital/Azure.ResourceManager.Orbital + - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated - sdk/hdinsight/Azure.ResourceManager.HDInsight - sdk/hdinsight/Azure.ResourceManager.HDInsight.Containers - - sdk/healthbot/Azure.ResourceManager.HealthBot - - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis + - sdk/batch/Azure.ResourceManager.Batch - sdk/hybridaks/Azure.ResourceManager.HybridContainerService - - sdk/hybridcompute/Azure.ResourceManager.HybridCompute - - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity + - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters + - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics + - sdk/mysql/Azure.ResourceManager.MySql + - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis + - sdk/containerapps/Azure.ResourceManager.AppContainers + - sdk/devcenter/Azure.ResourceManager.DevCenter + - sdk/purview/Azure.ResourceManager.Purview + - sdk/datadog/Azure.ResourceManager.Datadog - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes - - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - - sdk/iotcentral/Azure.ResourceManager.IotCentral - - sdk/iothub/Azure.ResourceManager.IotHub - - sdk/keyvault/Azure.ResourceManager.KeyVault + - sdk/providerhub/Azure.ResourceManager.ProviderHub + - sdk/attestation/Azure.ResourceManager.Attestation + - sdk/defendereasm/Azure.ResourceManager.DefenderEasm - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - - sdk/kusto/Azure.ResourceManager.Kusto - - sdk/labservices/Azure.ResourceManager.LabServices - - sdk/loadtestservice/Azure.ResourceManager.LoadTesting - - sdk/logic/Azure.ResourceManager.Logic - - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute - - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning - - sdk/maintenance/Azure.ResourceManager.Maintenance - - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork - - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric - - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities - - sdk/managedservices/Azure.ResourceManager.ManagedServices - - sdk/managementpartner/Azure.ResourceManager.ManagementPartner - - sdk/maps/Azure.ResourceManager.Maps - - sdk/marketplace/Azure.ResourceManager.Marketplace - - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering + - sdk/eventgrid/Azure.ResourceManager.EventGrid + - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules + - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics + - sdk/securityinsights/Azure.ResourceManager.SecurityInsights + - sdk/azurestackhci/Azure.ResourceManager.Hci - sdk/mediaservices/Azure.ResourceManager.Media + - sdk/databox/Azure.ResourceManager.DataBox + - sdk/maintenance/Azure.ResourceManager.Maintenance + - sdk/sqlmanagement/Azure.ResourceManager.Sql - sdk/mixedreality/Azure.ResourceManager.MixedReality - - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork - - sdk/monitor/Azure.ResourceManager.Monitor - - sdk/mysql/Azure.ResourceManager.MySql - - sdk/netapp/Azure.ResourceManager.NetApp - - sdk/network/Azure.ResourceManager.Network - - sdk/networkcloud/Azure.ResourceManager.NetworkCloud - - sdk/networkfunction/Azure.ResourceManager.NetworkFunction - - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability - - sdk/nginx/Azure.ResourceManager.Nginx - - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs - - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices - - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights - - sdk/orbital/Azure.ResourceManager.Orbital - - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw - - sdk/peering/Azure.ResourceManager.Peering - - sdk/policyinsights/Azure.ResourceManager.PolicyInsights - - sdk/postgresql/Azure.ResourceManager.PostgreSql - - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated - - sdk/privatedns/Azure.ResourceManager.PrivateDns - - sdk/providerhub/Azure.ResourceManager.ProviderHub - - sdk/purview/Azure.ResourceManager.Purview - - sdk/quantum/Azure.ResourceManager.Quantum - - sdk/qumulo/Azure.ResourceManager.Qumulo + - sdk/automation/Azure.ResourceManager.Automation + - sdk/datalake-store/Azure.ResourceManager.DataLakeStore - sdk/quota/Azure.ResourceManager.Quota + - sdk/iotcentral/Azure.ResourceManager.IotCentral + - sdk/communication/Azure.ResourceManager.Communication + - sdk/fleet/Azure.ResourceManager.Fleet + - sdk/relay/Azure.ResourceManager.Relay + - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights + - sdk/botservice/Azure.ResourceManager.BotService + - sdk/authorization/Azure.ResourceManager.Authorization + - sdk/dns/Azure.ResourceManager.Dns + - sdk/dnsresolver/Azure.ResourceManager.DnsResolver + - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices - - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication + - sdk/fluidrelay/Azure.ResourceManager.FluidRelay + - sdk/chaos/Azure.ResourceManager.Chaos + - sdk/automanage/Azure.ResourceManager.Automanage + - sdk/edgeorder/Azure.ResourceManager.EdgeOrder + - sdk/networkcloud/Azure.ResourceManager.NetworkCloud + - sdk/synapse/Azure.ResourceManager.Synapse + - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization + - sdk/billing/Azure.ResourceManager.Billing + - sdk/graphservices/Azure.ResourceManager.GraphServices + - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery - - sdk/redis/Azure.ResourceManager.Redis - - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise - - sdk/relay/Azure.ResourceManager.Relay - - sdk/reservations/Azure.ResourceManager.Reservations - - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector - - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph - - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth - - sdk/resourcemover/Azure.ResourceManager.ResourceMover - - sdk/resources/Azure.ResourceManager.Resources - - sdk/search/Azure.ResourceManager.Search - - sdk/securitycenter/Azure.ResourceManager.SecurityCenter - - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps - - sdk/securityinsights/Azure.ResourceManager.SecurityInsights - - sdk/selfhelp/Azure.ResourceManager.SelfHelp - - sdk/servicebus/Azure.ResourceManager.ServiceBus - - sdk/servicefabric/Azure.ResourceManager.ServiceFabric - - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters - - sdk/servicelinker/Azure.ResourceManager.ServiceLinker - - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking - - sdk/signalr/Azure.ResourceManager.SignalR - - sdk/sphere/Azure.ResourceManager.Sphere - - sdk/sqlmanagement/Azure.ResourceManager.Sql - - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine - - sdk/storage/Azure.ResourceManager.Storage - - sdk/storagecache/Azure.ResourceManager.StorageCache - - sdk/storagemover/Azure.ResourceManager.StorageMover - - sdk/storagepool/Azure.ResourceManager.StoragePool - - sdk/storagesync/Azure.ResourceManager.StorageSync - - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics - - sdk/subscription/Azure.ResourceManager.Subscription - - sdk/support/Azure.ResourceManager.Support - - sdk/synapse/Azure.ResourceManager.Synapse - - sdk/trafficmanager/Azure.ResourceManager.TrafficManager - - sdk/voiceservices/Azure.ResourceManager.VoiceServices - - sdk/webpubsub/Azure.ResourceManager.WebPubSub + - sdk/appplatform/Azure.ResourceManager.AppPlatform - sdk/websites/Azure.ResourceManager.AppService - - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor - - sdk/workloads/Azure.ResourceManager.Workloads + - sdk/blueprint/Azure.ResourceManager.Blueprint + - sdk/quantum/Azure.ResourceManager.Quantum + - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute + - sdk/costmanagement/Azure.ResourceManager.CostManagement + - sdk/apicenter/Azure.ResourceManager.ApiCenter pr: branches: @@ -193,175 +194,176 @@ pr: - sdk/resourcemanager - common/ManagementTestShared - common/ManagementCoreShared + - sdk/maps/Azure.ResourceManager.Maps + - sdk/kusto/Azure.ResourceManager.Kusto + - sdk/storagemover/Azure.ResourceManager.StorageMover + - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw + - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking + - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph + - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise + - sdk/postgresql/Azure.ResourceManager.PostgreSql + - sdk/dynatrace/Azure.ResourceManager.Dynatrace + - sdk/storagepool/Azure.ResourceManager.StoragePool + - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices + - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric + - sdk/servicebus/Azure.ResourceManager.ServiceBus - sdk/advisor/Azure.ResourceManager.Advisor + - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector + - sdk/apimanagement/Azure.ResourceManager.ApiManagement + - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs + - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere + - sdk/netapp/Azure.ResourceManager.NetApp - sdk/agrifood/Azure.ResourceManager.AgFoodPlatform - - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement + - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs + - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability + - sdk/confluent/Azure.ResourceManager.Confluent + - sdk/monitor/Azure.ResourceManager.Monitor + - sdk/labservices/Azure.ResourceManager.LabServices + - sdk/managedservices/Azure.ResourceManager.ManagedServices + - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis + - sdk/storagesync/Azure.ResourceManager.StorageSync + - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork + - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry + - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins + - sdk/containerinstance/Azure.ResourceManager.ContainerInstance + - sdk/loadtestservice/Azure.ResourceManager.LoadTesting + - sdk/securitycenter/Azure.ResourceManager.SecurityCenter + - sdk/avs/Azure.ResourceManager.Avs + - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities + - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor + - sdk/storagecache/Azure.ResourceManager.StorageCache + - sdk/qumulo/Azure.ResourceManager.Qumulo + - sdk/elastic/Azure.ResourceManager.Elastic - sdk/analysisservices/Azure.ResourceManager.Analysis - - sdk/apicenter/Azure.ResourceManager.ApiCenter - - sdk/apimanagement/Azure.ResourceManager.ApiManagement - - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation - - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration - - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights - - sdk/appplatform/Azure.ResourceManager.AppPlatform + - sdk/keyvault/Azure.ResourceManager.KeyVault + - sdk/redis/Azure.ResourceManager.Redis + - sdk/signalr/Azure.ResourceManager.SignalR + - sdk/reservations/Azure.ResourceManager.Reservations + - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth - sdk/arc-scvmm/Azure.ResourceManager.ArcScVmm - - sdk/attestation/Azure.ResourceManager.Attestation - - sdk/authorization/Azure.ResourceManager.Authorization - - sdk/automanage/Azure.ResourceManager.Automanage - - sdk/automation/Azure.ResourceManager.Automation - - sdk/avs/Azure.ResourceManager.Avs - - sdk/azurestackhci/Azure.ResourceManager.Hci - - sdk/batch/Azure.ResourceManager.Batch - - sdk/billing/Azure.ResourceManager.Billing - - sdk/billingbenefits/Azure.ResourceManager.BillingBenefits - - sdk/blueprint/Azure.ResourceManager.Blueprint - - sdk/botservice/Azure.ResourceManager.BotService - - sdk/cdn/Azure.ResourceManager.Cdn - - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis - - sdk/chaos/Azure.ResourceManager.Chaos - - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices - - sdk/communication/Azure.ResourceManager.Communication - - sdk/compute/Azure.ResourceManager.Compute - - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger - - sdk/confluent/Azure.ResourceManager.Confluent - - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere + - sdk/resourcemover/Azure.ResourceManager.ResourceMover - sdk/consumption/Azure.ResourceManager.Consumption - - sdk/containerapps/Azure.ResourceManager.AppContainers - - sdk/containerinstance/Azure.ResourceManager.ContainerInstance - - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry - - sdk/containerservice/Azure.ResourceManager.ContainerService - - sdk/cosmosdb/Azure.ResourceManager.CosmosDB + - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger + - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement + - sdk/frontdoor/Azure.ResourceManager.FrontDoor + - sdk/resources/Azure.ResourceManager.Resources + - sdk/datafactory/Azure.ResourceManager.DataFactory + - sdk/managementpartner/Azure.ResourceManager.ManagementPartner + - sdk/marketplace/Azure.ResourceManager.Marketplace + - sdk/privatedns/Azure.ResourceManager.PrivateDns + - sdk/network/Azure.ResourceManager.Network + - sdk/webpubsub/Azure.ResourceManager.WebPubSub + - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity + - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices + - sdk/trafficmanager/Azure.ResourceManager.TrafficManager + - sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager + - sdk/billingbenefits/Azure.ResourceManager.BillingBenefits + - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration + - sdk/logic/Azure.ResourceManager.Logic + - sdk/servicelinker/Azure.ResourceManager.ServiceLinker + - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/grafana/Azure.ResourceManager.Grafana - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql - - sdk/costmanagement/Azure.ResourceManager.CostManagement - - sdk/customer-insights/Azure.ResourceManager.CustomerInsights - - sdk/databox/Azure.ResourceManager.DataBox + - sdk/sphere/Azure.ResourceManager.Sphere + - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine + - sdk/elasticsan/Azure.ResourceManager.ElasticSan + - sdk/hybridcompute/Azure.ResourceManager.HybridCompute + - sdk/peering/Azure.ResourceManager.Peering - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge - - sdk/datadog/Azure.ResourceManager.Datadog - - sdk/datafactory/Azure.ResourceManager.DataFactory - - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics - - sdk/datalake-store/Azure.ResourceManager.DataLakeStore + - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps + - sdk/storage/Azure.ResourceManager.Storage + - sdk/iot/Azure.ResourceManager.IotFirmwareDefense + - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork + - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation + - sdk/subscription/Azure.ResourceManager.Subscription + - sdk/search/Azure.ResourceManager.Search + - sdk/policyinsights/Azure.ResourceManager.PolicyInsights + - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering - sdk/datamigration/Azure.ResourceManager.DataMigration - - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup + - sdk/workloads/Azure.ResourceManager.Workloads + - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning + - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights - sdk/datashare/Azure.ResourceManager.DataShare - - sdk/defendereasm/Azure.ResourceManager.DefenderEasm - - sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager - - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization - - sdk/devcenter/Azure.ResourceManager.DevCenter - - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices + - sdk/healthbot/Azure.ResourceManager.HealthBot + - sdk/cosmosdb/Azure.ResourceManager.CosmosDB + - sdk/containerservice/Azure.ResourceManager.ContainerService + - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration + - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations + - sdk/selfhelp/Azure.ResourceManager.SelfHelp - sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate - - sdk/devspaces/Azure.ResourceManager.DevSpaces - - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs - - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins - - sdk/dns/Azure.ResourceManager.Dns - - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - - sdk/dynatrace/Azure.ResourceManager.Dynatrace - - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/elastic/Azure.ResourceManager.Elastic - - sdk/elasticsan/Azure.ResourceManager.ElasticSan - - sdk/eventgrid/Azure.ResourceManager.EventGrid + - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup - sdk/eventhub/Azure.ResourceManager.EventHubs - - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations - - sdk/fluidrelay/Azure.ResourceManager.FluidRelay - - sdk/frontdoor/Azure.ResourceManager.FrontDoor - - sdk/grafana/Azure.ResourceManager.Grafana - - sdk/graphservices/Azure.ResourceManager.GraphServices - - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration - - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules + - sdk/cdn/Azure.ResourceManager.Cdn + - sdk/compute/Azure.ResourceManager.Compute + - sdk/support/Azure.ResourceManager.Support + - sdk/servicefabric/Azure.ResourceManager.ServiceFabric + - sdk/nginx/Azure.ResourceManager.Nginx + - sdk/devspaces/Azure.ResourceManager.DevSpaces + - sdk/customer-insights/Azure.ResourceManager.CustomerInsights + - sdk/networkfunction/Azure.ResourceManager.NetworkFunction + - sdk/voiceservices/Azure.ResourceManager.VoiceServices + - sdk/orbital/Azure.ResourceManager.Orbital + - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated - sdk/hdinsight/Azure.ResourceManager.HDInsight - sdk/hdinsight/Azure.ResourceManager.HDInsight.Containers - - sdk/healthbot/Azure.ResourceManager.HealthBot - - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis + - sdk/batch/Azure.ResourceManager.Batch - sdk/hybridaks/Azure.ResourceManager.HybridContainerService - - sdk/hybridcompute/Azure.ResourceManager.HybridCompute - - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity + - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters + - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics + - sdk/mysql/Azure.ResourceManager.MySql + - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis + - sdk/containerapps/Azure.ResourceManager.AppContainers + - sdk/devcenter/Azure.ResourceManager.DevCenter + - sdk/purview/Azure.ResourceManager.Purview + - sdk/datadog/Azure.ResourceManager.Datadog - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes - - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - - sdk/iotcentral/Azure.ResourceManager.IotCentral - - sdk/iothub/Azure.ResourceManager.IotHub - - sdk/keyvault/Azure.ResourceManager.KeyVault + - sdk/providerhub/Azure.ResourceManager.ProviderHub + - sdk/attestation/Azure.ResourceManager.Attestation + - sdk/defendereasm/Azure.ResourceManager.DefenderEasm - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - - sdk/kusto/Azure.ResourceManager.Kusto - - sdk/labservices/Azure.ResourceManager.LabServices - - sdk/loadtestservice/Azure.ResourceManager.LoadTesting - - sdk/logic/Azure.ResourceManager.Logic - - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute - - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning - - sdk/maintenance/Azure.ResourceManager.Maintenance - - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork - - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric - - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities - - sdk/managedservices/Azure.ResourceManager.ManagedServices - - sdk/managementpartner/Azure.ResourceManager.ManagementPartner - - sdk/maps/Azure.ResourceManager.Maps - - sdk/marketplace/Azure.ResourceManager.Marketplace - - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering + - sdk/eventgrid/Azure.ResourceManager.EventGrid + - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules + - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics + - sdk/securityinsights/Azure.ResourceManager.SecurityInsights + - sdk/azurestackhci/Azure.ResourceManager.Hci - sdk/mediaservices/Azure.ResourceManager.Media + - sdk/databox/Azure.ResourceManager.DataBox + - sdk/maintenance/Azure.ResourceManager.Maintenance + - sdk/sqlmanagement/Azure.ResourceManager.Sql - sdk/mixedreality/Azure.ResourceManager.MixedReality - - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork - - sdk/monitor/Azure.ResourceManager.Monitor - - sdk/mysql/Azure.ResourceManager.MySql - - sdk/netapp/Azure.ResourceManager.NetApp - - sdk/network/Azure.ResourceManager.Network - - sdk/networkcloud/Azure.ResourceManager.NetworkCloud - - sdk/networkfunction/Azure.ResourceManager.NetworkFunction - - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability - - sdk/nginx/Azure.ResourceManager.Nginx - - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs - - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices - - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights - - sdk/orbital/Azure.ResourceManager.Orbital - - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw - - sdk/peering/Azure.ResourceManager.Peering - - sdk/policyinsights/Azure.ResourceManager.PolicyInsights - - sdk/postgresql/Azure.ResourceManager.PostgreSql - - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated - - sdk/privatedns/Azure.ResourceManager.PrivateDns - - sdk/providerhub/Azure.ResourceManager.ProviderHub - - sdk/purview/Azure.ResourceManager.Purview - - sdk/quantum/Azure.ResourceManager.Quantum - - sdk/qumulo/Azure.ResourceManager.Qumulo + - sdk/automation/Azure.ResourceManager.Automation + - sdk/datalake-store/Azure.ResourceManager.DataLakeStore - sdk/quota/Azure.ResourceManager.Quota + - sdk/iotcentral/Azure.ResourceManager.IotCentral + - sdk/communication/Azure.ResourceManager.Communication + - sdk/fleet/Azure.ResourceManager.Fleet + - sdk/relay/Azure.ResourceManager.Relay + - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights + - sdk/botservice/Azure.ResourceManager.BotService + - sdk/authorization/Azure.ResourceManager.Authorization + - sdk/dns/Azure.ResourceManager.Dns + - sdk/dnsresolver/Azure.ResourceManager.DnsResolver + - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices - - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication - - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery - - sdk/redis/Azure.ResourceManager.Redis - - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise - - sdk/relay/Azure.ResourceManager.Relay - - sdk/reservations/Azure.ResourceManager.Reservations - - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector - - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph - - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth - - sdk/resourcemover/Azure.ResourceManager.ResourceMover - - sdk/resources/Azure.ResourceManager.Resources - - sdk/search/Azure.ResourceManager.Search - - sdk/securitycenter/Azure.ResourceManager.SecurityCenter - - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps - - sdk/securityinsights/Azure.ResourceManager.SecurityInsights - - sdk/selfhelp/Azure.ResourceManager.SelfHelp - - sdk/servicebus/Azure.ResourceManager.ServiceBus - - sdk/servicefabric/Azure.ResourceManager.ServiceFabric - - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters - - sdk/servicelinker/Azure.ResourceManager.ServiceLinker - - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking - - sdk/signalr/Azure.ResourceManager.SignalR - - sdk/sphere/Azure.ResourceManager.Sphere - - sdk/sqlmanagement/Azure.ResourceManager.Sql - - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine - - sdk/storage/Azure.ResourceManager.Storage - - sdk/storagecache/Azure.ResourceManager.StorageCache - - sdk/storagemover/Azure.ResourceManager.StorageMover - - sdk/storagepool/Azure.ResourceManager.StoragePool - - sdk/storagesync/Azure.ResourceManager.StorageSync - - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics - - sdk/subscription/Azure.ResourceManager.Subscription - - sdk/support/Azure.ResourceManager.Support + - sdk/fluidrelay/Azure.ResourceManager.FluidRelay + - sdk/chaos/Azure.ResourceManager.Chaos + - sdk/automanage/Azure.ResourceManager.Automanage + - sdk/edgeorder/Azure.ResourceManager.EdgeOrder + - sdk/networkcloud/Azure.ResourceManager.NetworkCloud - sdk/synapse/Azure.ResourceManager.Synapse - - sdk/trafficmanager/Azure.ResourceManager.TrafficManager - - sdk/voiceservices/Azure.ResourceManager.VoiceServices - - sdk/webpubsub/Azure.ResourceManager.WebPubSub + - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization + - sdk/billing/Azure.ResourceManager.Billing + - sdk/graphservices/Azure.ResourceManager.GraphServices + - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup + - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery + - sdk/appplatform/Azure.ResourceManager.AppPlatform - sdk/websites/Azure.ResourceManager.AppService - - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor - - sdk/workloads/Azure.ResourceManager.Workloads + - sdk/blueprint/Azure.ResourceManager.Blueprint + - sdk/quantum/Azure.ResourceManager.Quantum + - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute + - sdk/costmanagement/Azure.ResourceManager.CostManagement + - sdk/apicenter/Azure.ResourceManager.ApiCenter extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml From 10878524fccf99365954ad8de84c0d882f903f7d Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Tue, 26 Sep 2023 15:28:44 +0800 Subject: [PATCH 2/3] update --- ....ResourceManager.DatabaseFleetManager.sln} | 6 +- .../CHANGELOG.md | 2 +- .../Directory.Build.props | 0 .../README.md | 6 +- ...ger.DatabaseFleetManager.netstandard2.0.cs | 403 ++++++++++++ .../assets.json | 2 +- ...nager.DatabaseFleetManager.Samples.csproj} | 2 +- .../Samples/Sample_FleetCollection.cs | 48 +- .../Samples/Sample_FleetMemberCollection.cs | 47 +- .../Samples/Sample_FleetMemberResource.cs | 6 +- .../Generated/Samples/Sample_FleetResource.cs | 6 +- .../Samples/Sample_UpdateRunCollection.cs | 49 +- .../Samples/Sample_UpdateRunResource.cs | 6 +- ...sourceManager.DatabaseFleetManager.csproj} | 4 +- .../ArmDatabaseFleetManagerModelFactory.cs} | 12 +- .../DatabaseFleetManagerExtensions.cs} | 6 +- .../ResourceGroupResourceExtensionClient.cs | 2 +- .../SubscriptionResourceExtensionClient.cs | 4 +- .../src/Generated/FleetCollection.cs | 82 ++- .../src/Generated/FleetData.cs | 4 +- .../src/Generated/FleetMemberCollection.cs | 82 ++- .../src/Generated/FleetMemberData.cs | 4 +- .../src/Generated/FleetMemberResource.cs | 14 +- .../src/Generated/FleetResource.cs | 14 +- .../DatabaseFleetManagerArmOperation.cs} | 14 +- .../DatabaseFleetManagerArmOperationOfT.cs} | 14 +- .../FleetMemberOperationSource.cs | 2 +- .../FleetOperationSource.cs | 2 +- .../UpdateRunOperationSource.cs | 2 +- .../APIServerAccessProfile.Serialization.cs | 2 +- .../Models/APIServerAccessProfile.cs | 2 +- .../Models/AgentProfile.Serialization.cs | 2 +- .../src/Generated/Models/AgentProfile.cs | 2 +- .../FleetCredentialResult.Serialization.cs | 2 +- .../Generated/Models/FleetCredentialResult.cs | 2 +- .../FleetCredentialResults.Serialization.cs | 2 +- .../Models/FleetCredentialResults.cs | 2 +- .../Models/FleetData.Serialization.cs | 4 +- .../Models/FleetHubProfile.Serialization.cs | 2 +- .../src/Generated/Models/FleetHubProfile.cs | 2 +- .../Models/FleetListResult.Serialization.cs | 4 +- .../src/Generated/Models/FleetListResult.cs | 4 +- .../Models/FleetMemberData.Serialization.cs | 4 +- .../FleetMemberListResult.Serialization.cs | 4 +- .../Generated/Models/FleetMemberListResult.cs | 4 +- .../Models/FleetMemberPatch.Serialization.cs | 2 +- .../src/Generated/Models/FleetMemberPatch.cs | 2 +- .../Models/FleetMemberProvisioningState.cs | 2 +- .../Models/FleetPatch.Serialization.cs | 2 +- .../src/Generated/Models/FleetPatch.cs | 2 +- .../Models/FleetProvisioningState.cs | 2 +- .../ManagedClusterUpdate.Serialization.cs | 2 +- .../Generated/Models/ManagedClusterUpdate.cs | 2 +- ...ManagedClusterUpgradeSpec.Serialization.cs | 2 +- .../Models/ManagedClusterUpgradeSpec.cs | 2 +- .../Models/ManagedClusterUpgradeType.cs | 2 +- .../MemberUpdateStatus.Serialization.cs | 2 +- .../Generated/Models/MemberUpdateStatus.cs | 2 +- .../NodeImageSelection.Serialization.cs | 2 +- .../Generated/Models/NodeImageSelection.cs | 2 +- .../NodeImageSelectionStatus.Serialization.cs | 2 +- .../Models/NodeImageSelectionStatus.cs | 2 +- .../Models/NodeImageSelectionType.cs | 2 +- .../Models/NodeImageVersion.Serialization.cs | 2 +- .../src/Generated/Models/NodeImageVersion.cs | 2 +- .../Models/UpdateGroup.Serialization.cs | 2 +- .../src/Generated/Models/UpdateGroup.cs | 2 +- .../Models/UpdateGroupStatus.Serialization.cs | 2 +- .../src/Generated/Models/UpdateGroupStatus.cs | 2 +- .../Models/UpdateRunData.Serialization.cs | 4 +- .../UpdateRunListResult.Serialization.cs | 4 +- .../Generated/Models/UpdateRunListResult.cs | 4 +- .../Models/UpdateRunProvisioningState.cs | 2 +- .../Models/UpdateRunStatus.Serialization.cs | 2 +- .../src/Generated/Models/UpdateRunStatus.cs | 2 +- .../Models/UpdateRunStrategy.Serialization.cs | 2 +- .../src/Generated/Models/UpdateRunStrategy.cs | 2 +- .../Models/UpdateStage.Serialization.cs | 2 +- .../src/Generated/Models/UpdateStage.cs | 2 +- .../Models/UpdateStageStatus.Serialization.cs | 2 +- .../src/Generated/Models/UpdateStageStatus.cs | 2 +- .../src/Generated/Models/UpdateState.cs | 2 +- .../Models/UpdateStatus.Serialization.cs | 2 +- .../src/Generated/Models/UpdateStatus.cs | 2 +- .../Models/WaitStatus.Serialization.cs | 2 +- .../src/Generated/Models/WaitStatus.cs | 2 +- .../src/Generated/ProviderConstants.cs | 2 +- .../FleetMembersRestOperations.cs | 4 +- .../RestOperations/FleetsRestOperations.cs | 4 +- .../UpdateRunsRestOperations.cs | 4 +- .../src/Generated/UpdateRunCollection.cs | 82 ++- .../src/Generated/UpdateRunData.cs | 4 +- .../src/Generated/UpdateRunResource.cs | 20 +- .../src/Properties/AssemblyInfo.cs | 4 +- .../src/autorest.md | 4 +- ...eManager.DatabaseFleetManager.Tests.csproj | 5 + ...DatabaseFleetManagerManagementTestBase.cs} | 8 +- ...eFleetManagerManagementTestEnvironment.cs} | 4 +- ...re.ResourceManager.Fleet.netstandard2.0.cs | 397 ------------ .../Azure.ResourceManager.Fleet.Tests.csproj | 5 - sdk/fleet/ci.mgmt.yml | 32 +- sdk/resourcemanager/ci.mgmt.yml | 590 +++++++++--------- 102 files changed, 1238 insertions(+), 908 deletions(-) rename sdk/fleet/{Azure.ResourceManager.Fleet/Azure.ResourceManager.Fleet.sln => Azure.ResourceManager.DatabaseFleetManager/Azure.ResourceManager.DatabaseFleetManager.sln} (89%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/CHANGELOG.md (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/Directory.Build.props (100%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/README.md (91%) create mode 100644 sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/assets.json (53%) rename sdk/fleet/{Azure.ResourceManager.Fleet/samples/Azure.ResourceManager.Fleet.Samples.csproj => Azure.ResourceManager.DatabaseFleetManager/samples/Azure.ResourceManager.DatabaseFleetManager.Samples.csproj} (73%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/samples/Generated/Samples/Sample_FleetCollection.cs (77%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/samples/Generated/Samples/Sample_FleetMemberCollection.cs (78%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/samples/Generated/Samples/Sample_FleetMemberResource.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/samples/Generated/Samples/Sample_FleetResource.cs (98%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/samples/Generated/Samples/Sample_UpdateRunCollection.cs (78%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/samples/Generated/Samples/Sample_UpdateRunResource.cs (98%) rename sdk/fleet/{Azure.ResourceManager.Fleet/src/Azure.ResourceManager.Fleet.csproj => Azure.ResourceManager.DatabaseFleetManager/src/Azure.ResourceManager.DatabaseFleetManager.csproj} (67%) rename sdk/fleet/{Azure.ResourceManager.Fleet/src/Generated/ArmFleetModelFactory.cs => Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs} (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet/src/Generated/Extensions/FleetExtensions.cs => Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs} (98%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/FleetCollection.cs (80%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/FleetData.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/FleetMemberCollection.cs (79%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/FleetMemberData.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/FleetMemberResource.cs (91%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/FleetResource.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperation.cs => Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperation.cs} (78%) rename sdk/fleet/{Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperationOfT.cs => Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperationOfT.cs} (78%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/LongRunningOperation/FleetOperationSource.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/APIServerAccessProfile.Serialization.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/APIServerAccessProfile.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/AgentProfile.Serialization.cs (95%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/AgentProfile.cs (94%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetCredentialResult.Serialization.cs (95%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetCredentialResult.cs (94%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetCredentialResults.Serialization.cs (95%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetCredentialResults.cs (94%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetData.Serialization.cs (98%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetHubProfile.Serialization.cs (98%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetHubProfile.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetListResult.Serialization.cs (93%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetListResult.cs (92%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetMemberData.Serialization.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetMemberListResult.Serialization.cs (93%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetMemberListResult.cs (93%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetMemberPatch.Serialization.cs (92%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetMemberPatch.cs (90%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetMemberProvisioningState.cs (98%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetPatch.Serialization.cs (94%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetPatch.cs (92%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/FleetProvisioningState.cs (98%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/ManagedClusterUpdate.Serialization.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/ManagedClusterUpdate.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/ManagedClusterUpgradeSpec.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/ManagedClusterUpgradeType.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/MemberUpdateStatus.Serialization.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/MemberUpdateStatus.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/NodeImageSelection.Serialization.cs (95%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/NodeImageSelection.cs (92%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs (95%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/NodeImageSelectionStatus.cs (94%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/NodeImageSelectionType.cs (98%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/NodeImageVersion.Serialization.cs (93%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/NodeImageVersion.cs (93%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateGroup.Serialization.cs (94%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateGroup.cs (95%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateGroupStatus.Serialization.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateGroupStatus.cs (95%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateRunData.Serialization.cs (98%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateRunListResult.Serialization.cs (93%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateRunListResult.cs (92%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateRunProvisioningState.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateRunStatus.Serialization.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateRunStatus.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateRunStrategy.Serialization.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateRunStrategy.cs (95%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateStage.Serialization.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateStage.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateStageStatus.Serialization.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateStageStatus.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateState.cs (98%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateStatus.Serialization.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/UpdateStatus.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/WaitStatus.Serialization.cs (96%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/Models/WaitStatus.cs (94%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/ProviderConstants.cs (87%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/RestOperations/FleetMembersRestOperations.cs (99%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/RestOperations/FleetsRestOperations.cs (99%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/RestOperations/UpdateRunsRestOperations.cs (99%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/UpdateRunCollection.cs (79%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/UpdateRunData.cs (97%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Generated/UpdateRunResource.cs (89%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/Properties/AssemblyInfo.cs (51%) rename sdk/fleet/{Azure.ResourceManager.Fleet => Azure.ResourceManager.DatabaseFleetManager}/src/autorest.md (91%) create mode 100644 sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/Azure.ResourceManager.DatabaseFleetManager.Tests.csproj rename sdk/fleet/{Azure.ResourceManager.Fleet/tests/FleetManagementTestBase.cs => Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestBase.cs} (77%) rename sdk/fleet/{Azure.ResourceManager.Fleet/tests/FleetManagementTestEnvironment.cs => Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestEnvironment.cs} (50%) delete mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/api/Azure.ResourceManager.Fleet.netstandard2.0.cs delete mode 100644 sdk/fleet/Azure.ResourceManager.Fleet/tests/Azure.ResourceManager.Fleet.Tests.csproj diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/Azure.ResourceManager.Fleet.sln b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Azure.ResourceManager.DatabaseFleetManager.sln similarity index 89% rename from sdk/fleet/Azure.ResourceManager.Fleet/Azure.ResourceManager.Fleet.sln rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Azure.ResourceManager.DatabaseFleetManager.sln index b28021436ff89..fecd2294f9aa3 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/Azure.ResourceManager.Fleet.sln +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Azure.ResourceManager.DatabaseFleetManager.sln @@ -3,11 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30309.148 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.Fleet", "src\Azure.ResourceManager.Fleet.csproj", "{848F28F3-DA60-4234-A348-872B4D46BDF2}" +Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.DatabaseFleetManager", "src\Azure.ResourceManager.DatabaseFleetManager.csproj", "{848F28F3-DA60-4234-A348-872B4D46BDF2}" EndProject -Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.Fleet.Tests", "tests\Azure.ResourceManager.Fleet.Tests.csproj", "{BAFD4CFA-48E6-4408-8054-0C62C3B2196D}" +Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.DatabaseFleetManager.Tests", "tests\Azure.ResourceManager.DatabaseFleetManager.Tests.csproj", "{BAFD4CFA-48E6-4408-8054-0C62C3B2196D}" EndProject -Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.Fleet.Samples", "samples\Azure.ResourceManager.Fleet.Samples.csproj", "{AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}" +Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.DatabaseFleetManager.Samples", "samples\Azure.ResourceManager.DatabaseFleetManager.Samples.csproj", "{AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}" EndProject Global GlobalSection(SolutionProperties) = preSolution diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/CHANGELOG.md b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/CHANGELOG.md similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/CHANGELOG.md rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/CHANGELOG.md index 23f86d1e896ee..d96467959e81a 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/CHANGELOG.md +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2023-09-26) ### General New Features diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/Directory.Build.props b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Directory.Build.props similarity index 100% rename from sdk/fleet/Azure.ResourceManager.Fleet/Directory.Build.props rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Directory.Build.props diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/README.md b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/README.md similarity index 91% rename from sdk/fleet/Azure.ResourceManager.Fleet/README.md rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/README.md index 52f07949c8e20..36589e5302a9d 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/README.md +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/README.md @@ -1,6 +1,6 @@ -# Microsoft Azure Fleet management client library for .NET +# Microsoft Azure Database Fleet Manager management client library for .NET -**[Describe the service briefly first.]** +Azure Database Fleet Manager empowers Azure SQL customers who have adopted database scale-out to achieve more by simplifying implementation and operation. This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: @@ -17,7 +17,7 @@ This library follows the [new Azure SDK guidelines](https://azure.github.io/azur Install the Microsoft Azure Fleet management library for .NET with [NuGet](https://www.nuget.org/): ```dotnetcli -dotnet add package Azure.ResourceManager.Fleet --prerelease +dotnet add package Azure.ResourceManager.DatabaseFleetManager --prerelease ``` ### Prerequisites diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs new file mode 100644 index 0000000000000..7837b2131e114 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs @@ -0,0 +1,403 @@ +namespace Azure.ResourceManager.DatabaseFleetManager +{ + public static partial class DatabaseFleetManagerExtensions + { + public static Azure.Response GetFleet(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetFleetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetMemberResource GetFleetMemberResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetResource GetFleetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetCollection GetFleets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetFleets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetFleetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.UpdateRunResource GetUpdateRunResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class FleetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FleetCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.FleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.FleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fleetName, 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 fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetName, 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 FleetData : Azure.ResourceManager.Models.TrackedResourceData + { + public FleetData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile HubProfile { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class FleetMemberCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FleetMemberCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.DatabaseFleetManager.FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.DatabaseFleetManager.FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fleetMemberName, 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 fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetMemberName, 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 FleetMemberData : Azure.ResourceManager.Models.ResourceData + { + public FleetMemberData() { } + public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } set { } } + public Azure.ETag? ETag { get { throw null; } } + public string Group { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class FleetMemberResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FleetMemberResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetMemberData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class FleetResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FleetResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetData 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 fleetName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, 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 GetCredentials(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCredentialsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetFleetMember(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFleetMemberAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetMemberCollection GetFleetMembers() { throw null; } + public virtual Azure.Response GetUpdateRun(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetUpdateRunAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.UpdateRunCollection GetUpdateRuns() { 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; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.FleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.FleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class UpdateRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected UpdateRunCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.DatabaseFleetManager.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.DatabaseFleetManager.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string updateRunName, 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 updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string updateRunName, 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 UpdateRunData : Azure.ResourceManager.Models.ResourceData + { + public UpdateRunData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpdate ManagedClusterUpdate { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunStatus Status { get { throw null; } } + public System.Collections.Generic.IList StrategyStages { get { throw null; } set { } } + } + public partial class UpdateRunResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected UpdateRunResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.UpdateRunData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class APIServerAccessProfile + { + public APIServerAccessProfile() { } + public bool? EnablePrivateCluster { get { throw null; } set { } } + public bool? EnableVnetIntegration { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + } + public static partial class ArmDatabaseFleetManagerModelFactory + { + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetCredentialResult FleetCredentialResult(string name = null, byte[] value = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetCredentialResults FleetCredentialResults(System.Collections.Generic.IEnumerable kubeconfigs = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetData FleetData(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.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState?), Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile hubProfile = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile FleetHubProfile(string dnsPrefix = null, Azure.ResourceManager.DatabaseFleetManager.Models.APIServerAccessProfile apiServerAccessProfile = null, Azure.Core.ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetMemberData FleetMemberData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.Core.ResourceIdentifier clusterResourceId = null, string group = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.MemberUpdateStatus MemberUpdateStatus(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus status = null, string name = null, string clusterResourceId = null, string operationId = null, string message = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageVersion NodeImageVersion(string version = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateGroupStatus UpdateGroupStatus(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus status = null, string name = null, System.Collections.Generic.IEnumerable members = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.UpdateRunData UpdateRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState?), System.Collections.Generic.IEnumerable strategyStages = null, Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpdate managedClusterUpdate = null, Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunStatus status = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunStatus UpdateRunStatus(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus status = null, System.Collections.Generic.IEnumerable stages = null, System.Collections.Generic.IEnumerable selectedNodeImageVersions = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStageStatus UpdateStageStatus(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus status = null, string name = null, System.Collections.Generic.IEnumerable groups = null, Azure.ResourceManager.DatabaseFleetManager.Models.WaitStatus afterStageWaitStatus = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus UpdateStatus(System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState? state = default(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState?), Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.WaitStatus WaitStatus(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus status = null, int? waitDurationInSeconds = default(int?)) { throw null; } + } + public partial class FleetCredentialResult + { + internal FleetCredentialResult() { } + public string Name { get { throw null; } } + public byte[] Value { get { throw null; } } + } + public partial class FleetCredentialResults + { + internal FleetCredentialResults() { } + public System.Collections.Generic.IReadOnlyList Kubeconfigs { get { throw null; } } + } + public partial class FleetHubProfile + { + public FleetHubProfile() { } + public Azure.Core.ResourceIdentifier AgentSubnetId { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.APIServerAccessProfile ApiServerAccessProfile { get { throw null; } set { } } + public string DnsPrefix { get { throw null; } set { } } + public string Fqdn { get { throw null; } } + public string KubernetesVersion { get { throw null; } } + } + public partial class FleetMemberPatch + { + public FleetMemberPatch() { } + public string Group { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FleetMemberProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FleetMemberProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Joining { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Leaving { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState 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.DatabaseFleetManager.Models.FleetMemberProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class FleetPatch + { + public FleetPatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FleetProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FleetProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState 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.DatabaseFleetManager.Models.FleetProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ManagedClusterUpdate + { + public ManagedClusterUpdate(Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeSpec upgrade) { } + public Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType? SelectionType { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeSpec Upgrade { get { throw null; } set { } } + } + public partial class ManagedClusterUpgradeSpec + { + public ManagedClusterUpgradeSpec(Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType upgradeType) { } + public string KubernetesVersion { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType UpgradeType { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ManagedClusterUpgradeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ManagedClusterUpgradeType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType Full { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType NodeImageOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType 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.DatabaseFleetManager.Models.ManagedClusterUpgradeType left, Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType left, Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MemberUpdateStatus + { + internal MemberUpdateStatus() { } + public string ClusterResourceId { get { throw null; } } + public string Message { get { throw null; } } + public string Name { get { throw null; } } + public string OperationId { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus Status { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NodeImageSelectionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NodeImageSelectionType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType Consistent { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType Latest { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType 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.DatabaseFleetManager.Models.NodeImageSelectionType left, Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType left, Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NodeImageVersion + { + internal NodeImageVersion() { } + public string Version { get { throw null; } } + } + public partial class UpdateGroup + { + public UpdateGroup(string name) { } + public string Name { get { throw null; } set { } } + } + public partial class UpdateGroupStatus + { + internal UpdateGroupStatus() { } + public System.Collections.Generic.IReadOnlyList Members { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus Status { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UpdateRunProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UpdateRunProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState 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.DatabaseFleetManager.Models.UpdateRunProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UpdateRunStatus + { + internal UpdateRunStatus() { } + public System.Collections.Generic.IReadOnlyList SelectedNodeImageVersions { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Stages { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus Status { get { throw null; } } + } + public partial class UpdateStage + { + public UpdateStage(string name) { } + public int? AfterStageWaitInSeconds { get { throw null; } set { } } + public System.Collections.Generic.IList Groups { get { throw null; } } + public string Name { get { throw null; } set { } } + } + public partial class UpdateStageStatus + { + internal UpdateStageStatus() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.WaitStatus AfterStageWaitStatus { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Groups { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus Status { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UpdateState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UpdateState(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState Completed { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState NotStarted { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState Running { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState Skipped { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState Stopped { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState Stopping { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState 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.DatabaseFleetManager.Models.UpdateState left, Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState left, Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UpdateStatus + { + internal UpdateStatus() { } + public System.DateTimeOffset? CompletedOn { get { throw null; } } + public Azure.ResponseError Error { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState? State { get { throw null; } } + } + public partial class WaitStatus + { + internal WaitStatus() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus Status { get { throw null; } } + public int? WaitDurationInSeconds { get { throw null; } } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/assets.json b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/assets.json similarity index 53% rename from sdk/fleet/Azure.ResourceManager.Fleet/assets.json rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/assets.json index be79f7436dca2..bdd6dca027d41 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/assets.json +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/assets.json @@ -1,6 +1,6 @@ { "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", - "TagPrefix": "net//Azure.ResourceManager.Fleet", + "TagPrefix": "net//Azure.ResourceManager.DatabaseFleetManager", "Tag": "" } diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Azure.ResourceManager.Fleet.Samples.csproj b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Azure.ResourceManager.DatabaseFleetManager.Samples.csproj similarity index 73% rename from sdk/fleet/Azure.ResourceManager.Fleet/samples/Azure.ResourceManager.Fleet.Samples.csproj rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Azure.ResourceManager.DatabaseFleetManager.Samples.csproj index ef5d212668519..fcd626b89d429 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Azure.ResourceManager.Fleet.Samples.csproj +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Azure.ResourceManager.DatabaseFleetManager.Samples.csproj @@ -5,6 +5,6 @@ - + \ No newline at end of file diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetCollection.cs similarity index 77% rename from sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetCollection.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetCollection.cs index aab1c26daa5f0..31021bc8af968 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetCollection.cs @@ -11,11 +11,11 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager; -using Azure.ResourceManager.Fleet; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager; +using Azure.ResourceManager.DatabaseFleetManager.Models; using Azure.ResourceManager.Resources; -namespace Azure.ResourceManager.Fleet.Samples +namespace Azure.ResourceManager.DatabaseFleetManager.Samples { public partial class Sample_FleetCollection { @@ -119,6 +119,48 @@ public async Task Exists_GetsAFleetResource() Console.WriteLine($"Succeeded: {result}"); } + // Gets a Fleet resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetsAFleetResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Get.json + // this example is just showing the usage of "Fleets_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 = "subid1"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FleetResource + FleetCollection collection = resourceGroupResource.GetFleets(); + + // invoke the operation + string fleetName = "fleet1"; + NullableResponse response = await collection.GetIfExistsAsync(fleetName); + FleetResource 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 + FleetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + // Creates a Fleet resource with a long running operation. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetMemberCollection.cs similarity index 78% rename from sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberCollection.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetMemberCollection.cs index b1454567bdb78..14b8086aabc2d 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetMemberCollection.cs @@ -11,9 +11,9 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager; -using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.DatabaseFleetManager; -namespace Azure.ResourceManager.Fleet.Samples +namespace Azure.ResourceManager.DatabaseFleetManager.Samples { public partial class Sample_FleetMemberCollection { @@ -120,6 +120,49 @@ public async Task Exists_GetsAFleetMemberResource() Console.WriteLine($"Succeeded: {result}"); } + // Gets a FleetMember resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetsAFleetMemberResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Get.json + // this example is just showing the usage of "FleetMembers_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 FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetMemberResource + FleetMemberCollection collection = fleet.GetFleetMembers(); + + // invoke the operation + string fleetMemberName = "member-1"; + NullableResponse response = await collection.GetIfExistsAsync(fleetMemberName); + FleetMemberResource 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 + FleetMemberData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + // Creates a FleetMember resource with a long running operation. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetMemberResource.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberResource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetMemberResource.cs index c97d212915ded..14e9ccaf61400 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetMemberResource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetMemberResource.cs @@ -11,10 +11,10 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager; -using Azure.ResourceManager.Fleet; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager; +using Azure.ResourceManager.DatabaseFleetManager.Models; -namespace Azure.ResourceManager.Fleet.Samples +namespace Azure.ResourceManager.DatabaseFleetManager.Samples { public partial class Sample_FleetMemberResource { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetResource.cs similarity index 98% rename from sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetResource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetResource.cs index 98f7eaf95e609..9e9e6a2d57cb5 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_FleetResource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetResource.cs @@ -11,11 +11,11 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager; -using Azure.ResourceManager.Fleet; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager; +using Azure.ResourceManager.DatabaseFleetManager.Models; using Azure.ResourceManager.Resources; -namespace Azure.ResourceManager.Fleet.Samples +namespace Azure.ResourceManager.DatabaseFleetManager.Samples { public partial class Sample_FleetResource { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_UpdateRunCollection.cs similarity index 78% rename from sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunCollection.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_UpdateRunCollection.cs index aada239d4f7ca..0cffe1d9370c3 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_UpdateRunCollection.cs @@ -11,10 +11,10 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager; -using Azure.ResourceManager.Fleet; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager; +using Azure.ResourceManager.DatabaseFleetManager.Models; -namespace Azure.ResourceManager.Fleet.Samples +namespace Azure.ResourceManager.DatabaseFleetManager.Samples { public partial class Sample_UpdateRunCollection { @@ -121,6 +121,49 @@ public async Task Exists_GetsAnUpdateRunResource() Console.WriteLine($"Succeeded: {result}"); } + // Gets an UpdateRun resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetsAnUpdateRunResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Get.json + // this example is just showing the usage of "UpdateRuns_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 FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this UpdateRunResource + UpdateRunCollection collection = fleet.GetUpdateRuns(); + + // invoke the operation + string updateRunName = "run1"; + NullableResponse response = await collection.GetIfExistsAsync(updateRunName); + UpdateRunResource 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 + UpdateRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + // Create an UpdateRun. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_UpdateRunResource.cs similarity index 98% rename from sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunResource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_UpdateRunResource.cs index 76df5af25de8f..1dd447dc55649 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/samples/Generated/Samples/Sample_UpdateRunResource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_UpdateRunResource.cs @@ -11,10 +11,10 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager; -using Azure.ResourceManager.Fleet; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager; +using Azure.ResourceManager.DatabaseFleetManager.Models; -namespace Azure.ResourceManager.Fleet.Samples +namespace Azure.ResourceManager.DatabaseFleetManager.Samples { public partial class Sample_UpdateRunResource { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Azure.ResourceManager.Fleet.csproj b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Azure.ResourceManager.DatabaseFleetManager.csproj similarity index 67% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Azure.ResourceManager.Fleet.csproj rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Azure.ResourceManager.DatabaseFleetManager.csproj index 265c9eb98b991..cb4d0508a88eb 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Azure.ResourceManager.Fleet.csproj +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Azure.ResourceManager.DatabaseFleetManager.csproj @@ -1,8 +1,8 @@  1.0.0-beta.1 - Azure.ResourceManager.Fleet - Azure Resource Manager client SDK for Azure resource provider Fleet. + Azure.ResourceManager.DatabaseFleetManager + Azure Resource Manager client SDK for Azure resource provider Database Fleet Manager. azure;management;arm;resource manager;fleet diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/ArmFleetModelFactory.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/ArmFleetModelFactory.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs index 3b083fb431789..240fa0610cea6 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/ArmFleetModelFactory.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs @@ -10,13 +10,13 @@ using System.Linq; using Azure; using Azure.Core; -using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.DatabaseFleetManager; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// Model factory for models. - public static partial class ArmFleetModelFactory + public static partial class ArmDatabaseFleetManagerModelFactory { /// Initializes a new instance of FleetData. /// The id. @@ -29,7 +29,7 @@ public static partial class ArmFleetModelFactory /// Managed identity. /// The status of the last operation. /// The FleetHubProfile configures the Fleet's hub. - /// A new instance for mocking. + /// A new instance for mocking. public static FleetData FleetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? eTag = null, ManagedServiceIdentity identity = null, FleetProvisioningState? provisioningState = null, FleetHubProfile hubProfile = null) { tags ??= new Dictionary(); @@ -77,7 +77,7 @@ public static FleetCredentialResult FleetCredentialResult(string name = null, by /// The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. /// The group this member belongs to for multi-cluster update management. /// The status of the last operation. - /// A new instance for mocking. + /// A new instance for mocking. public static FleetMemberData FleetMemberData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, ResourceIdentifier clusterResourceId = null, string group = null, FleetMemberProvisioningState? provisioningState = null) { return new FleetMemberData(id, name, resourceType, systemData, eTag, clusterResourceId, group, provisioningState); @@ -97,7 +97,7 @@ public static FleetMemberData FleetMemberData(ResourceIdentifier id = null, stri /// /// The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started. /// The status of the UpdateRun. - /// A new instance for mocking. + /// A new instance for mocking. public static UpdateRunData UpdateRunData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, UpdateRunProvisioningState? provisioningState = null, IEnumerable strategyStages = null, ManagedClusterUpdate managedClusterUpdate = null, UpdateRunStatus status = null) { strategyStages ??= new List(); diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/FleetExtensions.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs similarity index 98% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/FleetExtensions.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs index ab2e36280f8aa..5be10c22831ce 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/FleetExtensions.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs @@ -13,10 +13,10 @@ using Azure.ResourceManager; using Azure.ResourceManager.Resources; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { - /// A class to add extension methods to Azure.ResourceManager.Fleet. - public static partial class FleetExtensions + /// A class to add extension methods to Azure.ResourceManager.DatabaseFleetManager. + public static partial class DatabaseFleetManagerExtensions { private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmResource resource) { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs index 9cfe39d72442b..4c9c10be03630 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -8,7 +8,7 @@ using Azure.Core; using Azure.ResourceManager; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { /// A class to add extension methods to ResourceGroupResource. internal partial class ResourceGroupResourceExtensionClient : ArmResource diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 2b8818f07e4a0..52790145671d5 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -12,7 +12,7 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { /// A class to add extension methods to SubscriptionResource. internal partial class SubscriptionResourceExtensionClient : ArmResource @@ -32,7 +32,7 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie { } - private ClientDiagnostics FleetClientDiagnostics => _fleetClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Fleet", FleetResource.ResourceType.Namespace, Diagnostics); + private ClientDiagnostics FleetClientDiagnostics => _fleetClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", FleetResource.ResourceType.Namespace, Diagnostics); private FleetsRestOperations FleetRestClient => _fleetRestClient ??= new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(FleetResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetCollection.cs similarity index 80% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetCollection.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetCollection.cs index dcc698e99f6a3..fa8aa87f9b53d 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetCollection.cs @@ -18,7 +18,7 @@ using Azure.ResourceManager; using Azure.ResourceManager.Resources; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { /// /// A class representing a collection of and their operations. @@ -40,7 +40,7 @@ protected FleetCollection() /// The identifier of the parent resource that is the target of operations. internal FleetCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _fleetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Fleet", FleetResource.ResourceType.Namespace, Diagnostics); + _fleetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", FleetResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(FleetResource.ResourceType, out string fleetApiVersion); _fleetRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetApiVersion); #if DEBUG @@ -85,7 +85,7 @@ public virtual async Task> CreateOrUpdateAsync(WaitU try { var response = await _fleetRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new FleetArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DatabaseFleetManagerArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -128,7 +128,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, s try { var response = _fleetRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new FleetArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DatabaseFleetManagerArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -328,6 +328,80 @@ public virtual Response Exists(string fleetName, CancellationToken cancell } } + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// The name of the Fleet resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FleetResource(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.ContainerService/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleets_Get + /// + /// + /// + /// The name of the Fleet resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.GetIfExists"); + scope.Start(); + try + { + var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetData.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetData.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetData.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetData.cs index 49f54f7c99821..9879bb7583503 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetData.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetData.cs @@ -8,10 +8,10 @@ using System.Collections.Generic; using Azure; using Azure.Core; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { /// /// A class representing the Fleet data model. diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberCollection.cs similarity index 79% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberCollection.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberCollection.cs index 5ef265e73f875..c4c73b02627c2 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberCollection.cs @@ -17,7 +17,7 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { /// /// A class representing a collection of and their operations. @@ -39,7 +39,7 @@ protected FleetMemberCollection() /// The identifier of the parent resource that is the target of operations. internal FleetMemberCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _fleetMemberClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Fleet", FleetMemberResource.ResourceType.Namespace, Diagnostics); + _fleetMemberClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", FleetMemberResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(FleetMemberResource.ResourceType, out string fleetMemberApiVersion); _fleetMemberRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetMemberApiVersion); #if DEBUG @@ -84,7 +84,7 @@ public virtual async Task> CreateOrUpdateAsync try { var response = await _fleetMemberRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new FleetArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DatabaseFleetManagerArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -127,7 +127,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn try { var response = _fleetMemberRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new FleetArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DatabaseFleetManagerArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -327,6 +327,80 @@ public virtual Response Exists(string fleetMemberName, CancellationToken c } } + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Get + /// + /// + /// + /// The name of the Fleet member resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string fleetMemberName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _fleetMemberRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FleetMemberResource(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.ContainerService/fleets/{fleetName}/members/{fleetMemberName} + /// + /// + /// Operation Id + /// FleetMembers_Get + /// + /// + /// + /// The name of the Fleet member resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string fleetMemberName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); + + using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.GetIfExists"); + scope.Start(); + try + { + var response = _fleetMemberRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FleetMemberResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberData.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberData.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberData.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberData.cs index b509d77384838..23a3b4995d558 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberData.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberData.cs @@ -7,10 +7,10 @@ using Azure; using Azure.Core; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { /// /// A class representing the FleetMember data model. diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberResource.cs similarity index 91% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberResource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberResource.cs index 2f028f6514a96..a8505fc94dd45 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetMemberResource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberResource.cs @@ -13,9 +13,9 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager.Models; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { /// /// A Class representing a FleetMember along with the instance operations that can be performed on it. @@ -55,7 +55,7 @@ internal FleetMemberResource(ArmClient client, FleetMemberData data) : this(clie /// The identifier of the resource that is the target of operations. internal FleetMemberResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _fleetMemberClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Fleet", ResourceType.Namespace, Diagnostics); + _fleetMemberClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string fleetMemberApiVersion); _fleetMemberRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetMemberApiVersion); #if DEBUG @@ -174,7 +174,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string try { var response = await _fleetMemberRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new FleetArmOperation(_fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(_fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -209,7 +209,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C try { var response = _fleetMemberRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new FleetArmOperation(_fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(_fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -248,7 +248,7 @@ public virtual async Task> UpdateAsync(WaitUnt try { var response = await _fleetMemberRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new FleetArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -287,7 +287,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Fle try { var response = _fleetMemberRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken); - var operation = new FleetArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetResource.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetResource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetResource.cs index 5f49b9a1b1a21..70ee0dadb1d85 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/FleetResource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetResource.cs @@ -14,10 +14,10 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager.Models; using Azure.ResourceManager.Resources; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { /// /// A Class representing a Fleet along with the instance operations that can be performed on it. @@ -57,7 +57,7 @@ internal FleetResource(ArmClient client, FleetData data) : this(client, data.Id) /// The identifier of the resource that is the target of operations. internal FleetResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _fleetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Fleet", ResourceType.Namespace, Diagnostics); + _fleetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string fleetApiVersion); _fleetRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetApiVersion); #if DEBUG @@ -282,7 +282,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string try { var response = await _fleetRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new FleetArmOperation(_fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(_fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -317,7 +317,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C try { var response = _fleetRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken); - var operation = new FleetArmOperation(_fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(_fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -356,7 +356,7 @@ public virtual async Task> UpdateAsync(WaitUntil wai try { var response = await _fleetRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new FleetArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -395,7 +395,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, FleetPatc try { var response = _fleetRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken); - var operation = new FleetArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperation.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperation.cs similarity index 78% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperation.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperation.cs index 2d4a005231c6e..919c363d8a1c0 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperation.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperation.cs @@ -13,28 +13,28 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { #pragma warning disable SA1649 // File name should match first type name - internal class FleetArmOperation : ArmOperation + internal class DatabaseFleetManagerArmOperation : ArmOperation #pragma warning restore SA1649 // File name should match first type name { private readonly OperationInternal _operation; - /// Initializes a new instance of FleetArmOperation for mocking. - protected FleetArmOperation() + /// Initializes a new instance of DatabaseFleetManagerArmOperation for mocking. + protected DatabaseFleetManagerArmOperation() { } - internal FleetArmOperation(Response response) + internal DatabaseFleetManagerArmOperation(Response response) { _operation = OperationInternal.Succeeded(response); } - internal FleetArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + internal DatabaseFleetManagerArmOperation(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); - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "FleetArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DatabaseFleetManagerArmOperation", fallbackStrategy: new SequentialDelayStrategy()); } /// diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperationOfT.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperationOfT.cs similarity index 78% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperationOfT.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperationOfT.cs index 3672c40adf89e..ce6524018cef9 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetArmOperationOfT.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperationOfT.cs @@ -13,28 +13,28 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { #pragma warning disable SA1649 // File name should match first type name - internal class FleetArmOperation : ArmOperation + internal class DatabaseFleetManagerArmOperation : ArmOperation #pragma warning restore SA1649 // File name should match first type name { private readonly OperationInternal _operation; - /// Initializes a new instance of FleetArmOperation for mocking. - protected FleetArmOperation() + /// Initializes a new instance of DatabaseFleetManagerArmOperation for mocking. + protected DatabaseFleetManagerArmOperation() { } - internal FleetArmOperation(Response response) + internal DatabaseFleetManagerArmOperation(Response response) { _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); } - internal FleetArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + internal DatabaseFleetManagerArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) { var nextLinkOperation = NextLinkOperationImplementation.Create(source, pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "FleetArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DatabaseFleetManagerArmOperation", fallbackStrategy: new SequentialDelayStrategy()); } /// diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs index 54183c3f98f8e..bcd7e0931e8d7 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs @@ -12,7 +12,7 @@ using Azure.Core; using Azure.ResourceManager; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { internal class FleetMemberOperationSource : IOperationSource { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetOperationSource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetOperationSource.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetOperationSource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetOperationSource.cs index c7d7a0eb544cd..0c5c38335fde7 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/FleetOperationSource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetOperationSource.cs @@ -12,7 +12,7 @@ using Azure.Core; using Azure.ResourceManager; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { internal class FleetOperationSource : IOperationSource { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs index 9f31045776300..cf1e3a75a2bd4 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs @@ -12,7 +12,7 @@ using Azure.Core; using Azure.ResourceManager; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { internal class UpdateRunOperationSource : IOperationSource { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/APIServerAccessProfile.Serialization.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/APIServerAccessProfile.Serialization.cs index 1ec1a99a8e581..ebf9a08e4e2ae 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/APIServerAccessProfile.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class APIServerAccessProfile : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/APIServerAccessProfile.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/APIServerAccessProfile.cs index 79bcc63de0bfe..cca803ae40fb7 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/APIServerAccessProfile.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/APIServerAccessProfile.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// Access profile for the Fleet hub API server. public partial class APIServerAccessProfile diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AgentProfile.Serialization.cs similarity index 95% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AgentProfile.Serialization.cs index ef9024630a65e..8d822f94f61e0 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AgentProfile.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { internal partial class AgentProfile : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AgentProfile.cs similarity index 94% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AgentProfile.cs index 0d0802dd91f89..7f8ece5d2da96 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/AgentProfile.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AgentProfile.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// Agent profile for the Fleet hub. internal partial class AgentProfile diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResult.Serialization.cs similarity index 95% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResult.Serialization.cs index e0a857adca9a5..533e6ffc92f5c 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResult.Serialization.cs @@ -9,7 +9,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class FleetCredentialResult { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResult.cs similarity index 94% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResult.cs index a2f88999caeb1..20263d16cbd12 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResult.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResult.cs @@ -7,7 +7,7 @@ using System; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// One credential result item. public partial class FleetCredentialResult diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResults.Serialization.cs similarity index 95% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResults.Serialization.cs index f87cecb3f635e..b825a4e1836bd 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResults.Serialization.cs @@ -9,7 +9,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class FleetCredentialResults { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResults.cs similarity index 94% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResults.cs index 43b2cbf280acc..442739512d502 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetCredentialResults.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResults.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The Credential results response. public partial class FleetCredentialResults diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetData.Serialization.cs similarity index 98% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetData.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetData.Serialization.cs index 6259668b1c5a7..b812a6bce5efa 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetData.Serialization.cs @@ -9,10 +9,10 @@ using System.Text.Json; using Azure; using Azure.Core; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { public partial class FleetData : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.Serialization.cs similarity index 98% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.Serialization.cs index bbeefa33fae81..75480e75e5f20 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class FleetHubProfile : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.cs index 6dd6a17414cf4..4fe1a8ac4bbe5 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetHubProfile.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The FleetHubProfile configures the fleet hub. public partial class FleetHubProfile diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.Serialization.cs similarity index 93% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.Serialization.cs index 9d44a2b968611..cb94a913c0aee 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.Serialization.cs @@ -9,9 +9,9 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.DatabaseFleetManager; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { internal partial class FleetListResult { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.cs similarity index 92% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.cs index 0788638a5ebff..df96bc150f271 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetListResult.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.cs @@ -9,9 +9,9 @@ using System.Collections.Generic; using System.Linq; using Azure.Core; -using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.DatabaseFleetManager; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The response of a Fleet list operation. internal partial class FleetListResult diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberData.Serialization.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberData.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberData.Serialization.cs index 1bd1bdaea87f7..ce4ee6dc441da 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberData.Serialization.cs @@ -8,10 +8,10 @@ using System.Text.Json; using Azure; using Azure.Core; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { public partial class FleetMemberData : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberListResult.Serialization.cs similarity index 93% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberListResult.Serialization.cs index dac6686e03304..46a5cc38ceb95 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberListResult.Serialization.cs @@ -9,9 +9,9 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.DatabaseFleetManager; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { internal partial class FleetMemberListResult { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberListResult.cs similarity index 93% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberListResult.cs index 39e579f08fcbe..042bac037d613 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberListResult.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberListResult.cs @@ -9,9 +9,9 @@ using System.Collections.Generic; using System.Linq; using Azure.Core; -using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.DatabaseFleetManager; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The response of a FleetMember list operation. internal partial class FleetMemberListResult diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberPatch.Serialization.cs similarity index 92% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberPatch.Serialization.cs index 67de68baa70ff..aebfecbfff3ca 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberPatch.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class FleetMemberPatch : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberPatch.cs similarity index 90% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberPatch.cs index 1c390d4c3ad4d..dab8266e7913c 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberPatch.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberPatch.cs @@ -5,7 +5,7 @@ #nullable disable -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The type used for update operations of the FleetMember. public partial class FleetMemberPatch diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberProvisioningState.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberProvisioningState.cs similarity index 98% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberProvisioningState.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberProvisioningState.cs index 9896b122c4420..6fe877d251d40 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetMemberProvisioningState.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberProvisioningState.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The provisioning state of the last accepted operation. public readonly partial struct FleetMemberProvisioningState : IEquatable diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.Serialization.cs similarity index 94% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.Serialization.cs index b0df44547afba..976eda4d34ff4 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class FleetPatch : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.cs similarity index 92% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.cs index 62e5ff687b872..bcde1a1d4a754 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetPatch.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.cs @@ -9,7 +9,7 @@ using Azure.Core; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// Properties of a Fleet that can be patched. public partial class FleetPatch diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetProvisioningState.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetProvisioningState.cs similarity index 98% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetProvisioningState.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetProvisioningState.cs index a348c2c5064e4..8f6a3a7471964 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/FleetProvisioningState.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetProvisioningState.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The provisioning state of the last accepted operation. public readonly partial struct FleetProvisioningState : IEquatable diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpdate.Serialization.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpdate.Serialization.cs index c157622966f14..e7d2c0cb15845 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpdate.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class ManagedClusterUpdate : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpdate.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpdate.cs index 4f8254e62e3df..4c4909bc82383 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpdate.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpdate.cs @@ -8,7 +8,7 @@ using System; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The update to be applied to the ManagedClusters. public partial class ManagedClusterUpdate diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs index 286704d125fa6..e0c17a0a1792d 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class ManagedClusterUpgradeSpec : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeSpec.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeSpec.cs index db3287baef42c..94498bec01a02 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeSpec.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeSpec.cs @@ -5,7 +5,7 @@ #nullable disable -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The upgrade to apply to a ManagedCluster. public partial class ManagedClusterUpgradeSpec diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeType.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeType.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeType.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeType.cs index 5fd027ae673e5..37b79dc2741f1 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/ManagedClusterUpgradeType.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The type of upgrade to perform when targeting ManagedClusters. public readonly partial struct ManagedClusterUpgradeType : IEquatable diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.Serialization.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.Serialization.cs index 6d539fc4f7dca..d367e38dd6aa7 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class MemberUpdateStatus { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.cs index 22168cbfa5edd..4d55ea2e8811a 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/MemberUpdateStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.cs @@ -5,7 +5,7 @@ #nullable disable -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The status of a member update operation. public partial class MemberUpdateStatus diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelection.Serialization.cs similarity index 95% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelection.Serialization.cs index 1c44df3786031..ccb58d817e35e 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelection.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { internal partial class NodeImageSelection : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelection.cs similarity index 92% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelection.cs index 38c4a512c0891..44d6437934e36 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelection.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelection.cs @@ -5,7 +5,7 @@ #nullable disable -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The node image upgrade to be applied to the target nodes in update run. internal partial class NodeImageSelection diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs similarity index 95% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs index 66965679af557..1338a03895872 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs @@ -9,7 +9,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { internal partial class NodeImageSelectionStatus { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionStatus.cs similarity index 94% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionStatus.cs index 416329caaab9c..dac162a2535d1 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionStatus.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The node image upgrade specs for the update run. internal partial class NodeImageSelectionStatus diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionType.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionType.cs similarity index 98% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionType.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionType.cs index f7de3f8cf8038..e05a61840979e 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageSelectionType.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The node image upgrade type. public readonly partial struct NodeImageSelectionType : IEquatable diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageVersion.Serialization.cs similarity index 93% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageVersion.Serialization.cs index 19b0830d690c2..74172caf165cd 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageVersion.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class NodeImageVersion { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageVersion.cs similarity index 93% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageVersion.cs index 528f441a166b2..c214ea4bdd94a 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/NodeImageVersion.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageVersion.cs @@ -5,7 +5,7 @@ #nullable disable -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The node upgrade image version. public partial class NodeImageVersion diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroup.Serialization.cs similarity index 94% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroup.Serialization.cs index edf2c1923ec32..ddf18fd1a3ee2 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroup.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class UpdateGroup : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroup.cs similarity index 95% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroup.cs index 879b52f34e1b2..12bb00d0283e2 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroup.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroup.cs @@ -8,7 +8,7 @@ using System; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// A group to be updated. public partial class UpdateGroup diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroupStatus.Serialization.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroupStatus.Serialization.cs index 6a5af4a00ae5c..7e0bef2f459dd 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroupStatus.Serialization.cs @@ -9,7 +9,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class UpdateGroupStatus { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroupStatus.cs similarity index 95% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroupStatus.cs index cc00735705853..c4deb745836f4 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateGroupStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroupStatus.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The status of a UpdateGroup. public partial class UpdateGroupStatus diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunData.Serialization.cs similarity index 98% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunData.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunData.Serialization.cs index 94830f045a646..efced1631d735 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunData.Serialization.cs @@ -8,10 +8,10 @@ using System.Text.Json; using Azure; using Azure.Core; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { public partial class UpdateRunData : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunListResult.Serialization.cs similarity index 93% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunListResult.Serialization.cs index 913cb3c4ee50f..64f1624aae0b0 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunListResult.Serialization.cs @@ -9,9 +9,9 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.DatabaseFleetManager; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { internal partial class UpdateRunListResult { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunListResult.cs similarity index 92% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunListResult.cs index 952d2285656f7..cf3bc969e6ba6 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunListResult.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunListResult.cs @@ -9,9 +9,9 @@ using System.Collections.Generic; using System.Linq; using Azure.Core; -using Azure.ResourceManager.Fleet; +using Azure.ResourceManager.DatabaseFleetManager; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The response of a UpdateRun list operation. internal partial class UpdateRunListResult diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunProvisioningState.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunProvisioningState.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunProvisioningState.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunProvisioningState.cs index 690de077bccd3..fec891f8f89a3 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunProvisioningState.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunProvisioningState.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The provisioning state of the UpdateRun resource. public readonly partial struct UpdateRunProvisioningState : IEquatable diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStatus.Serialization.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStatus.Serialization.cs index 544ef0b29efab..dad32fa246de2 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStatus.Serialization.cs @@ -9,7 +9,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class UpdateRunStatus { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStatus.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStatus.cs index cfd9a031c3d57..84dfc6f739412 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStatus.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The status of a UpdateRun. public partial class UpdateRunStatus diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStrategy.Serialization.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStrategy.Serialization.cs index d6465c699d6de..3bcd4fa45fa60 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStrategy.Serialization.cs @@ -9,7 +9,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { internal partial class UpdateRunStrategy : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStrategy.cs similarity index 95% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStrategy.cs index ae999d0edc08f..525e42fe3573c 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateRunStrategy.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStrategy.cs @@ -10,7 +10,7 @@ using System.Linq; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The UpdateRunStrategy configures the sequence of Stages and Groups in which the clusters will be updated. internal partial class UpdateRunStrategy diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStage.Serialization.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStage.Serialization.cs index 0469cecf17356..90838647c34c7 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStage.Serialization.cs @@ -9,7 +9,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class UpdateStage : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStage.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStage.cs index 51a73f1453fa7..8debff210cbf4 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStage.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStage.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// /// Contains the groups to be updated by an UpdateRun. diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStageStatus.Serialization.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStageStatus.Serialization.cs index 6b27eea6ecce9..6dba10b436b20 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStageStatus.Serialization.cs @@ -9,7 +9,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class UpdateStageStatus { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStageStatus.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStageStatus.cs index e5d5af1cc55d6..c74cfdf2ef861 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStageStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStageStatus.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The status of a UpdateStage. public partial class UpdateStageStatus diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateState.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateState.cs similarity index 98% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateState.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateState.cs index 738825d80667a..bd79a0e96087d 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateState.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateState.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The state of the UpdateRun, UpdateStage, UpdateGroup, or MemberUpdate. public readonly partial struct UpdateState : IEquatable diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStatus.Serialization.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStatus.Serialization.cs index adc98db6e93d2..620c89a142ca9 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStatus.Serialization.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class UpdateStatus { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStatus.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStatus.cs index df30bccfe05d9..3bd8008739e06 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/UpdateStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStatus.cs @@ -8,7 +8,7 @@ using System; using Azure; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The status for an operation or group of operations. public partial class UpdateStatus diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/WaitStatus.Serialization.cs similarity index 96% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/WaitStatus.Serialization.cs index bd21c42b31c18..d0d678a4a7ff2 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/WaitStatus.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { public partial class WaitStatus { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/WaitStatus.cs similarity index 94% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/WaitStatus.cs index e7b5c9d0eb81f..08d6056fe6fd7 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/Models/WaitStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/WaitStatus.cs @@ -5,7 +5,7 @@ #nullable disable -namespace Azure.ResourceManager.Fleet.Models +namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The status of the wait duration. public partial class WaitStatus diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/ProviderConstants.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ProviderConstants.cs similarity index 87% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/ProviderConstants.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ProviderConstants.cs index 9e32272d8198f..978185b579aa6 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/ProviderConstants.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ProviderConstants.cs @@ -7,7 +7,7 @@ using Azure.Core.Pipeline; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { internal static class ProviderConstants { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetMembersRestOperations.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetMembersRestOperations.cs similarity index 99% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetMembersRestOperations.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetMembersRestOperations.cs index e83c6fe2c4351..a8c87dff62af7 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetMembersRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetMembersRestOperations.cs @@ -12,9 +12,9 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager.Models; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { internal partial class FleetMembersRestOperations { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetsRestOperations.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetsRestOperations.cs similarity index 99% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetsRestOperations.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetsRestOperations.cs index a6d4b047693c6..fba06e4d09c67 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/FleetsRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetsRestOperations.cs @@ -12,9 +12,9 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager.Models; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { internal partial class FleetsRestOperations { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/UpdateRunsRestOperations.cs similarity index 99% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/UpdateRunsRestOperations.cs index f81206b26b917..6d9c0feb02eb4 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/UpdateRunsRestOperations.cs @@ -12,9 +12,9 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager.Models; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { internal partial class UpdateRunsRestOperations { diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunCollection.cs similarity index 79% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunCollection.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunCollection.cs index 2890f50953ba1..2fb984834df47 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunCollection.cs @@ -17,7 +17,7 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { /// /// A class representing a collection of and their operations. @@ -39,7 +39,7 @@ protected UpdateRunCollection() /// The identifier of the parent resource that is the target of operations. internal UpdateRunCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _updateRunClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Fleet", UpdateRunResource.ResourceType.Namespace, Diagnostics); + _updateRunClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", UpdateRunResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(UpdateRunResource.ResourceType, out string updateRunApiVersion); _updateRunRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, updateRunApiVersion); #if DEBUG @@ -84,7 +84,7 @@ public virtual async Task> CreateOrUpdateAsync(W try { var response = await _updateRunRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -127,7 +127,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti try { var response = _updateRunRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -327,6 +327,80 @@ public virtual Response Exists(string updateRunName, CancellationToken can } } + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_Get + /// + /// + /// + /// The name of the UpdateRun resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string updateRunName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _updateRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new UpdateRunResource(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.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName} + /// + /// + /// Operation Id + /// UpdateRuns_Get + /// + /// + /// + /// The name of the UpdateRun resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string updateRunName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + + using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.GetIfExists"); + scope.Start(); + try + { + var response = _updateRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new UpdateRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunData.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunData.cs similarity index 97% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunData.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunData.cs index 1d7368efde10e..40ff392462a59 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunData.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunData.cs @@ -8,10 +8,10 @@ using System.Collections.Generic; using Azure; using Azure.Core; -using Azure.ResourceManager.Fleet.Models; +using Azure.ResourceManager.DatabaseFleetManager.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { /// /// A class representing the UpdateRun data model. diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunResource.cs similarity index 89% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunResource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunResource.cs index 3f512864fe9a9..10037060ad419 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Generated/UpdateRunResource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunResource.cs @@ -14,7 +14,7 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; -namespace Azure.ResourceManager.Fleet +namespace Azure.ResourceManager.DatabaseFleetManager { /// /// A Class representing an UpdateRun along with the instance operations that can be performed on it. @@ -54,7 +54,7 @@ internal UpdateRunResource(ArmClient client, UpdateRunData data) : this(client, /// The identifier of the resource that is the target of operations. internal UpdateRunResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _updateRunClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Fleet", ResourceType.Namespace, Diagnostics); + _updateRunClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string updateRunApiVersion); _updateRunRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, updateRunApiVersion); #if DEBUG @@ -173,7 +173,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string try { var response = await _updateRunRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new FleetArmOperation(_updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(_updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -208,7 +208,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C try { var response = _updateRunRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new FleetArmOperation(_updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(_updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -248,7 +248,7 @@ public virtual async Task> UpdateAsync(WaitUntil try { var response = await _updateRunRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -288,7 +288,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Updat try { var response = _updateRunRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -323,7 +323,7 @@ public virtual async Task> StartAsync(WaitUntil try { var response = await _updateRunRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -358,7 +358,7 @@ public virtual ArmOperation Start(WaitUntil waitUntil, string try { var response = _updateRunRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -393,7 +393,7 @@ public virtual async Task> StopAsync(WaitUntil w try { var response = await _updateRunRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -428,7 +428,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, string try { var response = _updateRunRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new FleetArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/Properties/AssemblyInfo.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Properties/AssemblyInfo.cs similarity index 51% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/Properties/AssemblyInfo.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Properties/AssemblyInfo.cs index 540b4d0179441..e3c63ee56c9e8 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/Properties/AssemblyInfo.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Properties/AssemblyInfo.cs @@ -3,7 +3,7 @@ using System.Runtime.CompilerServices; -[assembly: Azure.Core.AzureResourceProviderNamespace("Fleet")] +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.ContainerService/fleet")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] -[assembly: InternalsVisibleTo("Azure.ResourceManager.Fleet.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] +[assembly: InternalsVisibleTo("Azure.ResourceManager.DatabaseFleetManager.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/src/autorest.md b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/autorest.md similarity index 91% rename from sdk/fleet/Azure.ResourceManager.Fleet/src/autorest.md rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/autorest.md index cab0296bced1e..90b80c5f1b795 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/src/autorest.md +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/autorest.md @@ -5,8 +5,8 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true csharp: true -library-name: Fleet -namespace: Azure.ResourceManager.Fleet +library-name: DatabaseFleetManager +namespace: Azure.ResourceManager.DatabaseFleetManager require: https://github.com/Azure/azure-rest-api-specs/blob/de06c42bd985fb66b6a49c907aaf5baee693bc7b/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/Azure.ResourceManager.DatabaseFleetManager.Tests.csproj b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/Azure.ResourceManager.DatabaseFleetManager.Tests.csproj new file mode 100644 index 0000000000000..800cc7d815724 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/Azure.ResourceManager.DatabaseFleetManager.Tests.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestBase.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestBase.cs similarity index 77% rename from sdk/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestBase.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestBase.cs index fd3d31965559d..b47a42a862e84 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestBase.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestBase.cs @@ -8,19 +8,19 @@ using NUnit.Framework; using System.Threading.Tasks; -namespace Azure.ResourceManager.Fleet.Tests +namespace Azure.ResourceManager.DatabaseFleetManager.Tests { - public class FleetManagementTestBase : ManagementRecordedTestBase + public class DatabaseFleetManagerManagementTestBase : ManagementRecordedTestBase { protected ArmClient Client { get; private set; } protected SubscriptionResource DefaultSubscription { get; private set; } - protected FleetManagementTestBase(bool isAsync, RecordedTestMode mode) + protected DatabaseFleetManagerManagementTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync, mode) { } - protected FleetManagementTestBase(bool isAsync) + protected DatabaseFleetManagerManagementTestBase(bool isAsync) : base(isAsync) { } diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestEnvironment.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestEnvironment.cs similarity index 50% rename from sdk/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestEnvironment.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestEnvironment.cs index 5a50263d54883..aa2ce828b954a 100644 --- a/sdk/fleet/Azure.ResourceManager.Fleet/tests/FleetManagementTestEnvironment.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestEnvironment.cs @@ -3,9 +3,9 @@ using Azure.Core.TestFramework; -namespace Azure.ResourceManager.Fleet.Tests +namespace Azure.ResourceManager.DatabaseFleetManager.Tests { - public class FleetManagementTestEnvironment : TestEnvironment + public class DatabaseFleetManagerManagementTestEnvironment : TestEnvironment { } } \ No newline at end of file diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/api/Azure.ResourceManager.Fleet.netstandard2.0.cs b/sdk/fleet/Azure.ResourceManager.Fleet/api/Azure.ResourceManager.Fleet.netstandard2.0.cs deleted file mode 100644 index a4d05b2cdbd95..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.Fleet/api/Azure.ResourceManager.Fleet.netstandard2.0.cs +++ /dev/null @@ -1,397 +0,0 @@ -namespace Azure.ResourceManager.Fleet -{ - public partial class FleetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected FleetCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.Fleet.FleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.Fleet.FleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string fleetName, 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 fleetName, 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 FleetData : Azure.ResourceManager.Models.TrackedResourceData - { - public FleetData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ETag? ETag { get { throw null; } } - public Azure.ResourceManager.Fleet.Models.FleetHubProfile HubProfile { get { throw null; } set { } } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.Fleet.Models.FleetProvisioningState? ProvisioningState { get { throw null; } } - } - public static partial class FleetExtensions - { - public static Azure.Response GetFleet(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetFleetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.Fleet.FleetMemberResource GetFleetMemberResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.Fleet.FleetResource GetFleetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.Fleet.FleetCollection GetFleets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetFleets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetFleetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.Fleet.UpdateRunResource GetUpdateRunResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - } - public partial class FleetMemberCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected FleetMemberCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.Fleet.FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.Fleet.FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string fleetMemberName, 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 fleetMemberName, 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 FleetMemberData : Azure.ResourceManager.Models.ResourceData - { - public FleetMemberData() { } - public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } set { } } - public Azure.ETag? ETag { get { throw null; } } - public string Group { get { throw null; } set { } } - public Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState? ProvisioningState { get { throw null; } } - } - public partial class FleetMemberResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected FleetMemberResource() { } - public virtual Azure.ResourceManager.Fleet.FleetMemberData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Fleet.Models.FleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Fleet.Models.FleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class FleetResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected FleetResource() { } - public virtual Azure.ResourceManager.Fleet.FleetData 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 fleetName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, 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 GetCredentials(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetCredentialsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetFleetMember(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetFleetMemberAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.Fleet.FleetMemberCollection GetFleetMembers() { throw null; } - public virtual Azure.Response GetUpdateRun(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetUpdateRunAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.Fleet.UpdateRunCollection GetUpdateRuns() { 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; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Fleet.Models.FleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Fleet.Models.FleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class UpdateRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected UpdateRunCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.Fleet.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.Fleet.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string updateRunName, 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 updateRunName, 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 UpdateRunData : Azure.ResourceManager.Models.ResourceData - { - public UpdateRunData() { } - public Azure.ETag? ETag { get { throw null; } } - public Azure.ResourceManager.Fleet.Models.ManagedClusterUpdate ManagedClusterUpdate { get { throw null; } set { } } - public Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.Fleet.Models.UpdateRunStatus Status { get { throw null; } } - public System.Collections.Generic.IList StrategyStages { get { throw null; } set { } } - } - public partial class UpdateRunResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected UpdateRunResource() { } - public virtual Azure.ResourceManager.Fleet.UpdateRunData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> StopAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Fleet.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Fleet.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } -} -namespace Azure.ResourceManager.Fleet.Models -{ - public partial class APIServerAccessProfile - { - public APIServerAccessProfile() { } - public bool? EnablePrivateCluster { get { throw null; } set { } } - public bool? EnableVnetIntegration { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } - } - public static partial class ArmFleetModelFactory - { - public static Azure.ResourceManager.Fleet.Models.FleetCredentialResult FleetCredentialResult(string name = null, byte[] value = null) { throw null; } - public static Azure.ResourceManager.Fleet.Models.FleetCredentialResults FleetCredentialResults(System.Collections.Generic.IEnumerable kubeconfigs = null) { throw null; } - public static Azure.ResourceManager.Fleet.FleetData FleetData(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.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Fleet.Models.FleetProvisioningState? provisioningState = default(Azure.ResourceManager.Fleet.Models.FleetProvisioningState?), Azure.ResourceManager.Fleet.Models.FleetHubProfile hubProfile = null) { throw null; } - public static Azure.ResourceManager.Fleet.Models.FleetHubProfile FleetHubProfile(string dnsPrefix = null, Azure.ResourceManager.Fleet.Models.APIServerAccessProfile apiServerAccessProfile = null, Azure.Core.ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null) { throw null; } - public static Azure.ResourceManager.Fleet.FleetMemberData FleetMemberData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.Core.ResourceIdentifier clusterResourceId = null, string group = null, Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState? provisioningState = default(Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState?)) { throw null; } - public static Azure.ResourceManager.Fleet.Models.MemberUpdateStatus MemberUpdateStatus(Azure.ResourceManager.Fleet.Models.UpdateStatus status = null, string name = null, string clusterResourceId = null, string operationId = null, string message = null) { throw null; } - public static Azure.ResourceManager.Fleet.Models.NodeImageVersion NodeImageVersion(string version = null) { throw null; } - public static Azure.ResourceManager.Fleet.Models.UpdateGroupStatus UpdateGroupStatus(Azure.ResourceManager.Fleet.Models.UpdateStatus status = null, string name = null, System.Collections.Generic.IEnumerable members = null) { throw null; } - public static Azure.ResourceManager.Fleet.UpdateRunData UpdateRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState? provisioningState = default(Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState?), System.Collections.Generic.IEnumerable strategyStages = null, Azure.ResourceManager.Fleet.Models.ManagedClusterUpdate managedClusterUpdate = null, Azure.ResourceManager.Fleet.Models.UpdateRunStatus status = null) { throw null; } - public static Azure.ResourceManager.Fleet.Models.UpdateRunStatus UpdateRunStatus(Azure.ResourceManager.Fleet.Models.UpdateStatus status = null, System.Collections.Generic.IEnumerable stages = null, System.Collections.Generic.IEnumerable selectedNodeImageVersions = null) { throw null; } - public static Azure.ResourceManager.Fleet.Models.UpdateStageStatus UpdateStageStatus(Azure.ResourceManager.Fleet.Models.UpdateStatus status = null, string name = null, System.Collections.Generic.IEnumerable groups = null, Azure.ResourceManager.Fleet.Models.WaitStatus afterStageWaitStatus = null) { throw null; } - public static Azure.ResourceManager.Fleet.Models.UpdateStatus UpdateStatus(System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Fleet.Models.UpdateState? state = default(Azure.ResourceManager.Fleet.Models.UpdateState?), Azure.ResponseError error = null) { throw null; } - public static Azure.ResourceManager.Fleet.Models.WaitStatus WaitStatus(Azure.ResourceManager.Fleet.Models.UpdateStatus status = null, int? waitDurationInSeconds = default(int?)) { throw null; } - } - public partial class FleetCredentialResult - { - internal FleetCredentialResult() { } - public string Name { get { throw null; } } - public byte[] Value { get { throw null; } } - } - public partial class FleetCredentialResults - { - internal FleetCredentialResults() { } - public System.Collections.Generic.IReadOnlyList Kubeconfigs { get { throw null; } } - } - public partial class FleetHubProfile - { - public FleetHubProfile() { } - public Azure.Core.ResourceIdentifier AgentSubnetId { get { throw null; } set { } } - public Azure.ResourceManager.Fleet.Models.APIServerAccessProfile ApiServerAccessProfile { get { throw null; } set { } } - public string DnsPrefix { get { throw null; } set { } } - public string Fqdn { get { throw null; } } - public string KubernetesVersion { get { throw null; } } - } - public partial class FleetMemberPatch - { - public FleetMemberPatch() { } - public string Group { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct FleetMemberProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public FleetMemberProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState Joining { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState Leaving { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState 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.Fleet.Models.FleetMemberProvisioningState left, Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState left, Azure.ResourceManager.Fleet.Models.FleetMemberProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - public partial class FleetPatch - { - public FleetPatch() { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct FleetProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public FleetProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.Fleet.Models.FleetProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.FleetProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.FleetProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.FleetProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.FleetProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.FleetProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.Fleet.Models.FleetProvisioningState 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.Fleet.Models.FleetProvisioningState left, Azure.ResourceManager.Fleet.Models.FleetProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.Fleet.Models.FleetProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Fleet.Models.FleetProvisioningState left, Azure.ResourceManager.Fleet.Models.FleetProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - public partial class ManagedClusterUpdate - { - public ManagedClusterUpdate(Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeSpec upgrade) { } - public Azure.ResourceManager.Fleet.Models.NodeImageSelectionType? SelectionType { get { throw null; } set { } } - public Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeSpec Upgrade { get { throw null; } set { } } - } - public partial class ManagedClusterUpgradeSpec - { - public ManagedClusterUpgradeSpec(Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType upgradeType) { } - public string KubernetesVersion { get { throw null; } set { } } - public Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType UpgradeType { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ManagedClusterUpgradeType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ManagedClusterUpgradeType(string value) { throw null; } - public static Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType Full { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType NodeImageOnly { get { throw null; } } - public bool Equals(Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType 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.Fleet.Models.ManagedClusterUpgradeType left, Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType right) { throw null; } - public static implicit operator Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType left, Azure.ResourceManager.Fleet.Models.ManagedClusterUpgradeType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class MemberUpdateStatus - { - internal MemberUpdateStatus() { } - public string ClusterResourceId { get { throw null; } } - public string Message { get { throw null; } } - public string Name { get { throw null; } } - public string OperationId { get { throw null; } } - public Azure.ResourceManager.Fleet.Models.UpdateStatus Status { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NodeImageSelectionType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public NodeImageSelectionType(string value) { throw null; } - public static Azure.ResourceManager.Fleet.Models.NodeImageSelectionType Consistent { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.NodeImageSelectionType Latest { get { throw null; } } - public bool Equals(Azure.ResourceManager.Fleet.Models.NodeImageSelectionType 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.Fleet.Models.NodeImageSelectionType left, Azure.ResourceManager.Fleet.Models.NodeImageSelectionType right) { throw null; } - public static implicit operator Azure.ResourceManager.Fleet.Models.NodeImageSelectionType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Fleet.Models.NodeImageSelectionType left, Azure.ResourceManager.Fleet.Models.NodeImageSelectionType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class NodeImageVersion - { - internal NodeImageVersion() { } - public string Version { get { throw null; } } - } - public partial class UpdateGroup - { - public UpdateGroup(string name) { } - public string Name { get { throw null; } set { } } - } - public partial class UpdateGroupStatus - { - internal UpdateGroupStatus() { } - public System.Collections.Generic.IReadOnlyList Members { get { throw null; } } - public string Name { get { throw null; } } - public Azure.ResourceManager.Fleet.Models.UpdateStatus Status { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct UpdateRunProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public UpdateRunProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState 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.Fleet.Models.UpdateRunProvisioningState left, Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState left, Azure.ResourceManager.Fleet.Models.UpdateRunProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - public partial class UpdateRunStatus - { - internal UpdateRunStatus() { } - public System.Collections.Generic.IReadOnlyList SelectedNodeImageVersions { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Stages { get { throw null; } } - public Azure.ResourceManager.Fleet.Models.UpdateStatus Status { get { throw null; } } - } - public partial class UpdateStage - { - public UpdateStage(string name) { } - public int? AfterStageWaitInSeconds { get { throw null; } set { } } - public System.Collections.Generic.IList Groups { get { throw null; } } - public string Name { get { throw null; } set { } } - } - public partial class UpdateStageStatus - { - internal UpdateStageStatus() { } - public Azure.ResourceManager.Fleet.Models.WaitStatus AfterStageWaitStatus { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Groups { get { throw null; } } - public string Name { get { throw null; } } - public Azure.ResourceManager.Fleet.Models.UpdateStatus Status { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct UpdateState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public UpdateState(string value) { throw null; } - public static Azure.ResourceManager.Fleet.Models.UpdateState Completed { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.UpdateState Failed { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.UpdateState NotStarted { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.UpdateState Running { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.UpdateState Skipped { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.UpdateState Stopped { get { throw null; } } - public static Azure.ResourceManager.Fleet.Models.UpdateState Stopping { get { throw null; } } - public bool Equals(Azure.ResourceManager.Fleet.Models.UpdateState 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.Fleet.Models.UpdateState left, Azure.ResourceManager.Fleet.Models.UpdateState right) { throw null; } - public static implicit operator Azure.ResourceManager.Fleet.Models.UpdateState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Fleet.Models.UpdateState left, Azure.ResourceManager.Fleet.Models.UpdateState right) { throw null; } - public override string ToString() { throw null; } - } - public partial class UpdateStatus - { - internal UpdateStatus() { } - public System.DateTimeOffset? CompletedOn { get { throw null; } } - public Azure.ResponseError Error { get { throw null; } } - public System.DateTimeOffset? StartOn { get { throw null; } } - public Azure.ResourceManager.Fleet.Models.UpdateState? State { get { throw null; } } - } - public partial class WaitStatus - { - internal WaitStatus() { } - public Azure.ResourceManager.Fleet.Models.UpdateStatus Status { get { throw null; } } - public int? WaitDurationInSeconds { get { throw null; } } - } -} diff --git a/sdk/fleet/Azure.ResourceManager.Fleet/tests/Azure.ResourceManager.Fleet.Tests.csproj b/sdk/fleet/Azure.ResourceManager.Fleet/tests/Azure.ResourceManager.Fleet.Tests.csproj deleted file mode 100644 index 42651d75795bc..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.Fleet/tests/Azure.ResourceManager.Fleet.Tests.csproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/sdk/fleet/ci.mgmt.yml b/sdk/fleet/ci.mgmt.yml index 003ec43421b18..08c7f125cee1e 100644 --- a/sdk/fleet/ci.mgmt.yml +++ b/sdk/fleet/ci.mgmt.yml @@ -1,8 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none - - pr: branches: include: @@ -13,31 +11,7 @@ pr: paths: include: - sdk/fleet/ci.mgmt.yml - - sdk/fleet/Azure.ResourceManager.Fleet/ - - - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/fleet/ci.mgmt.yml - - sdk/fleet/Azure.ResourceManager.Fleet/ - - - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/fleet/ci.mgmt.yml - - sdk/fleet/Azure.ResourceManager.Fleet/ + - sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -45,5 +19,5 @@ extends: ServiceDirectory: fleet LimitForPullRequest: true Artifacts: - - name: Azure.ResourceManager.Fleet - safeName: AzureResourceManagerFleet + - name: Azure.ResourceManager.DatabaseFleetManager + safeName: AzureResourceManagerDatabaseFleetManager diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 4b564cbdf13bc..1e9862e171e39 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -11,176 +11,176 @@ trigger: - sdk/resourcemanager - common/ManagementTestShared - common/ManagementCoreShared - - sdk/maps/Azure.ResourceManager.Maps - - sdk/kusto/Azure.ResourceManager.Kusto - - sdk/storagemover/Azure.ResourceManager.StorageMover - - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw - - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking - - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph - - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise - - sdk/postgresql/Azure.ResourceManager.PostgreSql - - sdk/dynatrace/Azure.ResourceManager.Dynatrace - - sdk/storagepool/Azure.ResourceManager.StoragePool - - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices - - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric - - sdk/servicebus/Azure.ResourceManager.ServiceBus - sdk/advisor/Azure.ResourceManager.Advisor - - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector - - sdk/apimanagement/Azure.ResourceManager.ApiManagement - - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs - - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere - - sdk/netapp/Azure.ResourceManager.NetApp - sdk/agrifood/Azure.ResourceManager.AgFoodPlatform - - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs - - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability - - sdk/confluent/Azure.ResourceManager.Confluent - - sdk/monitor/Azure.ResourceManager.Monitor - - sdk/labservices/Azure.ResourceManager.LabServices - - sdk/managedservices/Azure.ResourceManager.ManagedServices - - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis - - sdk/storagesync/Azure.ResourceManager.StorageSync - - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork - - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry - - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins - - sdk/containerinstance/Azure.ResourceManager.ContainerInstance - - sdk/loadtestservice/Azure.ResourceManager.LoadTesting - - sdk/securitycenter/Azure.ResourceManager.SecurityCenter - - sdk/avs/Azure.ResourceManager.Avs - - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities - - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor - - sdk/storagecache/Azure.ResourceManager.StorageCache - - sdk/qumulo/Azure.ResourceManager.Qumulo - - sdk/elastic/Azure.ResourceManager.Elastic + - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement - sdk/analysisservices/Azure.ResourceManager.Analysis - - sdk/keyvault/Azure.ResourceManager.KeyVault - - sdk/redis/Azure.ResourceManager.Redis - - sdk/signalr/Azure.ResourceManager.SignalR - - sdk/reservations/Azure.ResourceManager.Reservations - - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth + - sdk/apicenter/Azure.ResourceManager.ApiCenter + - sdk/apimanagement/Azure.ResourceManager.ApiManagement + - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation + - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration + - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights + - sdk/appplatform/Azure.ResourceManager.AppPlatform - sdk/arc-scvmm/Azure.ResourceManager.ArcScVmm - - sdk/resourcemover/Azure.ResourceManager.ResourceMover - - sdk/consumption/Azure.ResourceManager.Consumption - - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger - - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement - - sdk/frontdoor/Azure.ResourceManager.FrontDoor - - sdk/resources/Azure.ResourceManager.Resources - - sdk/datafactory/Azure.ResourceManager.DataFactory - - sdk/managementpartner/Azure.ResourceManager.ManagementPartner - - sdk/marketplace/Azure.ResourceManager.Marketplace - - sdk/privatedns/Azure.ResourceManager.PrivateDns - - sdk/network/Azure.ResourceManager.Network - - sdk/webpubsub/Azure.ResourceManager.WebPubSub - - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity - - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices - - sdk/trafficmanager/Azure.ResourceManager.TrafficManager - - sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager + - sdk/attestation/Azure.ResourceManager.Attestation + - sdk/authorization/Azure.ResourceManager.Authorization + - sdk/automanage/Azure.ResourceManager.Automanage + - sdk/automation/Azure.ResourceManager.Automation + - sdk/avs/Azure.ResourceManager.Avs + - sdk/azurestackhci/Azure.ResourceManager.Hci + - sdk/batch/Azure.ResourceManager.Batch + - sdk/billing/Azure.ResourceManager.Billing - sdk/billingbenefits/Azure.ResourceManager.BillingBenefits - - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration - - sdk/logic/Azure.ResourceManager.Logic - - sdk/servicelinker/Azure.ResourceManager.ServiceLinker - - sdk/iothub/Azure.ResourceManager.IotHub - - sdk/grafana/Azure.ResourceManager.Grafana + - sdk/blueprint/Azure.ResourceManager.Blueprint + - sdk/botservice/Azure.ResourceManager.BotService + - sdk/cdn/Azure.ResourceManager.Cdn + - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis + - sdk/chaos/Azure.ResourceManager.Chaos + - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices + - sdk/communication/Azure.ResourceManager.Communication + - sdk/compute/Azure.ResourceManager.Compute + - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger + - sdk/confluent/Azure.ResourceManager.Confluent + - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere + - sdk/consumption/Azure.ResourceManager.Consumption + - sdk/containerapps/Azure.ResourceManager.AppContainers + - sdk/containerinstance/Azure.ResourceManager.ContainerInstance + - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry + - sdk/containerservice/Azure.ResourceManager.ContainerService + - sdk/cosmosdb/Azure.ResourceManager.CosmosDB - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql - - sdk/sphere/Azure.ResourceManager.Sphere - - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine - - sdk/elasticsan/Azure.ResourceManager.ElasticSan - - sdk/hybridcompute/Azure.ResourceManager.HybridCompute - - sdk/peering/Azure.ResourceManager.Peering + - sdk/costmanagement/Azure.ResourceManager.CostManagement + - sdk/customer-insights/Azure.ResourceManager.CustomerInsights + - sdk/databox/Azure.ResourceManager.DataBox - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge - - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps - - sdk/storage/Azure.ResourceManager.Storage - - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork - - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation - - sdk/subscription/Azure.ResourceManager.Subscription - - sdk/search/Azure.ResourceManager.Search - - sdk/policyinsights/Azure.ResourceManager.PolicyInsights - - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering + - sdk/datadog/Azure.ResourceManager.Datadog + - sdk/datafactory/Azure.ResourceManager.DataFactory + - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics + - sdk/datalake-store/Azure.ResourceManager.DataLakeStore - sdk/datamigration/Azure.ResourceManager.DataMigration - - sdk/workloads/Azure.ResourceManager.Workloads - - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning - - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights + - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup - sdk/datashare/Azure.ResourceManager.DataShare - - sdk/healthbot/Azure.ResourceManager.HealthBot - - sdk/cosmosdb/Azure.ResourceManager.CosmosDB - - sdk/containerservice/Azure.ResourceManager.ContainerService - - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration - - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations - - sdk/selfhelp/Azure.ResourceManager.SelfHelp + - sdk/defendereasm/Azure.ResourceManager.DefenderEasm + - sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager + - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization + - sdk/devcenter/Azure.ResourceManager.DevCenter + - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices - sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate - - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup - - sdk/eventhub/Azure.ResourceManager.EventHubs - - sdk/cdn/Azure.ResourceManager.Cdn - - sdk/compute/Azure.ResourceManager.Compute - - sdk/support/Azure.ResourceManager.Support - - sdk/servicefabric/Azure.ResourceManager.ServiceFabric - - sdk/nginx/Azure.ResourceManager.Nginx - sdk/devspaces/Azure.ResourceManager.DevSpaces - - sdk/customer-insights/Azure.ResourceManager.CustomerInsights - - sdk/networkfunction/Azure.ResourceManager.NetworkFunction - - sdk/voiceservices/Azure.ResourceManager.VoiceServices - - sdk/orbital/Azure.ResourceManager.Orbital - - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated + - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs + - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins + - sdk/dns/Azure.ResourceManager.Dns + - sdk/dnsresolver/Azure.ResourceManager.DnsResolver + - sdk/dynatrace/Azure.ResourceManager.Dynatrace + - sdk/edgeorder/Azure.ResourceManager.EdgeOrder + - sdk/elastic/Azure.ResourceManager.Elastic + - sdk/elasticsan/Azure.ResourceManager.ElasticSan + - sdk/eventgrid/Azure.ResourceManager.EventGrid + - sdk/eventhub/Azure.ResourceManager.EventHubs + - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations + - sdk/fleet/Azure.ResourceManager.DatabaseFleetManager + - sdk/fluidrelay/Azure.ResourceManager.FluidRelay + - sdk/frontdoor/Azure.ResourceManager.FrontDoor + - sdk/grafana/Azure.ResourceManager.Grafana + - sdk/graphservices/Azure.ResourceManager.GraphServices + - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration + - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules - sdk/hdinsight/Azure.ResourceManager.HDInsight - sdk/hdinsight/Azure.ResourceManager.HDInsight.Containers - - sdk/batch/Azure.ResourceManager.Batch + - sdk/healthbot/Azure.ResourceManager.HealthBot + - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis - sdk/hybridaks/Azure.ResourceManager.HybridContainerService - - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters - - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics - - sdk/mysql/Azure.ResourceManager.MySql - - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis - - sdk/containerapps/Azure.ResourceManager.AppContainers - - sdk/devcenter/Azure.ResourceManager.DevCenter - - sdk/purview/Azure.ResourceManager.Purview - - sdk/datadog/Azure.ResourceManager.Datadog + - sdk/hybridcompute/Azure.ResourceManager.HybridCompute + - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes - - sdk/providerhub/Azure.ResourceManager.ProviderHub - - sdk/attestation/Azure.ResourceManager.Attestation - - sdk/defendereasm/Azure.ResourceManager.DefenderEasm + - sdk/iot/Azure.ResourceManager.IotFirmwareDefense + - sdk/iotcentral/Azure.ResourceManager.IotCentral + - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/keyvault/Azure.ResourceManager.KeyVault - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - - sdk/eventgrid/Azure.ResourceManager.EventGrid - - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules - - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics - - sdk/securityinsights/Azure.ResourceManager.SecurityInsights - - sdk/azurestackhci/Azure.ResourceManager.Hci - - sdk/mediaservices/Azure.ResourceManager.Media - - sdk/databox/Azure.ResourceManager.DataBox + - sdk/kusto/Azure.ResourceManager.Kusto + - sdk/labservices/Azure.ResourceManager.LabServices + - sdk/loadtestservice/Azure.ResourceManager.LoadTesting + - sdk/logic/Azure.ResourceManager.Logic + - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute + - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning - sdk/maintenance/Azure.ResourceManager.Maintenance - - sdk/sqlmanagement/Azure.ResourceManager.Sql + - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork + - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric + - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities + - sdk/managedservices/Azure.ResourceManager.ManagedServices + - sdk/managementpartner/Azure.ResourceManager.ManagementPartner + - sdk/maps/Azure.ResourceManager.Maps + - sdk/marketplace/Azure.ResourceManager.Marketplace + - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering + - sdk/mediaservices/Azure.ResourceManager.Media - sdk/mixedreality/Azure.ResourceManager.MixedReality - - sdk/automation/Azure.ResourceManager.Automation - - sdk/datalake-store/Azure.ResourceManager.DataLakeStore - - sdk/quota/Azure.ResourceManager.Quota - - sdk/iotcentral/Azure.ResourceManager.IotCentral - - sdk/communication/Azure.ResourceManager.Communication - - sdk/fleet/Azure.ResourceManager.Fleet - - sdk/relay/Azure.ResourceManager.Relay + - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork + - sdk/monitor/Azure.ResourceManager.Monitor + - sdk/mysql/Azure.ResourceManager.MySql + - sdk/netapp/Azure.ResourceManager.NetApp + - sdk/network/Azure.ResourceManager.Network + - sdk/networkcloud/Azure.ResourceManager.NetworkCloud + - sdk/networkfunction/Azure.ResourceManager.NetworkFunction + - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability + - sdk/nginx/Azure.ResourceManager.Nginx + - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs + - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights - - sdk/botservice/Azure.ResourceManager.BotService - - sdk/authorization/Azure.ResourceManager.Authorization - - sdk/dns/Azure.ResourceManager.Dns - - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices + - sdk/orbital/Azure.ResourceManager.Orbital + - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw + - sdk/peering/Azure.ResourceManager.Peering + - sdk/policyinsights/Azure.ResourceManager.PolicyInsights + - sdk/postgresql/Azure.ResourceManager.PostgreSql + - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated + - sdk/privatedns/Azure.ResourceManager.PrivateDns + - sdk/providerhub/Azure.ResourceManager.ProviderHub + - sdk/purview/Azure.ResourceManager.Purview + - sdk/quantum/Azure.ResourceManager.Quantum + - sdk/qumulo/Azure.ResourceManager.Qumulo + - sdk/quota/Azure.ResourceManager.Quota - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices - - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication - - sdk/fluidrelay/Azure.ResourceManager.FluidRelay - - sdk/chaos/Azure.ResourceManager.Chaos - - sdk/automanage/Azure.ResourceManager.Automanage - - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/networkcloud/Azure.ResourceManager.NetworkCloud - - sdk/synapse/Azure.ResourceManager.Synapse - - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization - - sdk/billing/Azure.ResourceManager.Billing - - sdk/graphservices/Azure.ResourceManager.GraphServices - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup + - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery - - sdk/appplatform/Azure.ResourceManager.AppPlatform - - sdk/websites/Azure.ResourceManager.AppService - - sdk/blueprint/Azure.ResourceManager.Blueprint - - sdk/quantum/Azure.ResourceManager.Quantum - - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute - - sdk/costmanagement/Azure.ResourceManager.CostManagement - - sdk/apicenter/Azure.ResourceManager.ApiCenter + - sdk/redis/Azure.ResourceManager.Redis + - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise + - sdk/relay/Azure.ResourceManager.Relay + - sdk/reservations/Azure.ResourceManager.Reservations + - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector + - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph + - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth + - sdk/resourcemover/Azure.ResourceManager.ResourceMover + - sdk/resources/Azure.ResourceManager.Resources + - sdk/search/Azure.ResourceManager.Search + - sdk/securitycenter/Azure.ResourceManager.SecurityCenter + - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps + - sdk/securityinsights/Azure.ResourceManager.SecurityInsights + - sdk/selfhelp/Azure.ResourceManager.SelfHelp + - sdk/servicebus/Azure.ResourceManager.ServiceBus + - sdk/servicefabric/Azure.ResourceManager.ServiceFabric + - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters + - sdk/servicelinker/Azure.ResourceManager.ServiceLinker + - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking + - sdk/signalr/Azure.ResourceManager.SignalR + - sdk/sphere/Azure.ResourceManager.Sphere + - sdk/sqlmanagement/Azure.ResourceManager.Sql + - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine + - sdk/storage/Azure.ResourceManager.Storage + - sdk/storagecache/Azure.ResourceManager.StorageCache + - sdk/storagemover/Azure.ResourceManager.StorageMover + - sdk/storagepool/Azure.ResourceManager.StoragePool + - sdk/storagesync/Azure.ResourceManager.StorageSync + - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics + - sdk/subscription/Azure.ResourceManager.Subscription + - sdk/support/Azure.ResourceManager.Support + - sdk/synapse/Azure.ResourceManager.Synapse + - sdk/trafficmanager/Azure.ResourceManager.TrafficManager + - sdk/voiceservices/Azure.ResourceManager.VoiceServices + - sdk/webpubsub/Azure.ResourceManager.WebPubSub + - sdk/websites/Azure.ResourceManager.AppService + - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor + - sdk/workloads/Azure.ResourceManager.Workloads pr: branches: @@ -194,176 +194,176 @@ pr: - sdk/resourcemanager - common/ManagementTestShared - common/ManagementCoreShared - - sdk/maps/Azure.ResourceManager.Maps - - sdk/kusto/Azure.ResourceManager.Kusto - - sdk/storagemover/Azure.ResourceManager.StorageMover - - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw - - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking - - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph - - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise - - sdk/postgresql/Azure.ResourceManager.PostgreSql - - sdk/dynatrace/Azure.ResourceManager.Dynatrace - - sdk/storagepool/Azure.ResourceManager.StoragePool - - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices - - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric - - sdk/servicebus/Azure.ResourceManager.ServiceBus - sdk/advisor/Azure.ResourceManager.Advisor - - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector - - sdk/apimanagement/Azure.ResourceManager.ApiManagement - - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs - - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere - - sdk/netapp/Azure.ResourceManager.NetApp - sdk/agrifood/Azure.ResourceManager.AgFoodPlatform - - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs - - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability - - sdk/confluent/Azure.ResourceManager.Confluent - - sdk/monitor/Azure.ResourceManager.Monitor - - sdk/labservices/Azure.ResourceManager.LabServices - - sdk/managedservices/Azure.ResourceManager.ManagedServices - - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis - - sdk/storagesync/Azure.ResourceManager.StorageSync - - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork - - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry - - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins - - sdk/containerinstance/Azure.ResourceManager.ContainerInstance - - sdk/loadtestservice/Azure.ResourceManager.LoadTesting - - sdk/securitycenter/Azure.ResourceManager.SecurityCenter - - sdk/avs/Azure.ResourceManager.Avs - - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities - - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor - - sdk/storagecache/Azure.ResourceManager.StorageCache - - sdk/qumulo/Azure.ResourceManager.Qumulo - - sdk/elastic/Azure.ResourceManager.Elastic + - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement - sdk/analysisservices/Azure.ResourceManager.Analysis - - sdk/keyvault/Azure.ResourceManager.KeyVault - - sdk/redis/Azure.ResourceManager.Redis - - sdk/signalr/Azure.ResourceManager.SignalR - - sdk/reservations/Azure.ResourceManager.Reservations - - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth + - sdk/apicenter/Azure.ResourceManager.ApiCenter + - sdk/apimanagement/Azure.ResourceManager.ApiManagement + - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation + - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration + - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights + - sdk/appplatform/Azure.ResourceManager.AppPlatform - sdk/arc-scvmm/Azure.ResourceManager.ArcScVmm - - sdk/resourcemover/Azure.ResourceManager.ResourceMover - - sdk/consumption/Azure.ResourceManager.Consumption - - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger - - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement - - sdk/frontdoor/Azure.ResourceManager.FrontDoor - - sdk/resources/Azure.ResourceManager.Resources - - sdk/datafactory/Azure.ResourceManager.DataFactory - - sdk/managementpartner/Azure.ResourceManager.ManagementPartner - - sdk/marketplace/Azure.ResourceManager.Marketplace - - sdk/privatedns/Azure.ResourceManager.PrivateDns - - sdk/network/Azure.ResourceManager.Network - - sdk/webpubsub/Azure.ResourceManager.WebPubSub - - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity - - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices - - sdk/trafficmanager/Azure.ResourceManager.TrafficManager - - sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager + - sdk/attestation/Azure.ResourceManager.Attestation + - sdk/authorization/Azure.ResourceManager.Authorization + - sdk/automanage/Azure.ResourceManager.Automanage + - sdk/automation/Azure.ResourceManager.Automation + - sdk/avs/Azure.ResourceManager.Avs + - sdk/azurestackhci/Azure.ResourceManager.Hci + - sdk/batch/Azure.ResourceManager.Batch + - sdk/billing/Azure.ResourceManager.Billing - sdk/billingbenefits/Azure.ResourceManager.BillingBenefits - - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration - - sdk/logic/Azure.ResourceManager.Logic - - sdk/servicelinker/Azure.ResourceManager.ServiceLinker - - sdk/iothub/Azure.ResourceManager.IotHub - - sdk/grafana/Azure.ResourceManager.Grafana + - sdk/blueprint/Azure.ResourceManager.Blueprint + - sdk/botservice/Azure.ResourceManager.BotService + - sdk/cdn/Azure.ResourceManager.Cdn + - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis + - sdk/chaos/Azure.ResourceManager.Chaos + - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices + - sdk/communication/Azure.ResourceManager.Communication + - sdk/compute/Azure.ResourceManager.Compute + - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger + - sdk/confluent/Azure.ResourceManager.Confluent + - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere + - sdk/consumption/Azure.ResourceManager.Consumption + - sdk/containerapps/Azure.ResourceManager.AppContainers + - sdk/containerinstance/Azure.ResourceManager.ContainerInstance + - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry + - sdk/containerservice/Azure.ResourceManager.ContainerService + - sdk/cosmosdb/Azure.ResourceManager.CosmosDB - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql - - sdk/sphere/Azure.ResourceManager.Sphere - - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine - - sdk/elasticsan/Azure.ResourceManager.ElasticSan - - sdk/hybridcompute/Azure.ResourceManager.HybridCompute - - sdk/peering/Azure.ResourceManager.Peering + - sdk/costmanagement/Azure.ResourceManager.CostManagement + - sdk/customer-insights/Azure.ResourceManager.CustomerInsights + - sdk/databox/Azure.ResourceManager.DataBox - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge - - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps - - sdk/storage/Azure.ResourceManager.Storage - - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork - - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation - - sdk/subscription/Azure.ResourceManager.Subscription - - sdk/search/Azure.ResourceManager.Search - - sdk/policyinsights/Azure.ResourceManager.PolicyInsights - - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering + - sdk/datadog/Azure.ResourceManager.Datadog + - sdk/datafactory/Azure.ResourceManager.DataFactory + - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics + - sdk/datalake-store/Azure.ResourceManager.DataLakeStore - sdk/datamigration/Azure.ResourceManager.DataMigration - - sdk/workloads/Azure.ResourceManager.Workloads - - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning - - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights + - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup - sdk/datashare/Azure.ResourceManager.DataShare - - sdk/healthbot/Azure.ResourceManager.HealthBot - - sdk/cosmosdb/Azure.ResourceManager.CosmosDB - - sdk/containerservice/Azure.ResourceManager.ContainerService - - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration - - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations - - sdk/selfhelp/Azure.ResourceManager.SelfHelp + - sdk/defendereasm/Azure.ResourceManager.DefenderEasm + - sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager + - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization + - sdk/devcenter/Azure.ResourceManager.DevCenter + - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices - sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate - - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup - - sdk/eventhub/Azure.ResourceManager.EventHubs - - sdk/cdn/Azure.ResourceManager.Cdn - - sdk/compute/Azure.ResourceManager.Compute - - sdk/support/Azure.ResourceManager.Support - - sdk/servicefabric/Azure.ResourceManager.ServiceFabric - - sdk/nginx/Azure.ResourceManager.Nginx - sdk/devspaces/Azure.ResourceManager.DevSpaces - - sdk/customer-insights/Azure.ResourceManager.CustomerInsights - - sdk/networkfunction/Azure.ResourceManager.NetworkFunction - - sdk/voiceservices/Azure.ResourceManager.VoiceServices - - sdk/orbital/Azure.ResourceManager.Orbital - - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated + - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs + - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins + - sdk/dns/Azure.ResourceManager.Dns + - sdk/dnsresolver/Azure.ResourceManager.DnsResolver + - sdk/dynatrace/Azure.ResourceManager.Dynatrace + - sdk/edgeorder/Azure.ResourceManager.EdgeOrder + - sdk/elastic/Azure.ResourceManager.Elastic + - sdk/elasticsan/Azure.ResourceManager.ElasticSan + - sdk/eventgrid/Azure.ResourceManager.EventGrid + - sdk/eventhub/Azure.ResourceManager.EventHubs + - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations + - sdk/fleet/Azure.ResourceManager.DatabaseFleetManager + - sdk/fluidrelay/Azure.ResourceManager.FluidRelay + - sdk/frontdoor/Azure.ResourceManager.FrontDoor + - sdk/grafana/Azure.ResourceManager.Grafana + - sdk/graphservices/Azure.ResourceManager.GraphServices + - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration + - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules - sdk/hdinsight/Azure.ResourceManager.HDInsight - sdk/hdinsight/Azure.ResourceManager.HDInsight.Containers - - sdk/batch/Azure.ResourceManager.Batch + - sdk/healthbot/Azure.ResourceManager.HealthBot + - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis - sdk/hybridaks/Azure.ResourceManager.HybridContainerService - - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters - - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics - - sdk/mysql/Azure.ResourceManager.MySql - - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis - - sdk/containerapps/Azure.ResourceManager.AppContainers - - sdk/devcenter/Azure.ResourceManager.DevCenter - - sdk/purview/Azure.ResourceManager.Purview - - sdk/datadog/Azure.ResourceManager.Datadog + - sdk/hybridcompute/Azure.ResourceManager.HybridCompute + - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes - - sdk/providerhub/Azure.ResourceManager.ProviderHub - - sdk/attestation/Azure.ResourceManager.Attestation - - sdk/defendereasm/Azure.ResourceManager.DefenderEasm + - sdk/iot/Azure.ResourceManager.IotFirmwareDefense + - sdk/iotcentral/Azure.ResourceManager.IotCentral + - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/keyvault/Azure.ResourceManager.KeyVault - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - - sdk/eventgrid/Azure.ResourceManager.EventGrid - - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules - - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics - - sdk/securityinsights/Azure.ResourceManager.SecurityInsights - - sdk/azurestackhci/Azure.ResourceManager.Hci - - sdk/mediaservices/Azure.ResourceManager.Media - - sdk/databox/Azure.ResourceManager.DataBox + - sdk/kusto/Azure.ResourceManager.Kusto + - sdk/labservices/Azure.ResourceManager.LabServices + - sdk/loadtestservice/Azure.ResourceManager.LoadTesting + - sdk/logic/Azure.ResourceManager.Logic + - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute + - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning - sdk/maintenance/Azure.ResourceManager.Maintenance - - sdk/sqlmanagement/Azure.ResourceManager.Sql + - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork + - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric + - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities + - sdk/managedservices/Azure.ResourceManager.ManagedServices + - sdk/managementpartner/Azure.ResourceManager.ManagementPartner + - sdk/maps/Azure.ResourceManager.Maps + - sdk/marketplace/Azure.ResourceManager.Marketplace + - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering + - sdk/mediaservices/Azure.ResourceManager.Media - sdk/mixedreality/Azure.ResourceManager.MixedReality - - sdk/automation/Azure.ResourceManager.Automation - - sdk/datalake-store/Azure.ResourceManager.DataLakeStore - - sdk/quota/Azure.ResourceManager.Quota - - sdk/iotcentral/Azure.ResourceManager.IotCentral - - sdk/communication/Azure.ResourceManager.Communication - - sdk/fleet/Azure.ResourceManager.Fleet - - sdk/relay/Azure.ResourceManager.Relay + - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork + - sdk/monitor/Azure.ResourceManager.Monitor + - sdk/mysql/Azure.ResourceManager.MySql + - sdk/netapp/Azure.ResourceManager.NetApp + - sdk/network/Azure.ResourceManager.Network + - sdk/networkcloud/Azure.ResourceManager.NetworkCloud + - sdk/networkfunction/Azure.ResourceManager.NetworkFunction + - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability + - sdk/nginx/Azure.ResourceManager.Nginx + - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs + - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights - - sdk/botservice/Azure.ResourceManager.BotService - - sdk/authorization/Azure.ResourceManager.Authorization - - sdk/dns/Azure.ResourceManager.Dns - - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices + - sdk/orbital/Azure.ResourceManager.Orbital + - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw + - sdk/peering/Azure.ResourceManager.Peering + - sdk/policyinsights/Azure.ResourceManager.PolicyInsights + - sdk/postgresql/Azure.ResourceManager.PostgreSql + - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated + - sdk/privatedns/Azure.ResourceManager.PrivateDns + - sdk/providerhub/Azure.ResourceManager.ProviderHub + - sdk/purview/Azure.ResourceManager.Purview + - sdk/quantum/Azure.ResourceManager.Quantum + - sdk/qumulo/Azure.ResourceManager.Qumulo + - sdk/quota/Azure.ResourceManager.Quota - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices - - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication - - sdk/fluidrelay/Azure.ResourceManager.FluidRelay - - sdk/chaos/Azure.ResourceManager.Chaos - - sdk/automanage/Azure.ResourceManager.Automanage - - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/networkcloud/Azure.ResourceManager.NetworkCloud - - sdk/synapse/Azure.ResourceManager.Synapse - - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization - - sdk/billing/Azure.ResourceManager.Billing - - sdk/graphservices/Azure.ResourceManager.GraphServices - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup + - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery - - sdk/appplatform/Azure.ResourceManager.AppPlatform + - sdk/redis/Azure.ResourceManager.Redis + - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise + - sdk/relay/Azure.ResourceManager.Relay + - sdk/reservations/Azure.ResourceManager.Reservations + - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector + - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph + - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth + - sdk/resourcemover/Azure.ResourceManager.ResourceMover + - sdk/resources/Azure.ResourceManager.Resources + - sdk/search/Azure.ResourceManager.Search + - sdk/securitycenter/Azure.ResourceManager.SecurityCenter + - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps + - sdk/securityinsights/Azure.ResourceManager.SecurityInsights + - sdk/selfhelp/Azure.ResourceManager.SelfHelp + - sdk/servicebus/Azure.ResourceManager.ServiceBus + - sdk/servicefabric/Azure.ResourceManager.ServiceFabric + - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters + - sdk/servicelinker/Azure.ResourceManager.ServiceLinker + - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking + - sdk/signalr/Azure.ResourceManager.SignalR + - sdk/sphere/Azure.ResourceManager.Sphere + - sdk/sqlmanagement/Azure.ResourceManager.Sql + - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine + - sdk/storage/Azure.ResourceManager.Storage + - sdk/storagecache/Azure.ResourceManager.StorageCache + - sdk/storagemover/Azure.ResourceManager.StorageMover + - sdk/storagepool/Azure.ResourceManager.StoragePool + - sdk/storagesync/Azure.ResourceManager.StorageSync + - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics + - sdk/subscription/Azure.ResourceManager.Subscription + - sdk/support/Azure.ResourceManager.Support + - sdk/synapse/Azure.ResourceManager.Synapse + - sdk/trafficmanager/Azure.ResourceManager.TrafficManager + - sdk/voiceservices/Azure.ResourceManager.VoiceServices + - sdk/webpubsub/Azure.ResourceManager.WebPubSub - sdk/websites/Azure.ResourceManager.AppService - - sdk/blueprint/Azure.ResourceManager.Blueprint - - sdk/quantum/Azure.ResourceManager.Quantum - - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute - - sdk/costmanagement/Azure.ResourceManager.CostManagement - - sdk/apicenter/Azure.ResourceManager.ApiCenter + - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor + - sdk/workloads/Azure.ResourceManager.Workloads extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml From 6303c6a1135c1badc6442bf0ef2f8433b524237f Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Tue, 26 Sep 2023 16:43:42 +0800 Subject: [PATCH 3/3] update --- ...ger.DatabaseFleetManager.netstandard2.0.cs | 448 +++++++++--------- ...n.cs => Sample_DatabaseFleetCollection.cs} | 44 +- ...> Sample_DatabaseFleetMemberCollection.cs} | 84 ++-- ... => Sample_DatabaseFleetMemberResource.cs} | 40 +- ...rce.cs => Sample_DatabaseFleetResource.cs} | 56 +-- ...ample_DatabaseFleetUpdateRunCollection.cs} | 90 ++-- ... Sample_DatabaseFleetUpdateRunResource.cs} | 74 +-- .../ArmDatabaseFleetManagerModelFactory.cs | 76 +-- ...llection.cs => DatabaseFleetCollection.cs} | 110 ++--- .../{FleetData.cs => DatabaseFleetData.cs} | 12 +- ...on.cs => DatabaseFleetMemberCollection.cs} | 114 ++--- ...mberData.cs => DatabaseFleetMemberData.cs} | 12 +- ...urce.cs => DatabaseFleetMemberResource.cs} | 82 ++-- ...etResource.cs => DatabaseFleetResource.cs} | 182 +++---- ...cs => DatabaseFleetUpdateRunCollection.cs} | 114 ++--- ...nData.cs => DatabaseFleetUpdateRunData.cs} | 24 +- ...e.cs => DatabaseFleetUpdateRunResource.cs} | 114 ++--- .../DatabaseFleetManagerExtensions.cs | 70 +-- .../ResourceGroupResourceExtensionClient.cs | 8 +- .../SubscriptionResourceExtensionClient.cs | 28 +- .../DatabaseFleetMemberOperationSource.cs | 40 ++ .../DatabaseFleetOperationSource.cs | 40 ++ .../DatabaseFleetUpdateRunOperationSource.cs | 40 ++ .../FleetMemberOperationSource.cs | 40 -- .../FleetOperationSource.cs | 40 -- .../UpdateRunOperationSource.cs | 40 -- ....cs => DatabaseFleetData.Serialization.cs} | 6 +- ... DatabaseFleetListResult.Serialization.cs} | 12 +- ...stResult.cs => DatabaseFleetListResult.cs} | 12 +- ... DatabaseFleetMemberData.Serialization.cs} | 6 +- ...aseFleetMemberListResult.Serialization.cs} | 12 +- ...lt.cs => DatabaseFleetMemberListResult.cs} | 12 +- ...DatabaseFleetMemberPatch.Serialization.cs} | 2 +- ...erPatch.cs => DatabaseFleetMemberPatch.cs} | 6 +- ...cs => DatabaseFleetPatch.Serialization.cs} | 2 +- .../{FleetPatch.cs => DatabaseFleetPatch.cs} | 6 +- ...tabaseFleetUpdateRunData.Serialization.cs} | 22 +- ...FleetUpdateRunListResult.Serialization.cs} | 12 +- ...cs => DatabaseFleetUpdateRunListResult.cs} | 12 +- ....cs => FleetAgentProfile.Serialization.cs} | 6 +- .../{AgentProfile.cs => FleetAgentProfile.cs} | 10 +- ...etApiServerAccessProfile.Serialization.cs} | 6 +- ...file.cs => FleetApiServerAccessProfile.cs} | 10 +- .../Models/FleetHubProfile.Serialization.cs | 8 +- .../src/Generated/Models/FleetHubProfile.cs | 8 +- ...leetManagedClusterUpdate.Serialization.cs} | 10 +- ...Update.cs => FleetManagedClusterUpdate.cs} | 12 +- ...anagedClusterUpgradeSpec.Serialization.cs} | 10 +- ...c.cs => FleetManagedClusterUpgradeSpec.cs} | 12 +- .../Models/FleetManagedClusterUpgradeType.cs | 51 ++ ...n.cs => FleetUpdateGroup.Serialization.cs} | 6 +- .../{UpdateGroup.cs => FleetUpdateGroup.cs} | 6 +- ...> FleetUpdateGroupStatus.Serialization.cs} | 10 +- ...oupStatus.cs => FleetUpdateGroupStatus.cs} | 12 +- ...eetUpdateOperationStatus.Serialization.cs} | 10 +- ...tatus.cs => FleetUpdateOperationStatus.cs} | 12 +- .../Models/FleetUpdateRunProvisioningState.cs | 54 +++ ... => FleetUpdateRunStatus.Serialization.cs} | 16 +- ...teRunStatus.cs => FleetUpdateRunStatus.cs} | 16 +- ...> FleetUpdateRunStrategy.Serialization.cs} | 12 +- ...nStrategy.cs => FleetUpdateRunStrategy.cs} | 12 +- ...n.cs => FleetUpdateStage.Serialization.cs} | 12 +- .../{UpdateStage.cs => FleetUpdateStage.cs} | 14 +- ...> FleetUpdateStageStatus.Serialization.cs} | 20 +- ...ageStatus.cs => FleetUpdateStageStatus.cs} | 18 +- .../{UpdateState.cs => FleetUpdateState.cs} | 36 +- ...on.cs => FleetWaitStatus.Serialization.cs} | 10 +- .../{WaitStatus.cs => FleetWaitStatus.cs} | 12 +- .../Models/ManagedClusterUpgradeType.cs | 51 -- .../MemberUpdateStatus.Serialization.cs | 12 +- .../Generated/Models/MemberUpdateStatus.cs | 8 +- .../Models/UpdateRunProvisioningState.cs | 54 --- .../FleetMembersRestOperations.cs | 52 +- .../RestOperations/FleetsRestOperations.cs | 76 +-- .../UpdateRunsRestOperations.cs | 46 +- .../src/autorest.md | 25 +- 76 files changed, 1464 insertions(+), 1435 deletions(-) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/{Sample_FleetCollection.cs => Sample_DatabaseFleetCollection.cs} (85%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/{Sample_FleetMemberCollection.cs => Sample_DatabaseFleetMemberCollection.cs} (65%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/{Sample_FleetMemberResource.cs => Sample_DatabaseFleetMemberResource.cs} (67%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/{Sample_FleetResource.cs => Sample_DatabaseFleetResource.cs} (73%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/{Sample_UpdateRunCollection.cs => Sample_DatabaseFleetUpdateRunCollection.cs} (64%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/{Sample_UpdateRunResource.cs => Sample_DatabaseFleetUpdateRunResource.cs} (64%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/{FleetCollection.cs => DatabaseFleetCollection.cs} (67%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/{FleetData.cs => DatabaseFleetData.cs} (77%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/{FleetMemberCollection.cs => DatabaseFleetMemberCollection.cs} (64%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/{FleetMemberData.cs => DatabaseFleetMemberData.cs} (81%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/{FleetMemberResource.cs => DatabaseFleetMemberResource.cs} (68%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/{FleetResource.cs => DatabaseFleetResource.cs} (73%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/{UpdateRunCollection.cs => DatabaseFleetUpdateRunCollection.cs} (64%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/{UpdateRunData.cs => DatabaseFleetUpdateRunData.cs} (75%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/{UpdateRunResource.cs => DatabaseFleetUpdateRunResource.cs} (67%) create mode 100644 sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetMemberOperationSource.cs create mode 100644 sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetOperationSource.cs create mode 100644 sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetUpdateRunOperationSource.cs delete mode 100644 sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs delete mode 100644 sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetOperationSource.cs delete mode 100644 sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{FleetData.Serialization.cs => DatabaseFleetData.Serialization.cs} (94%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{FleetListResult.Serialization.cs => DatabaseFleetListResult.Serialization.cs} (72%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{FleetListResult.cs => DatabaseFleetListResult.cs} (70%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{FleetMemberData.Serialization.cs => DatabaseFleetMemberData.Serialization.cs} (92%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateRunListResult.Serialization.cs => DatabaseFleetMemberListResult.Serialization.cs} (70%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{FleetMemberListResult.cs => DatabaseFleetMemberListResult.cs} (68%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{FleetMemberPatch.Serialization.cs => DatabaseFleetMemberPatch.Serialization.cs} (90%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{FleetMemberPatch.cs => DatabaseFleetMemberPatch.cs} (71%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{FleetPatch.Serialization.cs => DatabaseFleetPatch.Serialization.cs} (93%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{FleetPatch.cs => DatabaseFleetPatch.cs} (80%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateRunData.Serialization.cs => DatabaseFleetUpdateRunData.Serialization.cs} (79%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{FleetMemberListResult.Serialization.cs => DatabaseFleetUpdateRunListResult.Serialization.cs} (69%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateRunListResult.cs => DatabaseFleetUpdateRunListResult.cs} (67%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{AgentProfile.Serialization.cs => FleetAgentProfile.Serialization.cs} (84%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{AgentProfile.cs => FleetAgentProfile.cs} (71%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{APIServerAccessProfile.Serialization.cs => FleetApiServerAccessProfile.Serialization.cs} (87%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{APIServerAccessProfile.cs => FleetApiServerAccessProfile.cs} (77%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{ManagedClusterUpdate.Serialization.cs => FleetManagedClusterUpdate.Serialization.cs} (77%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{ManagedClusterUpdate.cs => FleetManagedClusterUpdate.cs} (76%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{ManagedClusterUpgradeSpec.Serialization.cs => FleetManagedClusterUpgradeSpec.Serialization.cs} (75%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{ManagedClusterUpgradeSpec.cs => FleetManagedClusterUpgradeSpec.cs} (72%) create mode 100644 sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeType.cs rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateGroup.Serialization.cs => FleetUpdateGroup.Serialization.cs} (82%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateGroup.cs => FleetUpdateGroup.cs} (86%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateGroupStatus.Serialization.cs => FleetUpdateGroupStatus.Serialization.cs} (79%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateGroupStatus.cs => FleetUpdateGroupStatus.cs} (70%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateStatus.Serialization.cs => FleetUpdateOperationStatus.Serialization.cs} (81%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateStatus.cs => FleetUpdateOperationStatus.cs} (73%) create mode 100644 sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunProvisioningState.cs rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateRunStatus.Serialization.cs => FleetUpdateRunStatus.Serialization.cs} (70%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateRunStatus.cs => FleetUpdateRunStatus.cs} (70%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateRunStrategy.Serialization.cs => FleetUpdateRunStrategy.Serialization.cs} (72%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateRunStrategy.cs => FleetUpdateRunStrategy.cs} (69%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateStage.Serialization.cs => FleetUpdateStage.Serialization.cs} (82%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateStage.cs => FleetUpdateStage.cs} (82%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateStageStatus.Serialization.cs => FleetUpdateStageStatus.Serialization.cs} (65%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateStageStatus.cs => FleetUpdateStageStatus.cs} (63%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{UpdateState.cs => FleetUpdateState.cs} (55%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{WaitStatus.Serialization.cs => FleetWaitStatus.Serialization.cs} (74%) rename sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/{WaitStatus.cs => FleetWaitStatus.cs} (66%) delete mode 100644 sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeType.cs delete mode 100644 sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunProvisioningState.cs diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs index 7837b2131e114..a31cbdfb9281e 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs @@ -1,177 +1,188 @@ namespace Azure.ResourceManager.DatabaseFleetManager { - public static partial class DatabaseFleetManagerExtensions - { - public static Azure.Response GetFleet(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetFleetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.FleetMemberResource GetFleetMemberResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.FleetResource GetFleetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.FleetCollection GetFleets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetFleets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetFleetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.UpdateRunResource GetUpdateRunResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - } - public partial class FleetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class DatabaseFleetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected FleetCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.FleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.FleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected DatabaseFleetCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string fleetName, 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 fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetName, 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; } + public virtual Azure.Response Get(string fleetName, 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 fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetName, 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 FleetData : Azure.ResourceManager.Models.TrackedResourceData + public partial class DatabaseFleetData : Azure.ResourceManager.Models.TrackedResourceData { - public FleetData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public DatabaseFleetData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile HubProfile { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState? ProvisioningState { get { throw null; } } } - public partial class FleetMemberCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public static partial class DatabaseFleetManagerExtensions { - protected FleetMemberCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.DatabaseFleetManager.FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.DatabaseFleetManager.FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetDatabaseFleet(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDatabaseFleetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberResource GetDatabaseFleetMemberResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetResource GetDatabaseFleetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetCollection GetDatabaseFleets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDatabaseFleets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDatabaseFleetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunResource GetDatabaseFleetUpdateRunResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class DatabaseFleetMemberCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DatabaseFleetMemberCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string fleetMemberName, 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 fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetMemberName, 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; } + public virtual Azure.Response Get(string fleetMemberName, 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 fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetMemberName, 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 FleetMemberData : Azure.ResourceManager.Models.ResourceData + public partial class DatabaseFleetMemberData : Azure.ResourceManager.Models.ResourceData { - public FleetMemberData() { } + public DatabaseFleetMemberData() { } public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public string Group { get { throw null; } set { } } public Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState? ProvisioningState { get { throw null; } } } - public partial class FleetMemberResource : Azure.ResourceManager.ArmResource + public partial class DatabaseFleetMemberResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected FleetMemberResource() { } - public virtual Azure.ResourceManager.DatabaseFleetManager.FleetMemberData Data { get { throw null; } } + protected DatabaseFleetMemberResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseFleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseFleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class FleetResource : Azure.ResourceManager.ArmResource + public partial class DatabaseFleetResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected FleetResource() { } - public virtual Azure.ResourceManager.DatabaseFleetManager.FleetData Data { get { throw null; } } + protected DatabaseFleetResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetData 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 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 fleetName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, 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 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 GetCredentials(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetCredentialsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetFleetMember(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetFleetMemberAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DatabaseFleetManager.FleetMemberCollection GetFleetMembers() { throw null; } - public virtual Azure.Response GetUpdateRun(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetUpdateRunAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DatabaseFleetManager.UpdateRunCollection GetUpdateRuns() { 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; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.FleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.FleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class UpdateRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected UpdateRunCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.DatabaseFleetManager.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.DatabaseFleetManager.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDatabaseFleetMember(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDatabaseFleetMemberAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberCollection GetDatabaseFleetMembers() { throw null; } + public virtual Azure.Response GetDatabaseFleetUpdateRun(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDatabaseFleetUpdateRunAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunCollection GetDatabaseFleetUpdateRuns() { 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; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseFleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseFleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DatabaseFleetUpdateRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DatabaseFleetUpdateRunCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string updateRunName, 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 updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string updateRunName, 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; } + public virtual Azure.Response Get(string updateRunName, 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 updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string updateRunName, 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 UpdateRunData : Azure.ResourceManager.Models.ResourceData + public partial class DatabaseFleetUpdateRunData : Azure.ResourceManager.Models.ResourceData { - public UpdateRunData() { } + public DatabaseFleetUpdateRunData() { } public Azure.ETag? ETag { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpdate ManagedClusterUpdate { get { throw null; } set { } } - public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunStatus Status { get { throw null; } } - public System.Collections.Generic.IList StrategyStages { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpdate ManagedClusterUpdate { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunStatus Status { get { throw null; } } + public System.Collections.Generic.IList StrategyStages { get { throw null; } set { } } } - public partial class UpdateRunResource : Azure.ResourceManager.ArmResource + public partial class DatabaseFleetUpdateRunResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected UpdateRunResource() { } - public virtual Azure.ResourceManager.DatabaseFleetManager.UpdateRunData Data { get { throw null; } } + protected DatabaseFleetUpdateRunResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> StopAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.DatabaseFleetManager.Models { - public partial class APIServerAccessProfile - { - public APIServerAccessProfile() { } - public bool? EnablePrivateCluster { get { throw null; } set { } } - public bool? EnableVnetIntegration { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } - } public static partial class ArmDatabaseFleetManagerModelFactory { + public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetData DatabaseFleetData(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.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState?), Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile hubProfile = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberData DatabaseFleetMemberData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.Core.ResourceIdentifier clusterResourceId = null, string group = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData DatabaseFleetUpdateRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState?), System.Collections.Generic.IEnumerable strategyStages = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpdate managedClusterUpdate = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunStatus status = null) { throw null; } public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetCredentialResult FleetCredentialResult(string name = null, byte[] value = null) { throw null; } public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetCredentialResults FleetCredentialResults(System.Collections.Generic.IEnumerable kubeconfigs = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.FleetData FleetData(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.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState?), Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile hubProfile = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile FleetHubProfile(string dnsPrefix = null, Azure.ResourceManager.DatabaseFleetManager.Models.APIServerAccessProfile apiServerAccessProfile = null, Azure.Core.ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.FleetMemberData FleetMemberData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.Core.ResourceIdentifier clusterResourceId = null, string group = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState?)) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.MemberUpdateStatus MemberUpdateStatus(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus status = null, string name = null, string clusterResourceId = null, string operationId = null, string message = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile FleetHubProfile(string dnsPrefix = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetApiServerAccessProfile apiServerAccessProfile = null, Azure.Core.ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateGroupStatus FleetUpdateGroupStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, string name = null, System.Collections.Generic.IEnumerable members = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus FleetUpdateOperationStatus(System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState? state = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState?), Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunStatus FleetUpdateRunStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, System.Collections.Generic.IEnumerable stages = null, System.Collections.Generic.IEnumerable selectedNodeImageVersions = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateStageStatus FleetUpdateStageStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, string name = null, System.Collections.Generic.IEnumerable groups = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetWaitStatus afterStageWaitStatus = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetWaitStatus FleetWaitStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, int? waitDurationInSeconds = default(int?)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.MemberUpdateStatus MemberUpdateStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, string name = null, Azure.Core.ResourceIdentifier clusterResourceId = null, string operationId = null, string message = null) { throw null; } public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageVersion NodeImageVersion(string version = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateGroupStatus UpdateGroupStatus(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus status = null, string name = null, System.Collections.Generic.IEnumerable members = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.UpdateRunData UpdateRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState?), System.Collections.Generic.IEnumerable strategyStages = null, Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpdate managedClusterUpdate = null, Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunStatus status = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunStatus UpdateRunStatus(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus status = null, System.Collections.Generic.IEnumerable stages = null, System.Collections.Generic.IEnumerable selectedNodeImageVersions = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStageStatus UpdateStageStatus(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus status = null, string name = null, System.Collections.Generic.IEnumerable groups = null, Azure.ResourceManager.DatabaseFleetManager.Models.WaitStatus afterStageWaitStatus = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus UpdateStatus(System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState? state = default(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState?), Azure.ResponseError error = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.WaitStatus WaitStatus(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus status = null, int? waitDurationInSeconds = default(int?)) { throw null; } + } + public partial class DatabaseFleetMemberPatch + { + public DatabaseFleetMemberPatch() { } + public string Group { get { throw null; } set { } } + } + public partial class DatabaseFleetPatch + { + public DatabaseFleetPatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class FleetApiServerAccessProfile + { + public FleetApiServerAccessProfile() { } + public bool? EnablePrivateCluster { get { throw null; } set { } } + public bool? EnableVnetIntegration { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } } public partial class FleetCredentialResult { @@ -188,15 +199,40 @@ public partial class FleetHubProfile { public FleetHubProfile() { } public Azure.Core.ResourceIdentifier AgentSubnetId { get { throw null; } set { } } - public Azure.ResourceManager.DatabaseFleetManager.Models.APIServerAccessProfile ApiServerAccessProfile { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetApiServerAccessProfile ApiServerAccessProfile { get { throw null; } set { } } public string DnsPrefix { get { throw null; } set { } } public string Fqdn { get { throw null; } } public string KubernetesVersion { get { throw null; } } } - public partial class FleetMemberPatch + public partial class FleetManagedClusterUpdate { - public FleetMemberPatch() { } - public string Group { get { throw null; } set { } } + public FleetManagedClusterUpdate(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeSpec upgrade) { } + public Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType? SelectionType { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeSpec Upgrade { get { throw null; } set { } } + } + public partial class FleetManagedClusterUpgradeSpec + { + public FleetManagedClusterUpgradeSpec(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType upgradeType) { } + public string KubernetesVersion { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType UpgradeType { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FleetManagedClusterUpgradeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FleetManagedClusterUpgradeType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType Full { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType NodeImageOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType 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.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FleetMemberProvisioningState : System.IEquatable @@ -220,12 +256,6 @@ public FleetMemberPatch() { } public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState right) { throw null; } public override string ToString() { throw null; } } - public partial class FleetPatch - { - public FleetPatch() { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FleetProvisioningState : System.IEquatable { @@ -248,156 +278,126 @@ public FleetPatch() { } public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState right) { throw null; } public override string ToString() { throw null; } } - public partial class ManagedClusterUpdate + public partial class FleetUpdateGroup { - public ManagedClusterUpdate(Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeSpec upgrade) { } - public Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType? SelectionType { get { throw null; } set { } } - public Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeSpec Upgrade { get { throw null; } set { } } + public FleetUpdateGroup(string name) { } + public string Name { get { throw null; } set { } } } - public partial class ManagedClusterUpgradeSpec + public partial class FleetUpdateGroupStatus { - public ManagedClusterUpgradeSpec(Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType upgradeType) { } - public string KubernetesVersion { get { throw null; } set { } } - public Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType UpgradeType { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ManagedClusterUpgradeType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ManagedClusterUpgradeType(string value) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType Full { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType NodeImageOnly { get { throw null; } } - public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType 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.DatabaseFleetManager.Models.ManagedClusterUpgradeType left, Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType right) { throw null; } - public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType left, Azure.ResourceManager.DatabaseFleetManager.Models.ManagedClusterUpgradeType right) { throw null; } - public override string ToString() { throw null; } + internal FleetUpdateGroupStatus() { } + public System.Collections.Generic.IReadOnlyList Members { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } } } - public partial class MemberUpdateStatus + public partial class FleetUpdateOperationStatus { - internal MemberUpdateStatus() { } - public string ClusterResourceId { get { throw null; } } - public string Message { get { throw null; } } - public string Name { get { throw null; } } - public string OperationId { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus Status { get { throw null; } } + internal FleetUpdateOperationStatus() { } + public System.DateTimeOffset? CompletedOn { get { throw null; } } + public Azure.ResponseError Error { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState? State { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NodeImageSelectionType : System.IEquatable + public readonly partial struct FleetUpdateRunProvisioningState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public NodeImageSelectionType(string value) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType Consistent { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType Latest { get { throw null; } } - public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType other) { throw null; } + public FleetUpdateRunProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState 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.DatabaseFleetManager.Models.NodeImageSelectionType left, Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType right) { throw null; } - public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType left, Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState right) { throw null; } public override string ToString() { throw null; } } - public partial class NodeImageVersion + public partial class FleetUpdateRunStatus { - internal NodeImageVersion() { } - public string Version { get { throw null; } } + internal FleetUpdateRunStatus() { } + public System.Collections.Generic.IReadOnlyList SelectedNodeImageVersions { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Stages { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } } } - public partial class UpdateGroup + public partial class FleetUpdateStage { - public UpdateGroup(string name) { } + public FleetUpdateStage(string name) { } + public int? AfterStageWaitInSeconds { get { throw null; } set { } } + public System.Collections.Generic.IList Groups { get { throw null; } } public string Name { get { throw null; } set { } } } - public partial class UpdateGroupStatus + public partial class FleetUpdateStageStatus { - internal UpdateGroupStatus() { } - public System.Collections.Generic.IReadOnlyList Members { get { throw null; } } + internal FleetUpdateStageStatus() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetWaitStatus AfterStageWaitStatus { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Groups { get { throw null; } } public string Name { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus Status { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct UpdateRunProvisioningState : System.IEquatable + public readonly partial struct FleetUpdateState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public UpdateRunProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState other) { throw null; } + public FleetUpdateState(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Completed { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState NotStarted { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Running { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Skipped { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Stopped { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Stopping { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState 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.DatabaseFleetManager.Models.UpdateRunProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.UpdateRunProvisioningState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState right) { throw null; } public override string ToString() { throw null; } } - public partial class UpdateRunStatus + public partial class FleetWaitStatus { - internal UpdateRunStatus() { } - public System.Collections.Generic.IReadOnlyList SelectedNodeImageVersions { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Stages { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus Status { get { throw null; } } - } - public partial class UpdateStage - { - public UpdateStage(string name) { } - public int? AfterStageWaitInSeconds { get { throw null; } set { } } - public System.Collections.Generic.IList Groups { get { throw null; } } - public string Name { get { throw null; } set { } } + internal FleetWaitStatus() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } } + public int? WaitDurationInSeconds { get { throw null; } } } - public partial class UpdateStageStatus + public partial class MemberUpdateStatus { - internal UpdateStageStatus() { } - public Azure.ResourceManager.DatabaseFleetManager.Models.WaitStatus AfterStageWaitStatus { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Groups { get { throw null; } } + internal MemberUpdateStatus() { } + public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } } + public string Message { get { throw null; } } public string Name { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus Status { get { throw null; } } + public string OperationId { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct UpdateState : System.IEquatable + public readonly partial struct NodeImageSelectionType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public UpdateState(string value) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState Completed { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState Failed { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState NotStarted { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState Running { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState Skipped { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState Stopped { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState Stopping { get { throw null; } } - public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState other) { throw null; } + public NodeImageSelectionType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType Consistent { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType Latest { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType 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.DatabaseFleetManager.Models.UpdateState left, Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState right) { throw null; } - public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState left, Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType left, Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType left, Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType right) { throw null; } public override string ToString() { throw null; } } - public partial class UpdateStatus - { - internal UpdateStatus() { } - public System.DateTimeOffset? CompletedOn { get { throw null; } } - public Azure.ResponseError Error { get { throw null; } } - public System.DateTimeOffset? StartOn { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateState? State { get { throw null; } } - } - public partial class WaitStatus + public partial class NodeImageVersion { - internal WaitStatus() { } - public Azure.ResourceManager.DatabaseFleetManager.Models.UpdateStatus Status { get { throw null; } } - public int? WaitDurationInSeconds { get { throw null; } } + internal NodeImageVersion() { } + public string Version { get { throw null; } } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetCollection.cs similarity index 85% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetCollection.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetCollection.cs index 31021bc8af968..a8b25c48a370d 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetCollection.cs @@ -17,7 +17,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Samples { - public partial class Sample_FleetCollection + public partial class Sample_DatabaseFleetCollection { // Lists the Fleet resources in a resource group. [NUnit.Framework.Test] @@ -39,15 +39,15 @@ public async Task GetAll_ListsTheFleetResourcesInAResourceGroup() ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this FleetResource - FleetCollection collection = resourceGroupResource.GetFleets(); + // get the collection of this DatabaseFleetResource + DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets(); // invoke the operation and iterate over the result - await foreach (FleetResource item in collection.GetAllAsync()) + await foreach (DatabaseFleetResource 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 - FleetData resourceData = item.Data; + DatabaseFleetData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -75,16 +75,16 @@ public async Task Get_GetsAFleetResource() ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this FleetResource - FleetCollection collection = resourceGroupResource.GetFleets(); + // get the collection of this DatabaseFleetResource + DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets(); // invoke the operation string fleetName = "fleet1"; - FleetResource result = await collection.GetAsync(fleetName); + DatabaseFleetResource result = await collection.GetAsync(fleetName); // 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 - FleetData resourceData = result.Data; + DatabaseFleetData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -109,8 +109,8 @@ public async Task Exists_GetsAFleetResource() ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this FleetResource - FleetCollection collection = resourceGroupResource.GetFleets(); + // get the collection of this DatabaseFleetResource + DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets(); // invoke the operation string fleetName = "fleet1"; @@ -139,13 +139,13 @@ public async Task GetIfExists_GetsAFleetResource() ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this FleetResource - FleetCollection collection = resourceGroupResource.GetFleets(); + // get the collection of this DatabaseFleetResource + DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets(); // invoke the operation string fleetName = "fleet1"; - NullableResponse response = await collection.GetIfExistsAsync(fleetName); - FleetResource result = response.HasValue ? response.Value : null; + NullableResponse response = await collection.GetIfExistsAsync(fleetName); + DatabaseFleetResource result = response.HasValue ? response.Value : null; if (result == null) { @@ -155,7 +155,7 @@ public async Task GetIfExists_GetsAFleetResource() { // 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 - FleetData resourceData = result.Data; + DatabaseFleetData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -181,12 +181,12 @@ public async Task CreateOrUpdate_CreatesAFleetResourceWithALongRunningOperation( ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this FleetResource - FleetCollection collection = resourceGroupResource.GetFleets(); + // get the collection of this DatabaseFleetResource + DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets(); // invoke the operation string fleetName = "fleet1"; - FleetData data = new FleetData(new AzureLocation("East US")) + DatabaseFleetData data = new DatabaseFleetData(new AzureLocation("East US")) { HubProfile = new FleetHubProfile() { @@ -198,12 +198,12 @@ public async Task CreateOrUpdate_CreatesAFleetResourceWithALongRunningOperation( ["tier"] = "production", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetName, data); - FleetResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetName, data); + DatabaseFleetResource 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 - FleetData resourceData = result.Data; + DatabaseFleetData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetMemberCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberCollection.cs similarity index 65% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetMemberCollection.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberCollection.cs index 14b8086aabc2d..969d9d7ac6732 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetMemberCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberCollection.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Samples { - public partial class Sample_FleetMemberCollection + public partial class Sample_DatabaseFleetMemberCollection { // Lists the members of a Fleet. [NUnit.Framework.Test] @@ -30,23 +30,23 @@ public async Task GetAll_ListsTheMembersOfAFleet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); - // get the collection of this FleetMemberResource - FleetMemberCollection collection = fleet.GetFleetMembers(); + // get the collection of this DatabaseFleetMemberResource + DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers(); // invoke the operation and iterate over the result - await foreach (FleetMemberResource item in collection.GetAllAsync()) + await foreach (DatabaseFleetMemberResource 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 - FleetMemberData resourceData = item.Data; + DatabaseFleetMemberData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -67,24 +67,24 @@ public async Task Get_GetsAFleetMemberResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); - // get the collection of this FleetMemberResource - FleetMemberCollection collection = fleet.GetFleetMembers(); + // get the collection of this DatabaseFleetMemberResource + DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers(); // invoke the operation string fleetMemberName = "member-1"; - FleetMemberResource result = await collection.GetAsync(fleetMemberName); + DatabaseFleetMemberResource result = await collection.GetAsync(fleetMemberName); // 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 - FleetMemberData resourceData = result.Data; + DatabaseFleetMemberData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -102,16 +102,16 @@ public async Task Exists_GetsAFleetMemberResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); - // get the collection of this FleetMemberResource - FleetMemberCollection collection = fleet.GetFleetMembers(); + // get the collection of this DatabaseFleetMemberResource + DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers(); // invoke the operation string fleetMemberName = "member-1"; @@ -133,21 +133,21 @@ public async Task GetIfExists_GetsAFleetMemberResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); - // get the collection of this FleetMemberResource - FleetMemberCollection collection = fleet.GetFleetMembers(); + // get the collection of this DatabaseFleetMemberResource + DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers(); // invoke the operation string fleetMemberName = "member-1"; - NullableResponse response = await collection.GetIfExistsAsync(fleetMemberName); - FleetMemberResource result = response.HasValue ? response.Value : null; + NullableResponse response = await collection.GetIfExistsAsync(fleetMemberName); + DatabaseFleetMemberResource result = response.HasValue ? response.Value : null; if (result == null) { @@ -157,7 +157,7 @@ public async Task GetIfExists_GetsAFleetMemberResource() { // 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 - FleetMemberData resourceData = result.Data; + DatabaseFleetMemberData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -176,29 +176,29 @@ public async Task CreateOrUpdate_CreatesAFleetMemberResourceWithALongRunningOper // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); - // get the collection of this FleetMemberResource - FleetMemberCollection collection = fleet.GetFleetMembers(); + // get the collection of this DatabaseFleetMemberResource + DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers(); // invoke the operation string fleetMemberName = "member-1"; - FleetMemberData data = new FleetMemberData() + DatabaseFleetMemberData data = new DatabaseFleetMemberData() { ClusterResourceId = new ResourceIdentifier("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1"), }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetMemberName, data); - FleetMemberResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetMemberName, data); + DatabaseFleetMemberResource 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 - FleetMemberData resourceData = result.Data; + DatabaseFleetMemberData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetMemberResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberResource.cs similarity index 67% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetMemberResource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberResource.cs index 14e9ccaf61400..ba2d23068ac14 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetMemberResource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberResource.cs @@ -16,7 +16,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Samples { - public partial class Sample_FleetMemberResource + public partial class Sample_DatabaseFleetMemberResource { // Gets a FleetMember resource. [NUnit.Framework.Test] @@ -31,21 +31,21 @@ public async Task Get_GetsAFleetMemberResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetMemberResource created on azure - // for more information of creating FleetMemberResource, please refer to the document of FleetMemberResource + // this example assumes you already have this DatabaseFleetMemberResource created on azure + // for more information of creating DatabaseFleetMemberResource, please refer to the document of DatabaseFleetMemberResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string fleetMemberName = "member-1"; - ResourceIdentifier fleetMemberResourceId = FleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); - FleetMemberResource fleetMember = client.GetFleetMemberResource(fleetMemberResourceId); + ResourceIdentifier databaseFleetMemberResourceId = DatabaseFleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); + DatabaseFleetMemberResource databaseFleetMember = client.GetDatabaseFleetMemberResource(databaseFleetMemberResourceId); // invoke the operation - FleetMemberResource result = await fleetMember.GetAsync(); + DatabaseFleetMemberResource result = await databaseFleetMember.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 - FleetMemberData resourceData = result.Data; + DatabaseFleetMemberData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -63,26 +63,26 @@ public async Task Update_UpdatesAFleetMemberResourceSynchronously() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetMemberResource created on azure - // for more information of creating FleetMemberResource, please refer to the document of FleetMemberResource + // this example assumes you already have this DatabaseFleetMemberResource created on azure + // for more information of creating DatabaseFleetMemberResource, please refer to the document of DatabaseFleetMemberResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string fleetMemberName = "member-1"; - ResourceIdentifier fleetMemberResourceId = FleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); - FleetMemberResource fleetMember = client.GetFleetMemberResource(fleetMemberResourceId); + ResourceIdentifier databaseFleetMemberResourceId = DatabaseFleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); + DatabaseFleetMemberResource databaseFleetMember = client.GetDatabaseFleetMemberResource(databaseFleetMemberResourceId); // invoke the operation - FleetMemberPatch patch = new FleetMemberPatch() + DatabaseFleetMemberPatch patch = new DatabaseFleetMemberPatch() { Group = "staging", }; - ArmOperation lro = await fleetMember.UpdateAsync(WaitUntil.Completed, patch); - FleetMemberResource result = lro.Value; + ArmOperation lro = await databaseFleetMember.UpdateAsync(WaitUntil.Completed, patch); + DatabaseFleetMemberResource 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 - FleetMemberData resourceData = result.Data; + DatabaseFleetMemberData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -100,17 +100,17 @@ public async Task Delete_DeletesAFleetMemberResourceAsynchronouslyWithALongRunni // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetMemberResource created on azure - // for more information of creating FleetMemberResource, please refer to the document of FleetMemberResource + // this example assumes you already have this DatabaseFleetMemberResource created on azure + // for more information of creating DatabaseFleetMemberResource, please refer to the document of DatabaseFleetMemberResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string fleetMemberName = "member-1"; - ResourceIdentifier fleetMemberResourceId = FleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); - FleetMemberResource fleetMember = client.GetFleetMemberResource(fleetMemberResourceId); + ResourceIdentifier databaseFleetMemberResourceId = DatabaseFleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); + DatabaseFleetMemberResource databaseFleetMember = client.GetDatabaseFleetMemberResource(databaseFleetMemberResourceId); // invoke the operation - await fleetMember.DeleteAsync(WaitUntil.Completed); + await databaseFleetMember.DeleteAsync(WaitUntil.Completed); Console.WriteLine($"Succeeded"); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetResource.cs similarity index 73% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetResource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetResource.cs index 9e9e6a2d57cb5..e1fb1cf53f648 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetResource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetResource.cs @@ -17,12 +17,12 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Samples { - public partial class Sample_FleetResource + public partial class Sample_DatabaseFleetResource { // Lists the Fleet resources in a subscription. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetFleets_ListsTheFleetResourcesInASubscription() + public async Task GetDatabaseFleets_ListsTheFleetResourcesInASubscription() { // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListBySub.json // this example is just showing the usage of "Fleets_ListBySubscription" operation, for the dependent resources, they will have to be created separately. @@ -39,11 +39,11 @@ public async Task GetFleets_ListsTheFleetResourcesInASubscription() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (FleetResource item in subscriptionResource.GetFleetsAsync()) + await foreach (DatabaseFleetResource item in subscriptionResource.GetDatabaseFleetsAsync()) { // 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 - FleetData resourceData = item.Data; + DatabaseFleetData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -64,20 +64,20 @@ public async Task Get_GetsAFleetResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); // invoke the operation - FleetResource result = await fleet.GetAsync(); + DatabaseFleetResource result = await databaseFleet.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 - FleetData resourceData = result.Data; + DatabaseFleetData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -95,16 +95,16 @@ public async Task Update_UpdateAFleet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); // invoke the operation - FleetPatch patch = new FleetPatch() + DatabaseFleetPatch patch = new DatabaseFleetPatch() { Tags = { @@ -113,12 +113,12 @@ public async Task Update_UpdateAFleet() }, }; string ifMatch = "dfjkwelr7384"; - ArmOperation lro = await fleet.UpdateAsync(WaitUntil.Completed, patch, ifMatch: ifMatch); - FleetResource result = lro.Value; + ArmOperation lro = await databaseFleet.UpdateAsync(WaitUntil.Completed, patch, ifMatch: ifMatch); + DatabaseFleetResource 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 - FleetData resourceData = result.Data; + DatabaseFleetData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -136,16 +136,16 @@ public async Task Delete_DeletesAFleetResourceAsynchronouslyWithALongRunningOper // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); // invoke the operation - await fleet.DeleteAsync(WaitUntil.Completed); + await databaseFleet.DeleteAsync(WaitUntil.Completed); Console.WriteLine($"Succeeded"); } @@ -163,16 +163,16 @@ public async Task GetCredentials_ListsTheUserCredentialsOfAFleet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); // invoke the operation - FleetCredentialResults result = await fleet.GetCredentialsAsync(); + FleetCredentialResults result = await databaseFleet.GetCredentialsAsync(); Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_UpdateRunCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunCollection.cs similarity index 64% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_UpdateRunCollection.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunCollection.cs index 0cffe1d9370c3..ccd8df59dd7ba 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_UpdateRunCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunCollection.cs @@ -16,7 +16,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Samples { - public partial class Sample_UpdateRunCollection + public partial class Sample_DatabaseFleetUpdateRunCollection { // Lists the UpdateRun resources by fleet. [NUnit.Framework.Test] @@ -31,23 +31,23 @@ public async Task GetAll_ListsTheUpdateRunResourcesByFleet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); - // get the collection of this UpdateRunResource - UpdateRunCollection collection = fleet.GetUpdateRuns(); + // get the collection of this DatabaseFleetUpdateRunResource + DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns(); // invoke the operation and iterate over the result - await foreach (UpdateRunResource item in collection.GetAllAsync()) + await foreach (DatabaseFleetUpdateRunResource 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 - UpdateRunData resourceData = item.Data; + DatabaseFleetUpdateRunData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -68,24 +68,24 @@ public async Task Get_GetsAnUpdateRunResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); - // get the collection of this UpdateRunResource - UpdateRunCollection collection = fleet.GetUpdateRuns(); + // get the collection of this DatabaseFleetUpdateRunResource + DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns(); // invoke the operation string updateRunName = "run1"; - UpdateRunResource result = await collection.GetAsync(updateRunName); + DatabaseFleetUpdateRunResource result = await collection.GetAsync(updateRunName); // 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 - UpdateRunData resourceData = result.Data; + DatabaseFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -103,16 +103,16 @@ public async Task Exists_GetsAnUpdateRunResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); - // get the collection of this UpdateRunResource - UpdateRunCollection collection = fleet.GetUpdateRuns(); + // get the collection of this DatabaseFleetUpdateRunResource + DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns(); // invoke the operation string updateRunName = "run1"; @@ -134,21 +134,21 @@ public async Task GetIfExists_GetsAnUpdateRunResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); - // get the collection of this UpdateRunResource - UpdateRunCollection collection = fleet.GetUpdateRuns(); + // get the collection of this DatabaseFleetUpdateRunResource + DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns(); // invoke the operation string updateRunName = "run1"; - NullableResponse response = await collection.GetIfExistsAsync(updateRunName); - UpdateRunResource result = response.HasValue ? response.Value : null; + NullableResponse response = await collection.GetIfExistsAsync(updateRunName); + DatabaseFleetUpdateRunResource result = response.HasValue ? response.Value : null; if (result == null) { @@ -158,7 +158,7 @@ public async Task GetIfExists_GetsAnUpdateRunResource() { // 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 - UpdateRunData resourceData = result.Data; + DatabaseFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -177,33 +177,33 @@ public async Task CreateOrUpdate_CreateAnUpdateRun() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this FleetResource created on azure - // for more information of creating FleetResource, please refer to the document of FleetResource + // this example assumes you already have this DatabaseFleetResource created on azure + // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - FleetResource fleet = client.GetFleetResource(fleetResourceId); + ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); - // get the collection of this UpdateRunResource - UpdateRunCollection collection = fleet.GetUpdateRuns(); + // get the collection of this DatabaseFleetUpdateRunResource + DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns(); // invoke the operation string updateRunName = "run1"; - UpdateRunData data = new UpdateRunData() + DatabaseFleetUpdateRunData data = new DatabaseFleetUpdateRunData() { StrategyStages = { -new UpdateStage("stage1") +new FleetUpdateStage("stage1") { Groups = { -new UpdateGroup("group-a") +new FleetUpdateGroup("group-a") }, AfterStageWaitInSeconds = 3600, } }, - ManagedClusterUpdate = new ManagedClusterUpdate(new ManagedClusterUpgradeSpec(ManagedClusterUpgradeType.Full) + ManagedClusterUpdate = new FleetManagedClusterUpdate(new FleetManagedClusterUpgradeSpec(FleetManagedClusterUpgradeType.Full) { KubernetesVersion = "1.26.1", }) @@ -211,12 +211,12 @@ public async Task CreateOrUpdate_CreateAnUpdateRun() SelectionType = NodeImageSelectionType.Latest, }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, updateRunName, data); - UpdateRunResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, updateRunName, data); + DatabaseFleetUpdateRunResource 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 - UpdateRunData resourceData = result.Data; + DatabaseFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_UpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunResource.cs similarity index 64% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_UpdateRunResource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunResource.cs index 1dd447dc55649..bbbad88a501a6 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_UpdateRunResource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunResource.cs @@ -16,7 +16,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Samples { - public partial class Sample_UpdateRunResource + public partial class Sample_DatabaseFleetUpdateRunResource { // Gets an UpdateRun resource. [NUnit.Framework.Test] @@ -31,21 +31,21 @@ public async Task Get_GetsAnUpdateRunResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this UpdateRunResource created on azure - // for more information of creating UpdateRunResource, please refer to the document of UpdateRunResource + // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure + // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string updateRunName = "run1"; - ResourceIdentifier updateRunResourceId = UpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); - UpdateRunResource updateRun = client.GetUpdateRunResource(updateRunResourceId); + ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId); // invoke the operation - UpdateRunResource result = await updateRun.GetAsync(); + DatabaseFleetUpdateRunResource result = await databaseFleetUpdateRun.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 - UpdateRunData resourceData = result.Data; + DatabaseFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -63,30 +63,30 @@ public async Task Update_CreateAnUpdateRun() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this UpdateRunResource created on azure - // for more information of creating UpdateRunResource, please refer to the document of UpdateRunResource + // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure + // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string updateRunName = "run1"; - ResourceIdentifier updateRunResourceId = UpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); - UpdateRunResource updateRun = client.GetUpdateRunResource(updateRunResourceId); + ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId); // invoke the operation - UpdateRunData data = new UpdateRunData() + DatabaseFleetUpdateRunData data = new DatabaseFleetUpdateRunData() { StrategyStages = { -new UpdateStage("stage1") +new FleetUpdateStage("stage1") { Groups = { -new UpdateGroup("group-a") +new FleetUpdateGroup("group-a") }, AfterStageWaitInSeconds = 3600, } }, - ManagedClusterUpdate = new ManagedClusterUpdate(new ManagedClusterUpgradeSpec(ManagedClusterUpgradeType.Full) + ManagedClusterUpdate = new FleetManagedClusterUpdate(new FleetManagedClusterUpgradeSpec(FleetManagedClusterUpgradeType.Full) { KubernetesVersion = "1.26.1", }) @@ -94,12 +94,12 @@ public async Task Update_CreateAnUpdateRun() SelectionType = NodeImageSelectionType.Latest, }, }; - ArmOperation lro = await updateRun.UpdateAsync(WaitUntil.Completed, data); - UpdateRunResource result = lro.Value; + ArmOperation lro = await databaseFleetUpdateRun.UpdateAsync(WaitUntil.Completed, data); + DatabaseFleetUpdateRunResource 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 - UpdateRunData resourceData = result.Data; + DatabaseFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -117,17 +117,17 @@ public async Task Delete_DeleteAnUpdateRunResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this UpdateRunResource created on azure - // for more information of creating UpdateRunResource, please refer to the document of UpdateRunResource + // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure + // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string updateRunName = "run1"; - ResourceIdentifier updateRunResourceId = UpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); - UpdateRunResource updateRun = client.GetUpdateRunResource(updateRunResourceId); + ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId); // invoke the operation - await updateRun.DeleteAsync(WaitUntil.Completed); + await databaseFleetUpdateRun.DeleteAsync(WaitUntil.Completed); Console.WriteLine($"Succeeded"); } @@ -145,22 +145,22 @@ public async Task Start_StartsAnUpdateRun() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this UpdateRunResource created on azure - // for more information of creating UpdateRunResource, please refer to the document of UpdateRunResource + // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure + // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string updateRunName = "run1"; - ResourceIdentifier updateRunResourceId = UpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); - UpdateRunResource updateRun = client.GetUpdateRunResource(updateRunResourceId); + ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId); // invoke the operation - ArmOperation lro = await updateRun.StartAsync(WaitUntil.Completed); - UpdateRunResource result = lro.Value; + ArmOperation lro = await databaseFleetUpdateRun.StartAsync(WaitUntil.Completed); + DatabaseFleetUpdateRunResource 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 - UpdateRunData resourceData = result.Data; + DatabaseFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -178,22 +178,22 @@ public async Task Stop_StopsAnUpdateRun() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this UpdateRunResource created on azure - // for more information of creating UpdateRunResource, please refer to the document of UpdateRunResource + // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure + // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string updateRunName = "run1"; - ResourceIdentifier updateRunResourceId = UpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); - UpdateRunResource updateRun = client.GetUpdateRunResource(updateRunResourceId); + ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId); // invoke the operation - ArmOperation lro = await updateRun.StopAsync(WaitUntil.Completed); - UpdateRunResource result = lro.Value; + ArmOperation lro = await databaseFleetUpdateRun.StopAsync(WaitUntil.Completed); + DatabaseFleetUpdateRunResource 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 - UpdateRunData resourceData = result.Data; + DatabaseFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs index 240fa0610cea6..ddff9724c1a7c 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs @@ -18,7 +18,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models /// Model factory for models. public static partial class ArmDatabaseFleetManagerModelFactory { - /// Initializes a new instance of FleetData. + /// Initializes a new instance of DatabaseFleetData. /// The id. /// The name. /// The resourceType. @@ -29,12 +29,12 @@ public static partial class ArmDatabaseFleetManagerModelFactory /// Managed identity. /// The status of the last operation. /// The FleetHubProfile configures the Fleet's hub. - /// A new instance for mocking. - public static FleetData FleetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? eTag = null, ManagedServiceIdentity identity = null, FleetProvisioningState? provisioningState = null, FleetHubProfile hubProfile = null) + /// A new instance for mocking. + public static DatabaseFleetData DatabaseFleetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? eTag = null, ManagedServiceIdentity identity = null, FleetProvisioningState? provisioningState = null, FleetHubProfile hubProfile = null) { tags ??= new Dictionary(); - return new FleetData(id, name, resourceType, systemData, tags, location, eTag, identity, provisioningState, hubProfile); + return new DatabaseFleetData(id, name, resourceType, systemData, tags, location, eTag, identity, provisioningState, hubProfile); } /// Initializes a new instance of FleetHubProfile. @@ -44,9 +44,9 @@ public static FleetData FleetData(ResourceIdentifier id = null, string name = nu /// The FQDN of the Fleet hub. /// The Kubernetes version of the Fleet hub. /// A new instance for mocking. - public static FleetHubProfile FleetHubProfile(string dnsPrefix = null, APIServerAccessProfile apiServerAccessProfile = null, ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null) + public static FleetHubProfile FleetHubProfile(string dnsPrefix = null, FleetApiServerAccessProfile apiServerAccessProfile = null, ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null) { - return new FleetHubProfile(dnsPrefix, apiServerAccessProfile, agentSubnetId != null ? new AgentProfile(agentSubnetId) : null, fqdn, kubernetesVersion); + return new FleetHubProfile(dnsPrefix, apiServerAccessProfile, agentSubnetId != null ? new FleetAgentProfile(agentSubnetId) : null, fqdn, kubernetesVersion); } /// Initializes a new instance of FleetCredentialResults. @@ -68,7 +68,7 @@ public static FleetCredentialResult FleetCredentialResult(string name = null, by return new FleetCredentialResult(name, value); } - /// Initializes a new instance of FleetMemberData. + /// Initializes a new instance of DatabaseFleetMemberData. /// The id. /// The name. /// The resourceType. @@ -77,13 +77,13 @@ public static FleetCredentialResult FleetCredentialResult(string name = null, by /// The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. /// The group this member belongs to for multi-cluster update management. /// The status of the last operation. - /// A new instance for mocking. - public static FleetMemberData FleetMemberData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, ResourceIdentifier clusterResourceId = null, string group = null, FleetMemberProvisioningState? provisioningState = null) + /// A new instance for mocking. + public static DatabaseFleetMemberData DatabaseFleetMemberData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, ResourceIdentifier clusterResourceId = null, string group = null, FleetMemberProvisioningState? provisioningState = null) { - return new FleetMemberData(id, name, resourceType, systemData, eTag, clusterResourceId, group, provisioningState); + return new DatabaseFleetMemberData(id, name, resourceType, systemData, eTag, clusterResourceId, group, provisioningState); } - /// Initializes a new instance of UpdateRunData. + /// Initializes a new instance of DatabaseFleetUpdateRunData. /// The id. /// The name. /// The resourceType. @@ -97,61 +97,61 @@ public static FleetMemberData FleetMemberData(ResourceIdentifier id = null, stri /// /// The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started. /// The status of the UpdateRun. - /// A new instance for mocking. - public static UpdateRunData UpdateRunData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, UpdateRunProvisioningState? provisioningState = null, IEnumerable strategyStages = null, ManagedClusterUpdate managedClusterUpdate = null, UpdateRunStatus status = null) + /// A new instance for mocking. + public static DatabaseFleetUpdateRunData DatabaseFleetUpdateRunData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, FleetUpdateRunProvisioningState? provisioningState = null, IEnumerable strategyStages = null, FleetManagedClusterUpdate managedClusterUpdate = null, FleetUpdateRunStatus status = null) { - strategyStages ??= new List(); + strategyStages ??= new List(); - return new UpdateRunData(id, name, resourceType, systemData, eTag, provisioningState, strategyStages != null ? new UpdateRunStrategy(strategyStages?.ToList()) : null, managedClusterUpdate, status); + return new DatabaseFleetUpdateRunData(id, name, resourceType, systemData, eTag, provisioningState, strategyStages != null ? new FleetUpdateRunStrategy(strategyStages?.ToList()) : null, managedClusterUpdate, status); } - /// Initializes a new instance of UpdateRunStatus. + /// Initializes a new instance of FleetUpdateRunStatus. /// The status of the UpdateRun. /// The stages composing an update run. Stages are run sequentially withing an UpdateRun. /// The node image upgrade specs for the update run. It is only set in update run when `NodeImageSelection.type` is `Consistent`. - /// A new instance for mocking. - public static UpdateRunStatus UpdateRunStatus(UpdateStatus status = null, IEnumerable stages = null, IEnumerable selectedNodeImageVersions = null) + /// A new instance for mocking. + public static FleetUpdateRunStatus FleetUpdateRunStatus(FleetUpdateOperationStatus status = null, IEnumerable stages = null, IEnumerable selectedNodeImageVersions = null) { - stages ??= new List(); + stages ??= new List(); selectedNodeImageVersions ??= new List(); - return new UpdateRunStatus(status, stages?.ToList(), selectedNodeImageVersions != null ? new NodeImageSelectionStatus(selectedNodeImageVersions?.ToList()) : null); + return new FleetUpdateRunStatus(status, stages?.ToList(), selectedNodeImageVersions != null ? new NodeImageSelectionStatus(selectedNodeImageVersions?.ToList()) : null); } - /// Initializes a new instance of UpdateStatus. + /// Initializes a new instance of FleetUpdateOperationStatus. /// The time the operation or group was started. /// The time the operation or group was completed. /// The State of the operation or group. /// The error details when a failure is encountered. - /// A new instance for mocking. - public static UpdateStatus UpdateStatus(DateTimeOffset? startOn = null, DateTimeOffset? completedOn = null, UpdateState? state = null, ResponseError error = null) + /// A new instance for mocking. + public static FleetUpdateOperationStatus FleetUpdateOperationStatus(DateTimeOffset? startOn = null, DateTimeOffset? completedOn = null, FleetUpdateState? state = null, ResponseError error = null) { - return new UpdateStatus(startOn, completedOn, state, error); + return new FleetUpdateOperationStatus(startOn, completedOn, state, error); } - /// Initializes a new instance of UpdateStageStatus. + /// Initializes a new instance of FleetUpdateStageStatus. /// The status of the UpdateStage. /// The name of the UpdateStage. /// The list of groups to be updated as part of this UpdateStage. /// The status of the wait period configured on the UpdateStage. - /// A new instance for mocking. - public static UpdateStageStatus UpdateStageStatus(UpdateStatus status = null, string name = null, IEnumerable groups = null, WaitStatus afterStageWaitStatus = null) + /// A new instance for mocking. + public static FleetUpdateStageStatus FleetUpdateStageStatus(FleetUpdateOperationStatus status = null, string name = null, IEnumerable groups = null, FleetWaitStatus afterStageWaitStatus = null) { - groups ??= new List(); + groups ??= new List(); - return new UpdateStageStatus(status, name, groups?.ToList(), afterStageWaitStatus); + return new FleetUpdateStageStatus(status, name, groups?.ToList(), afterStageWaitStatus); } - /// Initializes a new instance of UpdateGroupStatus. + /// Initializes a new instance of FleetUpdateGroupStatus. /// The status of the UpdateGroup. /// The name of the UpdateGroup. /// The list of member this UpdateGroup updates. - /// A new instance for mocking. - public static UpdateGroupStatus UpdateGroupStatus(UpdateStatus status = null, string name = null, IEnumerable members = null) + /// A new instance for mocking. + public static FleetUpdateGroupStatus FleetUpdateGroupStatus(FleetUpdateOperationStatus status = null, string name = null, IEnumerable members = null) { members ??= new List(); - return new UpdateGroupStatus(status, name, members?.ToList()); + return new FleetUpdateGroupStatus(status, name, members?.ToList()); } /// Initializes a new instance of MemberUpdateStatus. @@ -161,18 +161,18 @@ public static UpdateGroupStatus UpdateGroupStatus(UpdateStatus status = null, st /// The operation resource id of the latest attempt to perform the operation. /// The status message after processing the member update operation. /// A new instance for mocking. - public static MemberUpdateStatus MemberUpdateStatus(UpdateStatus status = null, string name = null, string clusterResourceId = null, string operationId = null, string message = null) + public static MemberUpdateStatus MemberUpdateStatus(FleetUpdateOperationStatus status = null, string name = null, ResourceIdentifier clusterResourceId = null, string operationId = null, string message = null) { return new MemberUpdateStatus(status, name, clusterResourceId, operationId, message); } - /// Initializes a new instance of WaitStatus. + /// Initializes a new instance of FleetWaitStatus. /// The status of the wait duration. /// The wait duration configured in seconds. - /// A new instance for mocking. - public static WaitStatus WaitStatus(UpdateStatus status = null, int? waitDurationInSeconds = null) + /// A new instance for mocking. + public static FleetWaitStatus FleetWaitStatus(FleetUpdateOperationStatus status = null, int? waitDurationInSeconds = null) { - return new WaitStatus(status, waitDurationInSeconds); + return new FleetWaitStatus(status, waitDurationInSeconds); } /// Initializes a new instance of NodeImageVersion. diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetCollection.cs similarity index 67% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetCollection.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetCollection.cs index fa8aa87f9b53d..c768823488c51 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetCollection.cs @@ -21,28 +21,28 @@ namespace Azure.ResourceManager.DatabaseFleetManager { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetFleets method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDatabaseFleets method from an instance of . /// - public partial class FleetCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DatabaseFleetCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _fleetClientDiagnostics; - private readonly FleetsRestOperations _fleetRestClient; + private readonly ClientDiagnostics _databaseFleetFleetsClientDiagnostics; + private readonly FleetsRestOperations _databaseFleetFleetsRestClient; - /// Initializes a new instance of the class for mocking. - protected FleetCollection() + /// Initializes a new instance of the class for mocking. + protected DatabaseFleetCollection() { } - /// Initializes a new instance of the class. + /// 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 FleetCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DatabaseFleetCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _fleetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", FleetResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(FleetResource.ResourceType, out string fleetApiVersion); - _fleetRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetApiVersion); + _databaseFleetFleetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", DatabaseFleetResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DatabaseFleetResource.ResourceType, out string databaseFleetFleetsApiVersion); + _databaseFleetFleetsRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetFleetsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -75,17 +75,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 fleetName, FleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fleetName, DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.CreateOrUpdate"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _fleetRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _databaseFleetFleetsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetOperationSource(Client), _databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -118,17 +118,17 @@ public virtual async Task> CreateOrUpdateAsync(WaitU /// 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 fleetName, FleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fleetName, DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.CreateOrUpdate"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.CreateOrUpdate"); scope.Start(); try { - var response = _fleetRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _databaseFleetFleetsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetOperationSource(Client), _databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -157,18 +157,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, s /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string fleetName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Get"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.Get"); scope.Start(); try { - var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken).ConfigureAwait(false); + var response = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -194,18 +194,18 @@ public virtual async Task> GetAsync(string fleetName, Ca /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string fleetName, CancellationToken cancellationToken = default) + public virtual Response Get(string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Get"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.Get"); scope.Start(); try { - var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken); + var response = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -228,12 +228,12 @@ public virtual Response Get(string fleetName, CancellationToken c /// /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), _fleetClientDiagnostics, Pipeline, "FleetCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetFleetsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetFleetsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetResource(Client, DatabaseFleetData.DeserializeDatabaseFleetData(e)), _databaseFleetFleetsClientDiagnostics, Pipeline, "DatabaseFleetCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -250,12 +250,12 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cancel /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), _fleetClientDiagnostics, Pipeline, "FleetCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetFleetsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetFleetsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetResource(Client, DatabaseFleetData.DeserializeDatabaseFleetData(e)), _databaseFleetFleetsClientDiagnostics, Pipeline, "DatabaseFleetCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -279,11 +279,11 @@ public virtual async Task> ExistsAsync(string fleetName, Cancella { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Exists"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.Exists"); scope.Start(); try { - var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -314,11 +314,11 @@ public virtual Response Exists(string fleetName, CancellationToken cancell { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Exists"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.Exists"); scope.Start(); try { - var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken); + var response = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -345,18 +345,18 @@ public virtual Response Exists(string fleetName, CancellationToken cancell /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetIfExistsAsync(string fleetName, CancellationToken cancellationToken = default) + public virtual async Task> GetIfExistsAsync(string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.GetIfExists"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.GetIfExists"); scope.Start(); try { - var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -382,18 +382,18 @@ public virtual async Task> GetIfExistsAsync(stri /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual NullableResponse GetIfExists(string fleetName, CancellationToken cancellationToken = default) + public virtual NullableResponse GetIfExists(string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.GetIfExists"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.GetIfExists"); scope.Start(); try { - var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken); + var response = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -402,7 +402,7 @@ public virtual NullableResponse GetIfExists(string fleetName, Can } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -412,7 +412,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetData.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetData.cs similarity index 77% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetData.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetData.cs index 9879bb7583503..cebab4756eebb 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetData.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetData.cs @@ -14,18 +14,18 @@ namespace Azure.ResourceManager.DatabaseFleetManager { /// - /// A class representing the Fleet data model. + /// A class representing the DatabaseFleet data model. /// The Fleet resource. /// - public partial class FleetData : TrackedResourceData + public partial class DatabaseFleetData : TrackedResourceData { - /// Initializes a new instance of FleetData. + /// Initializes a new instance of DatabaseFleetData. /// The location. - public FleetData(AzureLocation location) : base(location) + public DatabaseFleetData(AzureLocation location) : base(location) { } - /// Initializes a new instance of FleetData. + /// Initializes a new instance of DatabaseFleetData. /// The id. /// The name. /// The resourceType. @@ -36,7 +36,7 @@ public FleetData(AzureLocation location) : base(location) /// Managed identity. /// The status of the last operation. /// The FleetHubProfile configures the Fleet's hub. - internal FleetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? eTag, ManagedServiceIdentity identity, FleetProvisioningState? provisioningState, FleetHubProfile hubProfile) : base(id, name, resourceType, systemData, tags, location) + internal DatabaseFleetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? eTag, ManagedServiceIdentity identity, FleetProvisioningState? provisioningState, FleetHubProfile hubProfile) : base(id, name, resourceType, systemData, tags, location) { ETag = eTag; Identity = identity; diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberCollection.cs similarity index 64% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberCollection.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberCollection.cs index c4c73b02627c2..d764da53c978b 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberCollection.cs @@ -20,28 +20,28 @@ namespace Azure.ResourceManager.DatabaseFleetManager { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetFleetMembers method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDatabaseFleetMembers method from an instance of . /// - public partial class FleetMemberCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DatabaseFleetMemberCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _fleetMemberClientDiagnostics; - private readonly FleetMembersRestOperations _fleetMemberRestClient; + private readonly ClientDiagnostics _databaseFleetMemberFleetMembersClientDiagnostics; + private readonly FleetMembersRestOperations _databaseFleetMemberFleetMembersRestClient; - /// Initializes a new instance of the class for mocking. - protected FleetMemberCollection() + /// Initializes a new instance of the class for mocking. + protected DatabaseFleetMemberCollection() { } - /// Initializes a new instance of the class. + /// 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 FleetMemberCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DatabaseFleetMemberCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _fleetMemberClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", FleetMemberResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(FleetMemberResource.ResourceType, out string fleetMemberApiVersion); - _fleetMemberRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetMemberApiVersion); + _databaseFleetMemberFleetMembersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", DatabaseFleetMemberResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DatabaseFleetMemberResource.ResourceType, out string databaseFleetMemberFleetMembersApiVersion); + _databaseFleetMemberFleetMembersRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetMemberFleetMembersApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal FleetMemberCollection(ArmClient client, ResourceIdentifier id) : base(c internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != FleetResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, FleetResource.ResourceType), nameof(id)); + if (id.ResourceType != DatabaseFleetResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DatabaseFleetResource.ResourceType), nameof(id)); } /// @@ -74,17 +74,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 fleetMemberName, FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fleetMemberName, DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.CreateOrUpdate"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _fleetMemberRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _databaseFleetMemberFleetMembersRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetMemberOperationSource(Client), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -117,17 +117,17 @@ public virtual async Task> CreateOrUpdateAsync /// 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 fleetMemberName, FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fleetMemberName, DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.CreateOrUpdate"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.CreateOrUpdate"); scope.Start(); try { - var response = _fleetMemberRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _databaseFleetMemberFleetMembersRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetMemberOperationSource(Client), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -156,18 +156,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string fleetMemberName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string fleetMemberName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.Get"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.Get"); scope.Start(); try { - var response = await _fleetMemberRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken).ConfigureAwait(false); + var response = await _databaseFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FleetMemberResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -193,18 +193,18 @@ public virtual async Task> GetAsync(string fleetMe /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string fleetMemberName, CancellationToken cancellationToken = default) + public virtual Response Get(string fleetMemberName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.Get"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.Get"); scope.Start(); try { - var response = _fleetMemberRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken); + var response = _databaseFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FleetMemberResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -227,12 +227,12 @@ public virtual Response Get(string fleetMemberName, Cancell /// /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetMemberRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetMemberRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FleetMemberResource(Client, FleetMemberData.DeserializeFleetMemberData(e)), _fleetMemberClientDiagnostics, Pipeline, "FleetMemberCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetMemberFleetMembersRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetMemberFleetMembersRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetMemberResource(Client, DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(e)), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, "DatabaseFleetMemberCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -249,12 +249,12 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetMemberRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetMemberRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FleetMemberResource(Client, FleetMemberData.DeserializeFleetMemberData(e)), _fleetMemberClientDiagnostics, Pipeline, "FleetMemberCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetMemberFleetMembersRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetMemberFleetMembersRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetMemberResource(Client, DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(e)), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, "DatabaseFleetMemberCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -278,11 +278,11 @@ public virtual async Task> ExistsAsync(string fleetMemberName, Ca { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.Exists"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.Exists"); scope.Start(); try { - var response = await _fleetMemberRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _databaseFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -313,11 +313,11 @@ public virtual Response Exists(string fleetMemberName, CancellationToken c { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.Exists"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.Exists"); scope.Start(); try { - var response = _fleetMemberRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken); + var response = _databaseFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -344,18 +344,18 @@ public virtual Response Exists(string fleetMemberName, CancellationToken c /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetIfExistsAsync(string fleetMemberName, CancellationToken cancellationToken = default) + public virtual async Task> GetIfExistsAsync(string fleetMemberName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.GetIfExists"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.GetIfExists"); scope.Start(); try { - var response = await _fleetMemberRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _databaseFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new FleetMemberResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -381,18 +381,18 @@ public virtual async Task> GetIfExistsAsyn /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual NullableResponse GetIfExists(string fleetMemberName, CancellationToken cancellationToken = default) + public virtual NullableResponse GetIfExists(string fleetMemberName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberCollection.GetIfExists"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.GetIfExists"); scope.Start(); try { - var response = _fleetMemberRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken); + var response = _databaseFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new FleetMemberResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -401,7 +401,7 @@ public virtual NullableResponse GetIfExists(string fleetMem } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -411,7 +411,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberData.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberData.cs similarity index 81% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberData.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberData.cs index 23a3b4995d558..61ac559f56c59 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberData.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberData.cs @@ -13,17 +13,17 @@ namespace Azure.ResourceManager.DatabaseFleetManager { /// - /// A class representing the FleetMember data model. + /// A class representing the DatabaseFleetMember data model. /// A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. /// - public partial class FleetMemberData : ResourceData + public partial class DatabaseFleetMemberData : ResourceData { - /// Initializes a new instance of FleetMemberData. - public FleetMemberData() + /// Initializes a new instance of DatabaseFleetMemberData. + public DatabaseFleetMemberData() { } - /// Initializes a new instance of FleetMemberData. + /// Initializes a new instance of DatabaseFleetMemberData. /// The id. /// The name. /// The resourceType. @@ -32,7 +32,7 @@ public FleetMemberData() /// The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. /// The group this member belongs to for multi-cluster update management. /// The status of the last operation. - internal FleetMemberData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, ResourceIdentifier clusterResourceId, string group, FleetMemberProvisioningState? provisioningState) : base(id, name, resourceType, systemData) + internal DatabaseFleetMemberData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, ResourceIdentifier clusterResourceId, string group, FleetMemberProvisioningState? provisioningState) : base(id, name, resourceType, systemData) { ETag = eTag; ClusterResourceId = clusterResourceId; diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberResource.cs similarity index 68% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberResource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberResource.cs index a8505fc94dd45..219d517b229e7 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetMemberResource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberResource.cs @@ -18,46 +18,46 @@ namespace Azure.ResourceManager.DatabaseFleetManager { /// - /// A Class representing a FleetMember along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetFleetMemberResource method. - /// Otherwise you can get one from its parent resource using the GetFleetMember method. + /// A Class representing a DatabaseFleetMember along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDatabaseFleetMemberResource method. + /// Otherwise you can get one from its parent resource using the GetDatabaseFleetMember method. /// - public partial class FleetMemberResource : ArmResource + public partial class DatabaseFleetMemberResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _fleetMemberClientDiagnostics; - private readonly FleetMembersRestOperations _fleetMemberRestClient; - private readonly FleetMemberData _data; + private readonly ClientDiagnostics _databaseFleetMemberFleetMembersClientDiagnostics; + private readonly FleetMembersRestOperations _databaseFleetMemberFleetMembersRestClient; + private readonly DatabaseFleetMemberData _data; - /// Initializes a new instance of the class for mocking. - protected FleetMemberResource() + /// Initializes a new instance of the class for mocking. + protected DatabaseFleetMemberResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal FleetMemberResource(ArmClient client, FleetMemberData data) : this(client, data.Id) + internal DatabaseFleetMemberResource(ArmClient client, DatabaseFleetMemberData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 FleetMemberResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DatabaseFleetMemberResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _fleetMemberClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string fleetMemberApiVersion); - _fleetMemberRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetMemberApiVersion); + _databaseFleetMemberFleetMembersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string databaseFleetMemberFleetMembersApiVersion); + _databaseFleetMemberFleetMembersRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetMemberFleetMembersApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -71,7 +71,7 @@ internal FleetMemberResource(ArmClient client, ResourceIdentifier id) : base(cli /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual FleetMemberData Data + public virtual DatabaseFleetMemberData Data { get { @@ -101,16 +101,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberResource.Get"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Get"); scope.Start(); try { - var response = await _fleetMemberRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _databaseFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FleetMemberResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -133,16 +133,16 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberResource.Get"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Get"); scope.Start(); try { - var response = _fleetMemberRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _databaseFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FleetMemberResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -169,12 +169,12 @@ public virtual Response Get(CancellationToken cancellationT /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberResource.Delete"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Delete"); scope.Start(); try { - var response = await _fleetMemberRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(_fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _databaseFleetMemberFleetMembersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(_databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -204,12 +204,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberResource.Delete"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Delete"); scope.Start(); try { - var response = _fleetMemberRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(_fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _databaseFleetMemberFleetMembersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(_databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -239,16 +239,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// The request should only proceed if an entity matches this string. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, FleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatabaseFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberResource.Update"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Update"); scope.Start(); try { - var response = await _fleetMemberRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _databaseFleetMemberFleetMembersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetMemberOperationSource(Client), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -278,16 +278,16 @@ public virtual async Task> UpdateAsync(WaitUnt /// The request should only proceed if an entity matches this string. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, FleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DatabaseFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _fleetMemberClientDiagnostics.CreateScope("FleetMemberResource.Update"); + using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Update"); scope.Start(); try { - var response = _fleetMemberRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new FleetMemberOperationSource(Client), _fleetMemberClientDiagnostics, Pipeline, _fleetMemberRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _databaseFleetMemberFleetMembersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetMemberOperationSource(Client), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetResource.cs similarity index 73% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetResource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetResource.cs index 70ee0dadb1d85..fdd9eccaed673 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetResource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetResource.cs @@ -20,46 +20,46 @@ namespace Azure.ResourceManager.DatabaseFleetManager { /// - /// A Class representing a Fleet along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetFleetResource method. - /// Otherwise you can get one from its parent resource using the GetFleet method. + /// A Class representing a DatabaseFleet along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDatabaseFleetResource method. + /// Otherwise you can get one from its parent resource using the GetDatabaseFleet method. /// - public partial class FleetResource : ArmResource + public partial class DatabaseFleetResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _fleetClientDiagnostics; - private readonly FleetsRestOperations _fleetRestClient; - private readonly FleetData _data; + private readonly ClientDiagnostics _databaseFleetFleetsClientDiagnostics; + private readonly FleetsRestOperations _databaseFleetFleetsRestClient; + private readonly DatabaseFleetData _data; - /// Initializes a new instance of the class for mocking. - protected FleetResource() + /// Initializes a new instance of the class for mocking. + protected DatabaseFleetResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal FleetResource(ArmClient client, FleetData data) : this(client, data.Id) + internal DatabaseFleetResource(ArmClient client, DatabaseFleetData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 FleetResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DatabaseFleetResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _fleetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string fleetApiVersion); - _fleetRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetApiVersion); + _databaseFleetFleetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string databaseFleetFleetsApiVersion); + _databaseFleetFleetsRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetFleetsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -73,7 +73,7 @@ internal FleetResource(ArmClient client, ResourceIdentifier id) : base(client, i /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual FleetData Data + public virtual DatabaseFleetData Data { get { @@ -89,11 +89,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of FleetMemberResources in the Fleet. - /// An object representing collection of FleetMemberResources and their operations over a FleetMemberResource. - public virtual FleetMemberCollection GetFleetMembers() + /// Gets a collection of DatabaseFleetMemberResources in the DatabaseFleet. + /// An object representing collection of DatabaseFleetMemberResources and their operations over a DatabaseFleetMemberResource. + public virtual DatabaseFleetMemberCollection GetDatabaseFleetMembers() { - return GetCachedClient(Client => new FleetMemberCollection(Client, Id)); + return GetCachedClient(Client => new DatabaseFleetMemberCollection(Client, Id)); } /// @@ -114,9 +114,9 @@ public virtual FleetMemberCollection GetFleetMembers() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetFleetMemberAsync(string fleetMemberName, CancellationToken cancellationToken = default) + public virtual async Task> GetDatabaseFleetMemberAsync(string fleetMemberName, CancellationToken cancellationToken = default) { - return await GetFleetMembers().GetAsync(fleetMemberName, cancellationToken).ConfigureAwait(false); + return await GetDatabaseFleetMembers().GetAsync(fleetMemberName, cancellationToken).ConfigureAwait(false); } /// @@ -137,16 +137,16 @@ public virtual async Task> GetFleetMemberAsync(str /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetFleetMember(string fleetMemberName, CancellationToken cancellationToken = default) + public virtual Response GetDatabaseFleetMember(string fleetMemberName, CancellationToken cancellationToken = default) { - return GetFleetMembers().Get(fleetMemberName, cancellationToken); + return GetDatabaseFleetMembers().Get(fleetMemberName, cancellationToken); } - /// Gets a collection of UpdateRunResources in the Fleet. - /// An object representing collection of UpdateRunResources and their operations over a UpdateRunResource. - public virtual UpdateRunCollection GetUpdateRuns() + /// Gets a collection of DatabaseFleetUpdateRunResources in the DatabaseFleet. + /// An object representing collection of DatabaseFleetUpdateRunResources and their operations over a DatabaseFleetUpdateRunResource. + public virtual DatabaseFleetUpdateRunCollection GetDatabaseFleetUpdateRuns() { - return GetCachedClient(Client => new UpdateRunCollection(Client, Id)); + return GetCachedClient(Client => new DatabaseFleetUpdateRunCollection(Client, Id)); } /// @@ -167,9 +167,9 @@ public virtual UpdateRunCollection GetUpdateRuns() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetUpdateRunAsync(string updateRunName, CancellationToken cancellationToken = default) + public virtual async Task> GetDatabaseFleetUpdateRunAsync(string updateRunName, CancellationToken cancellationToken = default) { - return await GetUpdateRuns().GetAsync(updateRunName, cancellationToken).ConfigureAwait(false); + return await GetDatabaseFleetUpdateRuns().GetAsync(updateRunName, cancellationToken).ConfigureAwait(false); } /// @@ -190,9 +190,9 @@ public virtual async Task> GetUpdateRunAsync(string /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetUpdateRun(string updateRunName, CancellationToken cancellationToken = default) + public virtual Response GetDatabaseFleetUpdateRun(string updateRunName, CancellationToken cancellationToken = default) { - return GetUpdateRuns().Get(updateRunName, cancellationToken); + return GetDatabaseFleetUpdateRuns().Get(updateRunName, cancellationToken); } /// @@ -209,16 +209,16 @@ public virtual Response GetUpdateRun(string updateRunName, Ca /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Get"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Get"); scope.Start(); try { - var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -241,16 +241,16 @@ public virtual async Task> GetAsync(CancellationToken ca /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Get"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Get"); scope.Start(); try { - var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -277,12 +277,12 @@ public virtual Response Get(CancellationToken cancellationToken = /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Delete"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Delete"); scope.Start(); try { - var response = await _fleetRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(_fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _databaseFleetFleetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(_databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -312,12 +312,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Delete"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Delete"); scope.Start(); try { - var response = _fleetRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(_fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _databaseFleetFleetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(_databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -347,16 +347,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// The request should only proceed if an entity matches this string. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, FleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatabaseFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Update"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Update"); scope.Start(); try { - var response = await _fleetRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _databaseFleetFleetsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetOperationSource(Client), _databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -386,16 +386,16 @@ public virtual async Task> UpdateAsync(WaitUntil wai /// The request should only proceed if an entity matches this string. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, FleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DatabaseFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Update"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Update"); scope.Start(); try { - var response = _fleetRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _databaseFleetFleetsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetOperationSource(Client), _databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -423,11 +423,11 @@ public virtual ArmOperation Update(WaitUntil waitUntil, FleetPatc /// The cancellation token to use. public virtual async Task> GetCredentialsAsync(CancellationToken cancellationToken = default) { - using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.GetCredentials"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.GetCredentials"); scope.Start(); try { - var response = await _fleetRestClient.ListCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _databaseFleetFleetsRestClient.ListCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -453,11 +453,11 @@ public virtual async Task> GetCredentialsAsync( /// The cancellation token to use. public virtual Response GetCredentials(CancellationToken cancellationToken = default) { - using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.GetCredentials"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.GetCredentials"); scope.Start(); try { - var response = _fleetRestClient.ListCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _databaseFleetFleetsRestClient.ListCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -484,12 +484,12 @@ public virtual Response GetCredentials(CancellationToken /// 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) + 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 = _fleetClientDiagnostics.CreateScope("FleetResource.AddTag"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.AddTag"); scope.Start(); try { @@ -498,13 +498,13 @@ public virtual async Task> AddTagAsync(string key, strin 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 _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new FleetPatch(); + var patch = new DatabaseFleetPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -538,12 +538,12 @@ public virtual async Task> AddTagAsync(string key, strin /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.AddTag"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.AddTag"); scope.Start(); try { @@ -552,13 +552,13 @@ public virtual Response AddTag(string key, string value, Cancella var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new FleetPatch(); + var patch = new DatabaseFleetPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -591,11 +591,11 @@ public virtual Response AddTag(string key, string value, Cancella /// 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) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.SetTags"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.SetTags"); scope.Start(); try { @@ -605,13 +605,13 @@ public virtual async Task> SetTagsAsync(IDictionary> SetTagsAsync(IDictionary The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.SetTags"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.SetTags"); scope.Start(); try { @@ -654,13 +654,13 @@ public virtual Response SetTags(IDictionary tags, var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new FleetPatch(); + var patch = new DatabaseFleetPatch(); patch.Tags.ReplaceWith(tags); var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -689,11 +689,11 @@ public virtual Response SetTags(IDictionary tags, /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.RemoveTag"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.RemoveTag"); scope.Start(); try { @@ -702,13 +702,13 @@ public virtual async Task> RemoveTagAsync(string key, Ca 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 _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new FleetPatch(); + var patch = new DatabaseFleetPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -741,11 +741,11 @@ public virtual async Task> RemoveTagAsync(string key, Ca /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.RemoveTag"); + using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.RemoveTag"); scope.Start(); try { @@ -754,13 +754,13 @@ public virtual Response RemoveTag(string key, CancellationToken c var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new FleetPatch(); + var patch = new DatabaseFleetPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunCollection.cs similarity index 64% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunCollection.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunCollection.cs index 2fb984834df47..7ab5e958d5993 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunCollection.cs @@ -20,28 +20,28 @@ namespace Azure.ResourceManager.DatabaseFleetManager { /// - /// 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 GetUpdateRuns method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDatabaseFleetUpdateRuns method from an instance of . /// - public partial class UpdateRunCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DatabaseFleetUpdateRunCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _updateRunClientDiagnostics; - private readonly UpdateRunsRestOperations _updateRunRestClient; + private readonly ClientDiagnostics _databaseFleetUpdateRunUpdateRunsClientDiagnostics; + private readonly UpdateRunsRestOperations _databaseFleetUpdateRunUpdateRunsRestClient; - /// Initializes a new instance of the class for mocking. - protected UpdateRunCollection() + /// Initializes a new instance of the class for mocking. + protected DatabaseFleetUpdateRunCollection() { } - /// Initializes a new instance of the class. + /// 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 UpdateRunCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DatabaseFleetUpdateRunCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _updateRunClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", UpdateRunResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(UpdateRunResource.ResourceType, out string updateRunApiVersion); - _updateRunRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, updateRunApiVersion); + _databaseFleetUpdateRunUpdateRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", DatabaseFleetUpdateRunResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DatabaseFleetUpdateRunResource.ResourceType, out string databaseFleetUpdateRunUpdateRunsApiVersion); + _databaseFleetUpdateRunUpdateRunsRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetUpdateRunUpdateRunsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal UpdateRunCollection(ArmClient client, ResourceIdentifier id) : base(cli internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != FleetResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, FleetResource.ResourceType), nameof(id)); + if (id.ResourceType != DatabaseFleetResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DatabaseFleetResource.ResourceType), nameof(id)); } /// @@ -74,17 +74,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 updateRunName, UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string updateRunName, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.CreateOrUpdate"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _updateRunRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _databaseFleetUpdateRunUpdateRunsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -117,17 +117,17 @@ public virtual async Task> CreateOrUpdateAsync(W /// 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 updateRunName, UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string updateRunName, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.CreateOrUpdate"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.CreateOrUpdate"); scope.Start(); try { - var response = _updateRunRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _databaseFleetUpdateRunUpdateRunsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -156,18 +156,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string updateRunName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string updateRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.Get"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.Get"); scope.Start(); try { - var response = await _updateRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken).ConfigureAwait(false); + var response = await _databaseFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new UpdateRunResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -193,18 +193,18 @@ public virtual async Task> GetAsync(string updateRun /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string updateRunName, CancellationToken cancellationToken = default) + public virtual Response Get(string updateRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.Get"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.Get"); scope.Start(); try { - var response = _updateRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken); + var response = _databaseFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new UpdateRunResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -227,12 +227,12 @@ public virtual Response Get(string updateRunName, Cancellatio /// /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _updateRunRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _updateRunRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new UpdateRunResource(Client, UpdateRunData.DeserializeUpdateRunData(e)), _updateRunClientDiagnostics, Pipeline, "UpdateRunCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetUpdateRunUpdateRunsRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetUpdateRunUpdateRunsRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetUpdateRunResource(Client, DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(e)), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, "DatabaseFleetUpdateRunCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -249,12 +249,12 @@ public virtual AsyncPageable GetAllAsync(CancellationToken ca /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _updateRunRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _updateRunRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new UpdateRunResource(Client, UpdateRunData.DeserializeUpdateRunData(e)), _updateRunClientDiagnostics, Pipeline, "UpdateRunCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetUpdateRunUpdateRunsRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetUpdateRunUpdateRunsRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetUpdateRunResource(Client, DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(e)), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, "DatabaseFleetUpdateRunCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -278,11 +278,11 @@ public virtual async Task> ExistsAsync(string updateRunName, Canc { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.Exists"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.Exists"); scope.Start(); try { - var response = await _updateRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _databaseFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -313,11 +313,11 @@ public virtual Response Exists(string updateRunName, CancellationToken can { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.Exists"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.Exists"); scope.Start(); try { - var response = _updateRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken); + var response = _databaseFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -344,18 +344,18 @@ public virtual Response Exists(string updateRunName, CancellationToken can /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetIfExistsAsync(string updateRunName, CancellationToken cancellationToken = default) + public virtual async Task> GetIfExistsAsync(string updateRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.GetIfExists"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.GetIfExists"); scope.Start(); try { - var response = await _updateRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _databaseFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new UpdateRunResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -381,18 +381,18 @@ public virtual async Task> GetIfExistsAsync( /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual NullableResponse GetIfExists(string updateRunName, CancellationToken cancellationToken = default) + public virtual NullableResponse GetIfExists(string updateRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunCollection.GetIfExists"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.GetIfExists"); scope.Start(); try { - var response = _updateRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken); + var response = _databaseFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new UpdateRunResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -401,7 +401,7 @@ public virtual NullableResponse GetIfExists(string updateRunN } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -411,7 +411,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunData.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunData.cs similarity index 75% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunData.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunData.cs index 40ff392462a59..772fc6730a748 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunData.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunData.cs @@ -14,17 +14,17 @@ namespace Azure.ResourceManager.DatabaseFleetManager { /// - /// A class representing the UpdateRun data model. + /// A class representing the DatabaseFleetUpdateRun data model. /// An UpdateRun is a multi-stage process to perform update operations across members of a Fleet. /// - public partial class UpdateRunData : ResourceData + public partial class DatabaseFleetUpdateRunData : ResourceData { - /// Initializes a new instance of UpdateRunData. - public UpdateRunData() + /// Initializes a new instance of DatabaseFleetUpdateRunData. + public DatabaseFleetUpdateRunData() { } - /// Initializes a new instance of UpdateRunData. + /// Initializes a new instance of DatabaseFleetUpdateRunData. /// The id. /// The name. /// The resourceType. @@ -38,7 +38,7 @@ public UpdateRunData() /// /// The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started. /// The status of the UpdateRun. - internal UpdateRunData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, UpdateRunProvisioningState? provisioningState, UpdateRunStrategy strategy, ManagedClusterUpdate managedClusterUpdate, UpdateRunStatus status) : base(id, name, resourceType, systemData) + internal DatabaseFleetUpdateRunData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, FleetUpdateRunProvisioningState? provisioningState, FleetUpdateRunStrategy strategy, FleetManagedClusterUpdate managedClusterUpdate, FleetUpdateRunStatus status) : base(id, name, resourceType, systemData) { ETag = eTag; ProvisioningState = provisioningState; @@ -50,23 +50,23 @@ internal UpdateRunData(ResourceIdentifier id, string name, ResourceType resource /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. public ETag? ETag { get; } /// The provisioning state of the UpdateRun resource. - public UpdateRunProvisioningState? ProvisioningState { get; } + public FleetUpdateRunProvisioningState? ProvisioningState { get; } /// /// The strategy defines the order in which the clusters will be updated. /// If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single UpdateGroup targeting all members. /// The strategy of the UpdateRun can be modified until the run is started. /// - internal UpdateRunStrategy Strategy { get; set; } + internal FleetUpdateRunStrategy Strategy { get; set; } /// The list of stages that compose this update run. - public IList StrategyStages + public IList StrategyStages { get => Strategy is null ? default : Strategy.Stages; - set => Strategy = new UpdateRunStrategy(value); + set => Strategy = new FleetUpdateRunStrategy(value); } /// The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started. - public ManagedClusterUpdate ManagedClusterUpdate { get; set; } + public FleetManagedClusterUpdate ManagedClusterUpdate { get; set; } /// The status of the UpdateRun. - public UpdateRunStatus Status { get; } + public FleetUpdateRunStatus Status { get; } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunResource.cs similarity index 67% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunResource.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunResource.cs index 10037060ad419..43a9373811061 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/UpdateRunResource.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunResource.cs @@ -17,46 +17,46 @@ namespace Azure.ResourceManager.DatabaseFleetManager { /// - /// A Class representing an UpdateRun 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 GetUpdateRunResource method. - /// Otherwise you can get one from its parent resource using the GetUpdateRun method. + /// A Class representing a DatabaseFleetUpdateRun along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDatabaseFleetUpdateRunResource method. + /// Otherwise you can get one from its parent resource using the GetDatabaseFleetUpdateRun method. /// - public partial class UpdateRunResource : ArmResource + public partial class DatabaseFleetUpdateRunResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _updateRunClientDiagnostics; - private readonly UpdateRunsRestOperations _updateRunRestClient; - private readonly UpdateRunData _data; + private readonly ClientDiagnostics _databaseFleetUpdateRunUpdateRunsClientDiagnostics; + private readonly UpdateRunsRestOperations _databaseFleetUpdateRunUpdateRunsRestClient; + private readonly DatabaseFleetUpdateRunData _data; - /// Initializes a new instance of the class for mocking. - protected UpdateRunResource() + /// Initializes a new instance of the class for mocking. + protected DatabaseFleetUpdateRunResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal UpdateRunResource(ArmClient client, UpdateRunData data) : this(client, data.Id) + internal DatabaseFleetUpdateRunResource(ArmClient client, DatabaseFleetUpdateRunData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 UpdateRunResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DatabaseFleetUpdateRunResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _updateRunClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string updateRunApiVersion); - _updateRunRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, updateRunApiVersion); + _databaseFleetUpdateRunUpdateRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string databaseFleetUpdateRunUpdateRunsApiVersion); + _databaseFleetUpdateRunUpdateRunsRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetUpdateRunUpdateRunsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -70,7 +70,7 @@ internal UpdateRunResource(ArmClient client, ResourceIdentifier id) : base(clien /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual UpdateRunData Data + public virtual DatabaseFleetUpdateRunData Data { get { @@ -100,16 +100,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Get"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Get"); scope.Start(); try { - var response = await _updateRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _databaseFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new UpdateRunResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -132,16 +132,16 @@ public virtual async Task> GetAsync(CancellationToke /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Get"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Get"); scope.Start(); try { - var response = _updateRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _databaseFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new UpdateRunResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -168,12 +168,12 @@ public virtual Response Get(CancellationToken cancellationTok /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Delete"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Delete"); scope.Start(); try { - var response = await _updateRunRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(_updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _databaseFleetUpdateRunUpdateRunsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(_databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -203,12 +203,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Delete"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Delete"); scope.Start(); try { - var response = _updateRunRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(_updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _databaseFleetUpdateRunUpdateRunsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(_databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -239,16 +239,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// The request should only proceed if no entity matches this string. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Update"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Update"); scope.Start(); try { - var response = await _updateRunRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _databaseFleetUpdateRunUpdateRunsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -279,16 +279,16 @@ public virtual async Task> UpdateAsync(WaitUntil /// The request should only proceed if no entity matches this string. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Update"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Update"); scope.Start(); try { - var response = _updateRunRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _databaseFleetUpdateRunUpdateRunsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -316,14 +316,14 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Updat /// 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 request should only proceed if an entity matches this string. /// The cancellation token to use. - public virtual async Task> StartAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> StartAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Start"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Start"); scope.Start(); try { - var response = await _updateRunRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _databaseFleetUpdateRunUpdateRunsRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -351,14 +351,14 @@ public virtual async Task> StartAsync(WaitUntil /// 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 request should only proceed if an entity matches this string. /// The cancellation token to use. - public virtual ArmOperation Start(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Start(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Start"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Start"); scope.Start(); try { - var response = _updateRunRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _databaseFleetUpdateRunUpdateRunsRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -386,14 +386,14 @@ public virtual ArmOperation Start(WaitUntil waitUntil, string /// 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 request should only proceed if an entity matches this string. /// The cancellation token to use. - public virtual async Task> StopAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> StopAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Stop"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Stop"); scope.Start(); try { - var response = await _updateRunRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _databaseFleetUpdateRunUpdateRunsRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -421,14 +421,14 @@ public virtual async Task> StopAsync(WaitUntil w /// 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 request should only proceed if an entity matches this string. /// The cancellation token to use. - public virtual ArmOperation Stop(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Stop(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _updateRunClientDiagnostics.CreateScope("UpdateRunResource.Stop"); + using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Stop"); scope.Start(); try { - var response = _updateRunRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new UpdateRunOperationSource(Client), _updateRunClientDiagnostics, Pipeline, _updateRunRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _databaseFleetUpdateRunUpdateRunsRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs index 5be10c22831ce..0ed163b3dbe31 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs @@ -49,69 +49,69 @@ private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtens return new SubscriptionResourceExtensionClient(client, scope); }); } - #region FleetResource + #region DatabaseFleetResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static FleetResource GetFleetResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DatabaseFleetResource GetDatabaseFleetResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - FleetResource.ValidateResourceId(id); - return new FleetResource(client, id); + DatabaseFleetResource.ValidateResourceId(id); + return new DatabaseFleetResource(client, id); } ); } #endregion - #region FleetMemberResource + #region DatabaseFleetMemberResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static FleetMemberResource GetFleetMemberResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DatabaseFleetMemberResource GetDatabaseFleetMemberResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - FleetMemberResource.ValidateResourceId(id); - return new FleetMemberResource(client, id); + DatabaseFleetMemberResource.ValidateResourceId(id); + return new DatabaseFleetMemberResource(client, id); } ); } #endregion - #region UpdateRunResource + #region DatabaseFleetUpdateRunResource /// - /// 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. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static UpdateRunResource GetUpdateRunResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DatabaseFleetUpdateRunResource GetDatabaseFleetUpdateRunResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - UpdateRunResource.ValidateResourceId(id); - return new UpdateRunResource(client, id); + DatabaseFleetUpdateRunResource.ValidateResourceId(id); + return new DatabaseFleetUpdateRunResource(client, id); } ); } #endregion - /// Gets a collection of FleetResources in the ResourceGroupResource. + /// Gets a collection of DatabaseFleetResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of FleetResources and their operations over a FleetResource. - public static FleetCollection GetFleets(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of DatabaseFleetResources and their operations over a DatabaseFleetResource. + public static DatabaseFleetCollection GetDatabaseFleets(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetFleets(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetDatabaseFleets(); } /// @@ -133,9 +133,9 @@ public static FleetCollection GetFleets(this ResourceGroupResource resourceGroup /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static async Task> GetFleetAsync(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default) + public static async Task> GetDatabaseFleetAsync(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetFleets().GetAsync(fleetName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetDatabaseFleets().GetAsync(fleetName, cancellationToken).ConfigureAwait(false); } /// @@ -157,9 +157,9 @@ public static async Task> GetFleetAsync(this ResourceGro /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static Response GetFleet(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default) + public static Response GetDatabaseFleet(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetFleets().Get(fleetName, cancellationToken); + return resourceGroupResource.GetDatabaseFleets().Get(fleetName, cancellationToken); } /// @@ -177,10 +177,10 @@ public static Response GetFleet(this ResourceGroupResource resour /// /// The instance the method will execute against. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetFleetsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDatabaseFleetsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetFleetsAsync(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDatabaseFleetsAsync(cancellationToken); } /// @@ -198,10 +198,10 @@ public static AsyncPageable GetFleetsAsync(this SubscriptionResou /// /// The instance the method will execute against. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetFleets(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDatabaseFleets(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetFleets(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDatabaseFleets(cancellationToken); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs index 4c9c10be03630..0e28b7080602e 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -31,11 +31,11 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// Gets a collection of FleetResources in the ResourceGroupResource. - /// An object representing collection of FleetResources and their operations over a FleetResource. - public virtual FleetCollection GetFleets() + /// Gets a collection of DatabaseFleetResources in the ResourceGroupResource. + /// An object representing collection of DatabaseFleetResources and their operations over a DatabaseFleetResource. + public virtual DatabaseFleetCollection GetDatabaseFleets() { - return GetCachedClient(Client => new FleetCollection(Client, Id)); + return GetCachedClient(Client => new DatabaseFleetCollection(Client, Id)); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 52790145671d5..e19ae88235b0c 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -17,8 +17,8 @@ namespace Azure.ResourceManager.DatabaseFleetManager /// A class to add extension methods to SubscriptionResource. internal partial class SubscriptionResourceExtensionClient : ArmResource { - private ClientDiagnostics _fleetClientDiagnostics; - private FleetsRestOperations _fleetRestClient; + private ClientDiagnostics _databaseFleetFleetsClientDiagnostics; + private FleetsRestOperations _databaseFleetFleetsRestClient; /// Initializes a new instance of the class for mocking. protected SubscriptionResourceExtensionClient() @@ -32,8 +32,8 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie { } - private ClientDiagnostics FleetClientDiagnostics => _fleetClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", FleetResource.ResourceType.Namespace, Diagnostics); - private FleetsRestOperations FleetRestClient => _fleetRestClient ??= new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(FleetResource.ResourceType)); + private ClientDiagnostics DatabaseFleetFleetsClientDiagnostics => _databaseFleetFleetsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", DatabaseFleetResource.ResourceType.Namespace, Diagnostics); + private FleetsRestOperations DatabaseFleetFleetsRestClient => _databaseFleetFleetsRestClient ??= new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DatabaseFleetResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -55,12 +55,12 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetFleetsAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDatabaseFleetsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => FleetRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FleetRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), FleetClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetFleets", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DatabaseFleetFleetsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DatabaseFleetFleetsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetResource(Client, DatabaseFleetData.DeserializeDatabaseFleetData(e)), DatabaseFleetFleetsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDatabaseFleets", "value", "nextLink", cancellationToken); } /// @@ -77,12 +77,12 @@ public virtual AsyncPageable GetFleetsAsync(CancellationToken can /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetFleets(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDatabaseFleets(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => FleetRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FleetRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), FleetClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetFleets", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DatabaseFleetFleetsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DatabaseFleetFleetsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetResource(Client, DatabaseFleetData.DeserializeDatabaseFleetData(e)), DatabaseFleetFleetsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDatabaseFleets", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetMemberOperationSource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetMemberOperationSource.cs new file mode 100644 index 0000000000000..f5cd6ee59d422 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetMemberOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal class DatabaseFleetMemberOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DatabaseFleetMemberOperationSource(ArmClient client) + { + _client = client; + } + + DatabaseFleetMemberResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(document.RootElement); + return new DatabaseFleetMemberResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(document.RootElement); + return new DatabaseFleetMemberResource(_client, data); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetOperationSource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetOperationSource.cs new file mode 100644 index 0000000000000..642cbbd2af375 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal class DatabaseFleetOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DatabaseFleetOperationSource(ArmClient client) + { + _client = client; + } + + DatabaseFleetResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DatabaseFleetData.DeserializeDatabaseFleetData(document.RootElement); + return new DatabaseFleetResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DatabaseFleetData.DeserializeDatabaseFleetData(document.RootElement); + return new DatabaseFleetResource(_client, data); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetUpdateRunOperationSource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetUpdateRunOperationSource.cs new file mode 100644 index 0000000000000..a827cb262a6ef --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetUpdateRunOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal class DatabaseFleetUpdateRunOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DatabaseFleetUpdateRunOperationSource(ArmClient client) + { + _client = client; + } + + DatabaseFleetUpdateRunResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(document.RootElement); + return new DatabaseFleetUpdateRunResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(document.RootElement); + return new DatabaseFleetUpdateRunResource(_client, data); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs deleted file mode 100644 index bcd7e0931e8d7..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetMemberOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DatabaseFleetManager -{ - internal class FleetMemberOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal FleetMemberOperationSource(ArmClient client) - { - _client = client; - } - - FleetMemberResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = FleetMemberData.DeserializeFleetMemberData(document.RootElement); - return new FleetMemberResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = FleetMemberData.DeserializeFleetMemberData(document.RootElement); - return new FleetMemberResource(_client, data); - } - } -} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetOperationSource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetOperationSource.cs deleted file mode 100644 index 0c5c38335fde7..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DatabaseFleetManager -{ - internal class FleetOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal FleetOperationSource(ArmClient client) - { - _client = client; - } - - FleetResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = FleetData.DeserializeFleetData(document.RootElement); - return new FleetResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = FleetData.DeserializeFleetData(document.RootElement); - return new FleetResource(_client, data); - } - } -} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs deleted file mode 100644 index cf1e3a75a2bd4..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/UpdateRunOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DatabaseFleetManager -{ - internal class UpdateRunOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal UpdateRunOperationSource(ArmClient client) - { - _client = client; - } - - UpdateRunResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = UpdateRunData.DeserializeUpdateRunData(document.RootElement); - return new UpdateRunResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = UpdateRunData.DeserializeUpdateRunData(document.RootElement); - return new UpdateRunResource(_client, data); - } - } -} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetData.Serialization.cs similarity index 94% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetData.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetData.Serialization.cs index b812a6bce5efa..0e112257e018e 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetData.Serialization.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager { - public partial class FleetData : IUtf8JsonSerializable + public partial class DatabaseFleetData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -48,7 +48,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static FleetData DeserializeFleetData(JsonElement element) + internal static DatabaseFleetData DeserializeDatabaseFleetData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -158,7 +158,7 @@ internal static FleetData DeserializeFleetData(JsonElement element) continue; } } - return new FleetData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(eTag), identity, Optional.ToNullable(provisioningState), hubProfile.Value); + return new DatabaseFleetData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(eTag), identity, Optional.ToNullable(provisioningState), hubProfile.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetListResult.Serialization.cs similarity index 72% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetListResult.Serialization.cs index cb94a913c0aee..fb5b785d54bc9 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetListResult.Serialization.cs @@ -13,24 +13,24 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - internal partial class FleetListResult + internal partial class DatabaseFleetListResult { - internal static FleetListResult DeserializeFleetListResult(JsonElement element) + internal static DatabaseFleetListResult DeserializeDatabaseFleetListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(FleetData.DeserializeFleetData(item)); + array.Add(DatabaseFleetData.DeserializeDatabaseFleetData(item)); } value = array; continue; @@ -45,7 +45,7 @@ internal static FleetListResult DeserializeFleetListResult(JsonElement element) continue; } } - return new FleetListResult(value, nextLink.Value); + return new DatabaseFleetListResult(value, nextLink.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetListResult.cs similarity index 70% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetListResult.cs index df96bc150f271..f87c68cbc5036 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetListResult.cs @@ -14,29 +14,29 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The response of a Fleet list operation. - internal partial class FleetListResult + internal partial class DatabaseFleetListResult { - /// Initializes a new instance of FleetListResult. + /// Initializes a new instance of DatabaseFleetListResult. /// The Fleet items on this page. /// is null. - internal FleetListResult(IEnumerable value) + internal DatabaseFleetListResult(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); Value = value.ToList(); } - /// Initializes a new instance of FleetListResult. + /// Initializes a new instance of DatabaseFleetListResult. /// The Fleet items on this page. /// The link to the next page of items. - internal FleetListResult(IReadOnlyList value, Uri nextLink) + internal DatabaseFleetListResult(IReadOnlyList value, Uri nextLink) { Value = value; NextLink = nextLink; } /// The Fleet items on this page. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberData.Serialization.cs similarity index 92% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberData.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberData.Serialization.cs index ce4ee6dc441da..3b4a63c010876 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager { - public partial class FleetMemberData : IUtf8JsonSerializable + public partial class DatabaseFleetMemberData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -34,7 +34,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static FleetMemberData DeserializeFleetMemberData(JsonElement element) + internal static DatabaseFleetMemberData DeserializeDatabaseFleetMemberData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -119,7 +119,7 @@ internal static FleetMemberData DeserializeFleetMemberData(JsonElement element) continue; } } - return new FleetMemberData(id, name, type, systemData.Value, Optional.ToNullable(eTag), clusterResourceId.Value, group.Value, Optional.ToNullable(provisioningState)); + return new DatabaseFleetMemberData(id, name, type, systemData.Value, Optional.ToNullable(eTag), clusterResourceId.Value, group.Value, Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberListResult.Serialization.cs similarity index 70% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunListResult.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberListResult.Serialization.cs index 64f1624aae0b0..cac46b02ec618 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunListResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberListResult.Serialization.cs @@ -13,24 +13,24 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - internal partial class UpdateRunListResult + internal partial class DatabaseFleetMemberListResult { - internal static UpdateRunListResult DeserializeUpdateRunListResult(JsonElement element) + internal static DatabaseFleetMemberListResult DeserializeDatabaseFleetMemberListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(UpdateRunData.DeserializeUpdateRunData(item)); + array.Add(DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(item)); } value = array; continue; @@ -45,7 +45,7 @@ internal static UpdateRunListResult DeserializeUpdateRunListResult(JsonElement e continue; } } - return new UpdateRunListResult(value, nextLink.Value); + return new DatabaseFleetMemberListResult(value, nextLink.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberListResult.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberListResult.cs similarity index 68% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberListResult.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberListResult.cs index 042bac037d613..5f72f3dee3f85 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberListResult.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberListResult.cs @@ -14,29 +14,29 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The response of a FleetMember list operation. - internal partial class FleetMemberListResult + internal partial class DatabaseFleetMemberListResult { - /// Initializes a new instance of FleetMemberListResult. + /// Initializes a new instance of DatabaseFleetMemberListResult. /// The FleetMember items on this page. /// is null. - internal FleetMemberListResult(IEnumerable value) + internal DatabaseFleetMemberListResult(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); Value = value.ToList(); } - /// Initializes a new instance of FleetMemberListResult. + /// Initializes a new instance of DatabaseFleetMemberListResult. /// The FleetMember items on this page. /// The link to the next page of items. - internal FleetMemberListResult(IReadOnlyList value, Uri nextLink) + internal DatabaseFleetMemberListResult(IReadOnlyList value, Uri nextLink) { Value = value; NextLink = nextLink; } /// The FleetMember items on this page. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberPatch.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberPatch.Serialization.cs similarity index 90% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberPatch.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberPatch.Serialization.cs index aebfecbfff3ca..2643648a61720 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberPatch.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberPatch.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - public partial class FleetMemberPatch : IUtf8JsonSerializable + public partial class DatabaseFleetMemberPatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberPatch.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberPatch.cs similarity index 71% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberPatch.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberPatch.cs index dab8266e7913c..050e7800e9f57 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberPatch.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberPatch.cs @@ -8,10 +8,10 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The type used for update operations of the FleetMember. - public partial class FleetMemberPatch + public partial class DatabaseFleetMemberPatch { - /// Initializes a new instance of FleetMemberPatch. - public FleetMemberPatch() + /// Initializes a new instance of DatabaseFleetMemberPatch. + public DatabaseFleetMemberPatch() { } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetPatch.Serialization.cs similarity index 93% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetPatch.Serialization.cs index 976eda4d34ff4..19ce4caa75c66 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetPatch.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - public partial class FleetPatch : IUtf8JsonSerializable + public partial class DatabaseFleetPatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetPatch.cs similarity index 80% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetPatch.cs index bcde1a1d4a754..f71f160cd99da 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetPatch.cs @@ -12,10 +12,10 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// Properties of a Fleet that can be patched. - public partial class FleetPatch + public partial class DatabaseFleetPatch { - /// Initializes a new instance of FleetPatch. - public FleetPatch() + /// Initializes a new instance of DatabaseFleetPatch. + public DatabaseFleetPatch() { Tags = new ChangeTrackingDictionary(); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunData.Serialization.cs similarity index 79% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunData.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunData.Serialization.cs index efced1631d735..ac086cb4daf29 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager { - public partial class UpdateRunData : IUtf8JsonSerializable + public partial class DatabaseFleetUpdateRunData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -34,7 +34,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static UpdateRunData DeserializeUpdateRunData(JsonElement element) + internal static DatabaseFleetUpdateRunData DeserializeDatabaseFleetUpdateRunData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -45,10 +45,10 @@ internal static UpdateRunData DeserializeUpdateRunData(JsonElement element) string name = default; ResourceType type = default; Optional systemData = default; - Optional provisioningState = default; - Optional strategy = default; - Optional managedClusterUpdate = default; - Optional status = default; + Optional provisioningState = default; + Optional strategy = default; + Optional managedClusterUpdate = default; + Optional status = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("eTag"u8)) @@ -99,7 +99,7 @@ internal static UpdateRunData DeserializeUpdateRunData(JsonElement element) { continue; } - provisioningState = new UpdateRunProvisioningState(property0.Value.GetString()); + provisioningState = new FleetUpdateRunProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("strategy"u8)) @@ -108,7 +108,7 @@ internal static UpdateRunData DeserializeUpdateRunData(JsonElement element) { continue; } - strategy = UpdateRunStrategy.DeserializeUpdateRunStrategy(property0.Value); + strategy = FleetUpdateRunStrategy.DeserializeFleetUpdateRunStrategy(property0.Value); continue; } if (property0.NameEquals("managedClusterUpdate"u8)) @@ -117,7 +117,7 @@ internal static UpdateRunData DeserializeUpdateRunData(JsonElement element) { continue; } - managedClusterUpdate = ManagedClusterUpdate.DeserializeManagedClusterUpdate(property0.Value); + managedClusterUpdate = FleetManagedClusterUpdate.DeserializeFleetManagedClusterUpdate(property0.Value); continue; } if (property0.NameEquals("status"u8)) @@ -126,14 +126,14 @@ internal static UpdateRunData DeserializeUpdateRunData(JsonElement element) { continue; } - status = UpdateRunStatus.DeserializeUpdateRunStatus(property0.Value); + status = FleetUpdateRunStatus.DeserializeFleetUpdateRunStatus(property0.Value); continue; } } continue; } } - return new UpdateRunData(id, name, type, systemData.Value, Optional.ToNullable(eTag), Optional.ToNullable(provisioningState), strategy.Value, managedClusterUpdate.Value, status.Value); + return new DatabaseFleetUpdateRunData(id, name, type, systemData.Value, Optional.ToNullable(eTag), Optional.ToNullable(provisioningState), strategy.Value, managedClusterUpdate.Value, status.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunListResult.Serialization.cs similarity index 69% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberListResult.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunListResult.Serialization.cs index 46a5cc38ceb95..8159698fd7e9c 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberListResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunListResult.Serialization.cs @@ -13,24 +13,24 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - internal partial class FleetMemberListResult + internal partial class DatabaseFleetUpdateRunListResult { - internal static FleetMemberListResult DeserializeFleetMemberListResult(JsonElement element) + internal static DatabaseFleetUpdateRunListResult DeserializeDatabaseFleetUpdateRunListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(FleetMemberData.DeserializeFleetMemberData(item)); + array.Add(DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(item)); } value = array; continue; @@ -45,7 +45,7 @@ internal static FleetMemberListResult DeserializeFleetMemberListResult(JsonEleme continue; } } - return new FleetMemberListResult(value, nextLink.Value); + return new DatabaseFleetUpdateRunListResult(value, nextLink.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunListResult.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunListResult.cs similarity index 67% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunListResult.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunListResult.cs index cf3bc969e6ba6..7020492252cea 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunListResult.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunListResult.cs @@ -14,29 +14,29 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The response of a UpdateRun list operation. - internal partial class UpdateRunListResult + internal partial class DatabaseFleetUpdateRunListResult { - /// Initializes a new instance of UpdateRunListResult. + /// Initializes a new instance of DatabaseFleetUpdateRunListResult. /// The UpdateRun items on this page. /// is null. - internal UpdateRunListResult(IEnumerable value) + internal DatabaseFleetUpdateRunListResult(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); Value = value.ToList(); } - /// Initializes a new instance of UpdateRunListResult. + /// Initializes a new instance of DatabaseFleetUpdateRunListResult. /// The UpdateRun items on this page. /// The link to the next page of items. - internal UpdateRunListResult(IReadOnlyList value, Uri nextLink) + internal DatabaseFleetUpdateRunListResult(IReadOnlyList value, Uri nextLink) { Value = value; NextLink = nextLink; } /// The UpdateRun items on this page. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AgentProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetAgentProfile.Serialization.cs similarity index 84% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AgentProfile.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetAgentProfile.Serialization.cs index 8d822f94f61e0..47979ab8ba4ff 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AgentProfile.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetAgentProfile.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - internal partial class AgentProfile : IUtf8JsonSerializable + internal partial class FleetAgentProfile : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -23,7 +23,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static AgentProfile DeserializeAgentProfile(JsonElement element) + internal static FleetAgentProfile DeserializeFleetAgentProfile(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -42,7 +42,7 @@ internal static AgentProfile DeserializeAgentProfile(JsonElement element) continue; } } - return new AgentProfile(subnetId.Value); + return new FleetAgentProfile(subnetId.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AgentProfile.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetAgentProfile.cs similarity index 71% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AgentProfile.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetAgentProfile.cs index 7f8ece5d2da96..a7561af971090 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AgentProfile.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetAgentProfile.cs @@ -10,16 +10,16 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// Agent profile for the Fleet hub. - internal partial class AgentProfile + internal partial class FleetAgentProfile { - /// Initializes a new instance of AgentProfile. - public AgentProfile() + /// Initializes a new instance of FleetAgentProfile. + public FleetAgentProfile() { } - /// Initializes a new instance of AgentProfile. + /// Initializes a new instance of FleetAgentProfile. /// The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet will be generated and used. - internal AgentProfile(ResourceIdentifier subnetId) + internal FleetAgentProfile(ResourceIdentifier subnetId) { SubnetId = subnetId; } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/APIServerAccessProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetApiServerAccessProfile.Serialization.cs similarity index 87% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/APIServerAccessProfile.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetApiServerAccessProfile.Serialization.cs index ebf9a08e4e2ae..66d71c70d6890 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/APIServerAccessProfile.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetApiServerAccessProfile.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - public partial class APIServerAccessProfile : IUtf8JsonSerializable + public partial class FleetApiServerAccessProfile : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -33,7 +33,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static APIServerAccessProfile DeserializeAPIServerAccessProfile(JsonElement element) + internal static FleetApiServerAccessProfile DeserializeFleetApiServerAccessProfile(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -72,7 +72,7 @@ internal static APIServerAccessProfile DeserializeAPIServerAccessProfile(JsonEle continue; } } - return new APIServerAccessProfile(Optional.ToNullable(enablePrivateCluster), Optional.ToNullable(enableVnetIntegration), subnetId.Value); + return new FleetApiServerAccessProfile(Optional.ToNullable(enablePrivateCluster), Optional.ToNullable(enableVnetIntegration), subnetId.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/APIServerAccessProfile.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetApiServerAccessProfile.cs similarity index 77% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/APIServerAccessProfile.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetApiServerAccessProfile.cs index cca803ae40fb7..c6a49dcdc710c 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/APIServerAccessProfile.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetApiServerAccessProfile.cs @@ -10,18 +10,18 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// Access profile for the Fleet hub API server. - public partial class APIServerAccessProfile + public partial class FleetApiServerAccessProfile { - /// Initializes a new instance of APIServerAccessProfile. - public APIServerAccessProfile() + /// Initializes a new instance of FleetApiServerAccessProfile. + public FleetApiServerAccessProfile() { } - /// Initializes a new instance of APIServerAccessProfile. + /// Initializes a new instance of FleetApiServerAccessProfile. /// Whether to create the Fleet hub as a private cluster or not. /// Whether to enable apiserver vnet integration for the Fleet hub or not. /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new Fleet with BYO vnet. - internal APIServerAccessProfile(bool? enablePrivateCluster, bool? enableVnetIntegration, ResourceIdentifier subnetId) + internal FleetApiServerAccessProfile(bool? enablePrivateCluster, bool? enableVnetIntegration, ResourceIdentifier subnetId) { EnablePrivateCluster = enablePrivateCluster; EnableVnetIntegration = enableVnetIntegration; diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.Serialization.cs index 75480e75e5f20..aac61ef840c10 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.Serialization.cs @@ -40,8 +40,8 @@ internal static FleetHubProfile DeserializeFleetHubProfile(JsonElement element) return null; } Optional dnsPrefix = default; - Optional apiServerAccessProfile = default; - Optional agentProfile = default; + Optional apiServerAccessProfile = default; + Optional agentProfile = default; Optional fqdn = default; Optional kubernetesVersion = default; foreach (var property in element.EnumerateObject()) @@ -57,7 +57,7 @@ internal static FleetHubProfile DeserializeFleetHubProfile(JsonElement element) { continue; } - apiServerAccessProfile = APIServerAccessProfile.DeserializeAPIServerAccessProfile(property.Value); + apiServerAccessProfile = FleetApiServerAccessProfile.DeserializeFleetApiServerAccessProfile(property.Value); continue; } if (property.NameEquals("agentProfile"u8)) @@ -66,7 +66,7 @@ internal static FleetHubProfile DeserializeFleetHubProfile(JsonElement element) { continue; } - agentProfile = AgentProfile.DeserializeAgentProfile(property.Value); + agentProfile = FleetAgentProfile.DeserializeFleetAgentProfile(property.Value); continue; } if (property.NameEquals("fqdn"u8)) diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.cs index 4fe1a8ac4bbe5..c8c65dc16bdcc 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.cs @@ -23,7 +23,7 @@ public FleetHubProfile() /// The agent profile for the Fleet hub. /// The FQDN of the Fleet hub. /// The Kubernetes version of the Fleet hub. - internal FleetHubProfile(string dnsPrefix, APIServerAccessProfile apiServerAccessProfile, AgentProfile agentProfile, string fqdn, string kubernetesVersion) + internal FleetHubProfile(string dnsPrefix, FleetApiServerAccessProfile apiServerAccessProfile, FleetAgentProfile agentProfile, string fqdn, string kubernetesVersion) { DnsPrefix = dnsPrefix; ApiServerAccessProfile = apiServerAccessProfile; @@ -35,9 +35,9 @@ internal FleetHubProfile(string dnsPrefix, APIServerAccessProfile apiServerAcces /// DNS prefix used to create the FQDN for the Fleet hub. public string DnsPrefix { get; set; } /// The access profile for the Fleet hub API server. - public APIServerAccessProfile ApiServerAccessProfile { get; set; } + public FleetApiServerAccessProfile ApiServerAccessProfile { get; set; } /// The agent profile for the Fleet hub. - internal AgentProfile AgentProfile { get; set; } + internal FleetAgentProfile AgentProfile { get; set; } /// The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet will be generated and used. public ResourceIdentifier AgentSubnetId { @@ -45,7 +45,7 @@ public ResourceIdentifier AgentSubnetId set { if (AgentProfile is null) - AgentProfile = new AgentProfile(); + AgentProfile = new FleetAgentProfile(); AgentProfile.SubnetId = value; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpdate.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpdate.Serialization.cs similarity index 77% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpdate.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpdate.Serialization.cs index e7d2c0cb15845..689684ce2a204 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpdate.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpdate.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - public partial class ManagedClusterUpdate : IUtf8JsonSerializable + public partial class FleetManagedClusterUpdate : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -25,19 +25,19 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static ManagedClusterUpdate DeserializeManagedClusterUpdate(JsonElement element) + internal static FleetManagedClusterUpdate DeserializeFleetManagedClusterUpdate(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - ManagedClusterUpgradeSpec upgrade = default; + FleetManagedClusterUpgradeSpec upgrade = default; Optional nodeImageSelection = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("upgrade"u8)) { - upgrade = ManagedClusterUpgradeSpec.DeserializeManagedClusterUpgradeSpec(property.Value); + upgrade = FleetManagedClusterUpgradeSpec.DeserializeFleetManagedClusterUpgradeSpec(property.Value); continue; } if (property.NameEquals("nodeImageSelection"u8)) @@ -50,7 +50,7 @@ internal static ManagedClusterUpdate DeserializeManagedClusterUpdate(JsonElement continue; } } - return new ManagedClusterUpdate(upgrade, nodeImageSelection.Value); + return new FleetManagedClusterUpdate(upgrade, nodeImageSelection.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpdate.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpdate.cs similarity index 76% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpdate.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpdate.cs index 4c4909bc82383..95fe1f4f1345b 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpdate.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpdate.cs @@ -11,29 +11,29 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The update to be applied to the ManagedClusters. - public partial class ManagedClusterUpdate + public partial class FleetManagedClusterUpdate { - /// Initializes a new instance of ManagedClusterUpdate. + /// Initializes a new instance of FleetManagedClusterUpdate. /// The upgrade to apply to the ManagedClusters. /// is null. - public ManagedClusterUpdate(ManagedClusterUpgradeSpec upgrade) + public FleetManagedClusterUpdate(FleetManagedClusterUpgradeSpec upgrade) { Argument.AssertNotNull(upgrade, nameof(upgrade)); Upgrade = upgrade; } - /// Initializes a new instance of ManagedClusterUpdate. + /// Initializes a new instance of FleetManagedClusterUpdate. /// The upgrade to apply to the ManagedClusters. /// The node image upgrade to be applied to the target nodes in update run. - internal ManagedClusterUpdate(ManagedClusterUpgradeSpec upgrade, NodeImageSelection nodeImageSelection) + internal FleetManagedClusterUpdate(FleetManagedClusterUpgradeSpec upgrade, NodeImageSelection nodeImageSelection) { Upgrade = upgrade; NodeImageSelection = nodeImageSelection; } /// The upgrade to apply to the ManagedClusters. - public ManagedClusterUpgradeSpec Upgrade { get; set; } + public FleetManagedClusterUpgradeSpec Upgrade { get; set; } /// The node image upgrade to be applied to the target nodes in update run. internal NodeImageSelection NodeImageSelection { get; set; } /// The node image upgrade type. diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeSpec.Serialization.cs similarity index 75% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeSpec.Serialization.cs index e0c17a0a1792d..ae22f7849cf7d 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeSpec.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeSpec.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - public partial class ManagedClusterUpgradeSpec : IUtf8JsonSerializable + public partial class FleetManagedClusterUpgradeSpec : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -25,19 +25,19 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static ManagedClusterUpgradeSpec DeserializeManagedClusterUpgradeSpec(JsonElement element) + internal static FleetManagedClusterUpgradeSpec DeserializeFleetManagedClusterUpgradeSpec(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - ManagedClusterUpgradeType type = default; + FleetManagedClusterUpgradeType type = default; Optional kubernetesVersion = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type"u8)) { - type = new ManagedClusterUpgradeType(property.Value.GetString()); + type = new FleetManagedClusterUpgradeType(property.Value.GetString()); continue; } if (property.NameEquals("kubernetesVersion"u8)) @@ -46,7 +46,7 @@ internal static ManagedClusterUpgradeSpec DeserializeManagedClusterUpgradeSpec(J continue; } } - return new ManagedClusterUpgradeSpec(type, kubernetesVersion.Value); + return new FleetManagedClusterUpgradeSpec(type, kubernetesVersion.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeSpec.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeSpec.cs similarity index 72% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeSpec.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeSpec.cs index 94498bec01a02..46701a2e6307f 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeSpec.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeSpec.cs @@ -8,27 +8,27 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The upgrade to apply to a ManagedCluster. - public partial class ManagedClusterUpgradeSpec + public partial class FleetManagedClusterUpgradeSpec { - /// Initializes a new instance of ManagedClusterUpgradeSpec. + /// Initializes a new instance of FleetManagedClusterUpgradeSpec. /// /// The upgrade type. /// Full requires the KubernetesVersion property to be set. /// NodeImageOnly requires the KubernetesVersion property not to be set. /// - public ManagedClusterUpgradeSpec(ManagedClusterUpgradeType upgradeType) + public FleetManagedClusterUpgradeSpec(FleetManagedClusterUpgradeType upgradeType) { UpgradeType = upgradeType; } - /// Initializes a new instance of ManagedClusterUpgradeSpec. + /// Initializes a new instance of FleetManagedClusterUpgradeSpec. /// /// The upgrade type. /// Full requires the KubernetesVersion property to be set. /// NodeImageOnly requires the KubernetesVersion property not to be set. /// /// The Kubernetes version to upgrade the member clusters to. - internal ManagedClusterUpgradeSpec(ManagedClusterUpgradeType upgradeType, string kubernetesVersion) + internal FleetManagedClusterUpgradeSpec(FleetManagedClusterUpgradeType upgradeType, string kubernetesVersion) { UpgradeType = upgradeType; KubernetesVersion = kubernetesVersion; @@ -39,7 +39,7 @@ internal ManagedClusterUpgradeSpec(ManagedClusterUpgradeType upgradeType, string /// Full requires the KubernetesVersion property to be set. /// NodeImageOnly requires the KubernetesVersion property not to be set. /// - public ManagedClusterUpgradeType UpgradeType { get; set; } + public FleetManagedClusterUpgradeType UpgradeType { get; set; } /// The Kubernetes version to upgrade the member clusters to. public string KubernetesVersion { get; set; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeType.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeType.cs new file mode 100644 index 0000000000000..357fccf2e24eb --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// The type of upgrade to perform when targeting ManagedClusters. + public readonly partial struct FleetManagedClusterUpgradeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FleetManagedClusterUpgradeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FullValue = "Full"; + private const string NodeImageOnlyValue = "NodeImageOnly"; + + /// Full upgrades the control plane and all agent pools of the target ManagedClusters. + public static FleetManagedClusterUpgradeType Full { get; } = new FleetManagedClusterUpgradeType(FullValue); + /// NodeImageOnly upgrades only the node images of the target ManagedClusters. + public static FleetManagedClusterUpgradeType NodeImageOnly { get; } = new FleetManagedClusterUpgradeType(NodeImageOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(FleetManagedClusterUpgradeType left, FleetManagedClusterUpgradeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FleetManagedClusterUpgradeType left, FleetManagedClusterUpgradeType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FleetManagedClusterUpgradeType(string value) => new FleetManagedClusterUpgradeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FleetManagedClusterUpgradeType other && Equals(other); + /// + public bool Equals(FleetManagedClusterUpgradeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroup.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroup.Serialization.cs similarity index 82% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroup.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroup.Serialization.cs index ddf18fd1a3ee2..1a55c3ec47a0d 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroup.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroup.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - public partial class UpdateGroup : IUtf8JsonSerializable + public partial class FleetUpdateGroup : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -20,7 +20,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static UpdateGroup DeserializeUpdateGroup(JsonElement element) + internal static FleetUpdateGroup DeserializeFleetUpdateGroup(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -35,7 +35,7 @@ internal static UpdateGroup DeserializeUpdateGroup(JsonElement element) continue; } } - return new UpdateGroup(name); + return new FleetUpdateGroup(name); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroup.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroup.cs similarity index 86% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroup.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroup.cs index 12bb00d0283e2..9229b13171a3b 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroup.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroup.cs @@ -11,16 +11,16 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// A group to be updated. - public partial class UpdateGroup + public partial class FleetUpdateGroup { - /// Initializes a new instance of UpdateGroup. + /// Initializes a new instance of FleetUpdateGroup. /// /// The name of the Fleet member group to update. /// It should match the name of an existing FleetMember group. /// A group can only appear once across all UpdateStages in the UpdateRun. /// /// is null. - public UpdateGroup(string name) + public FleetUpdateGroup(string name) { Argument.AssertNotNull(name, nameof(name)); diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroupStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroupStatus.Serialization.cs similarity index 79% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroupStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroupStatus.Serialization.cs index 7e0bef2f459dd..fa3e123a694d7 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroupStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroupStatus.Serialization.cs @@ -11,15 +11,15 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - public partial class UpdateGroupStatus + public partial class FleetUpdateGroupStatus { - internal static UpdateGroupStatus DeserializeUpdateGroupStatus(JsonElement element) + internal static FleetUpdateGroupStatus DeserializeFleetUpdateGroupStatus(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional status = default; + Optional status = default; Optional name = default; Optional> members = default; foreach (var property in element.EnumerateObject()) @@ -30,7 +30,7 @@ internal static UpdateGroupStatus DeserializeUpdateGroupStatus(JsonElement eleme { continue; } - status = UpdateStatus.DeserializeUpdateStatus(property.Value); + status = FleetUpdateOperationStatus.DeserializeFleetUpdateOperationStatus(property.Value); continue; } if (property.NameEquals("name"u8)) @@ -53,7 +53,7 @@ internal static UpdateGroupStatus DeserializeUpdateGroupStatus(JsonElement eleme continue; } } - return new UpdateGroupStatus(status.Value, name.Value, Optional.ToList(members)); + return new FleetUpdateGroupStatus(status.Value, name.Value, Optional.ToList(members)); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroupStatus.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroupStatus.cs similarity index 70% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroupStatus.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroupStatus.cs index c4deb745836f4..d09a755b0412f 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateGroupStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroupStatus.cs @@ -11,19 +11,19 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The status of a UpdateGroup. - public partial class UpdateGroupStatus + public partial class FleetUpdateGroupStatus { - /// Initializes a new instance of UpdateGroupStatus. - internal UpdateGroupStatus() + /// Initializes a new instance of FleetUpdateGroupStatus. + internal FleetUpdateGroupStatus() { Members = new ChangeTrackingList(); } - /// Initializes a new instance of UpdateGroupStatus. + /// Initializes a new instance of FleetUpdateGroupStatus. /// The status of the UpdateGroup. /// The name of the UpdateGroup. /// The list of member this UpdateGroup updates. - internal UpdateGroupStatus(UpdateStatus status, string name, IReadOnlyList members) + internal FleetUpdateGroupStatus(FleetUpdateOperationStatus status, string name, IReadOnlyList members) { Status = status; Name = name; @@ -31,7 +31,7 @@ internal UpdateGroupStatus(UpdateStatus status, string name, IReadOnlyList The status of the UpdateGroup. - public UpdateStatus Status { get; } + public FleetUpdateOperationStatus Status { get; } /// The name of the UpdateGroup. public string Name { get; } /// The list of member this UpdateGroup updates. diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateOperationStatus.Serialization.cs similarity index 81% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateOperationStatus.Serialization.cs index 620c89a142ca9..53a0b93323311 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateOperationStatus.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - public partial class UpdateStatus + public partial class FleetUpdateOperationStatus { - internal static UpdateStatus DeserializeUpdateStatus(JsonElement element) + internal static FleetUpdateOperationStatus DeserializeFleetUpdateOperationStatus(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -22,7 +22,7 @@ internal static UpdateStatus DeserializeUpdateStatus(JsonElement element) } Optional startTime = default; Optional completedTime = default; - Optional state = default; + Optional state = default; Optional error = default; foreach (var property in element.EnumerateObject()) { @@ -50,7 +50,7 @@ internal static UpdateStatus DeserializeUpdateStatus(JsonElement element) { continue; } - state = new UpdateState(property.Value.GetString()); + state = new FleetUpdateState(property.Value.GetString()); continue; } if (property.NameEquals("error"u8)) @@ -63,7 +63,7 @@ internal static UpdateStatus DeserializeUpdateStatus(JsonElement element) continue; } } - return new UpdateStatus(Optional.ToNullable(startTime), Optional.ToNullable(completedTime), Optional.ToNullable(state), error.Value); + return new FleetUpdateOperationStatus(Optional.ToNullable(startTime), Optional.ToNullable(completedTime), Optional.ToNullable(state), error.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStatus.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateOperationStatus.cs similarity index 73% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStatus.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateOperationStatus.cs index 3bd8008739e06..2d5015dc934cd 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateOperationStatus.cs @@ -11,19 +11,19 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The status for an operation or group of operations. - public partial class UpdateStatus + public partial class FleetUpdateOperationStatus { - /// Initializes a new instance of UpdateStatus. - internal UpdateStatus() + /// Initializes a new instance of FleetUpdateOperationStatus. + internal FleetUpdateOperationStatus() { } - /// Initializes a new instance of UpdateStatus. + /// Initializes a new instance of FleetUpdateOperationStatus. /// The time the operation or group was started. /// The time the operation or group was completed. /// The State of the operation or group. /// The error details when a failure is encountered. - internal UpdateStatus(DateTimeOffset? startOn, DateTimeOffset? completedOn, UpdateState? state, ResponseError error) + internal FleetUpdateOperationStatus(DateTimeOffset? startOn, DateTimeOffset? completedOn, FleetUpdateState? state, ResponseError error) { StartOn = startOn; CompletedOn = completedOn; @@ -36,7 +36,7 @@ internal UpdateStatus(DateTimeOffset? startOn, DateTimeOffset? completedOn, Upda /// The time the operation or group was completed. public DateTimeOffset? CompletedOn { get; } /// The State of the operation or group. - public UpdateState? State { get; } + public FleetUpdateState? State { get; } /// The error details when a failure is encountered. public ResponseError Error { get; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunProvisioningState.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunProvisioningState.cs new file mode 100644 index 0000000000000..5c6caa6c37944 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// The provisioning state of the UpdateRun resource. + public readonly partial struct FleetUpdateRunProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FleetUpdateRunProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static FleetUpdateRunProvisioningState Succeeded { get; } = new FleetUpdateRunProvisioningState(SucceededValue); + /// Resource creation failed. + public static FleetUpdateRunProvisioningState Failed { get; } = new FleetUpdateRunProvisioningState(FailedValue); + /// Resource creation was canceled. + public static FleetUpdateRunProvisioningState Canceled { get; } = new FleetUpdateRunProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(FleetUpdateRunProvisioningState left, FleetUpdateRunProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FleetUpdateRunProvisioningState left, FleetUpdateRunProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FleetUpdateRunProvisioningState(string value) => new FleetUpdateRunProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FleetUpdateRunProvisioningState other && Equals(other); + /// + public bool Equals(FleetUpdateRunProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStatus.Serialization.cs similarity index 70% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStatus.Serialization.cs index dad32fa246de2..6425cff140efb 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStatus.Serialization.cs @@ -11,16 +11,16 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - public partial class UpdateRunStatus + public partial class FleetUpdateRunStatus { - internal static UpdateRunStatus DeserializeUpdateRunStatus(JsonElement element) + internal static FleetUpdateRunStatus DeserializeFleetUpdateRunStatus(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional status = default; - Optional> stages = default; + Optional status = default; + Optional> stages = default; Optional nodeImageSelection = default; foreach (var property in element.EnumerateObject()) { @@ -30,7 +30,7 @@ internal static UpdateRunStatus DeserializeUpdateRunStatus(JsonElement element) { continue; } - status = UpdateStatus.DeserializeUpdateStatus(property.Value); + status = FleetUpdateOperationStatus.DeserializeFleetUpdateOperationStatus(property.Value); continue; } if (property.NameEquals("stages"u8)) @@ -39,10 +39,10 @@ internal static UpdateRunStatus DeserializeUpdateRunStatus(JsonElement element) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(UpdateStageStatus.DeserializeUpdateStageStatus(item)); + array.Add(FleetUpdateStageStatus.DeserializeFleetUpdateStageStatus(item)); } stages = array; continue; @@ -57,7 +57,7 @@ internal static UpdateRunStatus DeserializeUpdateRunStatus(JsonElement element) continue; } } - return new UpdateRunStatus(status.Value, Optional.ToList(stages), nodeImageSelection.Value); + return new FleetUpdateRunStatus(status.Value, Optional.ToList(stages), nodeImageSelection.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStatus.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStatus.cs similarity index 70% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStatus.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStatus.cs index 84dfc6f739412..54ab14bd3cf32 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStatus.cs @@ -11,19 +11,19 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The status of a UpdateRun. - public partial class UpdateRunStatus + public partial class FleetUpdateRunStatus { - /// Initializes a new instance of UpdateRunStatus. - internal UpdateRunStatus() + /// Initializes a new instance of FleetUpdateRunStatus. + internal FleetUpdateRunStatus() { - Stages = new ChangeTrackingList(); + Stages = new ChangeTrackingList(); } - /// Initializes a new instance of UpdateRunStatus. + /// Initializes a new instance of FleetUpdateRunStatus. /// The status of the UpdateRun. /// The stages composing an update run. Stages are run sequentially withing an UpdateRun. /// The node image upgrade specs for the update run. It is only set in update run when `NodeImageSelection.type` is `Consistent`. - internal UpdateRunStatus(UpdateStatus status, IReadOnlyList stages, NodeImageSelectionStatus nodeImageSelection) + internal FleetUpdateRunStatus(FleetUpdateOperationStatus status, IReadOnlyList stages, NodeImageSelectionStatus nodeImageSelection) { Status = status; Stages = stages; @@ -31,9 +31,9 @@ internal UpdateRunStatus(UpdateStatus status, IReadOnlyList s } /// The status of the UpdateRun. - public UpdateStatus Status { get; } + public FleetUpdateOperationStatus Status { get; } /// The stages composing an update run. Stages are run sequentially withing an UpdateRun. - public IReadOnlyList Stages { get; } + public IReadOnlyList Stages { get; } /// The node image upgrade specs for the update run. It is only set in update run when `NodeImageSelection.type` is `Consistent`. internal NodeImageSelectionStatus NodeImageSelection { get; } /// The image versions to upgrade the nodes to. diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStrategy.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStrategy.Serialization.cs similarity index 72% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStrategy.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStrategy.Serialization.cs index 3bcd4fa45fa60..89370aa3cb9e9 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStrategy.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStrategy.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - internal partial class UpdateRunStrategy : IUtf8JsonSerializable + internal partial class FleetUpdateRunStrategy : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -26,27 +26,27 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static UpdateRunStrategy DeserializeUpdateRunStrategy(JsonElement element) + internal static FleetUpdateRunStrategy DeserializeFleetUpdateRunStrategy(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList stages = default; + IList stages = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("stages"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(UpdateStage.DeserializeUpdateStage(item)); + array.Add(FleetUpdateStage.DeserializeFleetUpdateStage(item)); } stages = array; continue; } } - return new UpdateRunStrategy(stages); + return new FleetUpdateRunStrategy(stages); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStrategy.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStrategy.cs similarity index 69% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStrategy.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStrategy.cs index 525e42fe3573c..e9df241ad67ab 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunStrategy.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStrategy.cs @@ -13,26 +13,26 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The UpdateRunStrategy configures the sequence of Stages and Groups in which the clusters will be updated. - internal partial class UpdateRunStrategy + internal partial class FleetUpdateRunStrategy { - /// Initializes a new instance of UpdateRunStrategy. + /// Initializes a new instance of FleetUpdateRunStrategy. /// The list of stages that compose this update run. /// is null. - public UpdateRunStrategy(IEnumerable stages) + public FleetUpdateRunStrategy(IEnumerable stages) { Argument.AssertNotNull(stages, nameof(stages)); Stages = stages.ToList(); } - /// Initializes a new instance of UpdateRunStrategy. + /// Initializes a new instance of FleetUpdateRunStrategy. /// The list of stages that compose this update run. - internal UpdateRunStrategy(IList stages) + internal FleetUpdateRunStrategy(IList stages) { Stages = stages; } /// The list of stages that compose this update run. - public IList Stages { get; } + public IList Stages { get; } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStage.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStage.Serialization.cs similarity index 82% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStage.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStage.Serialization.cs index 90838647c34c7..cc9e9445cfe7c 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStage.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStage.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - public partial class UpdateStage : IUtf8JsonSerializable + public partial class FleetUpdateStage : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -36,14 +36,14 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static UpdateStage DeserializeUpdateStage(JsonElement element) + internal static FleetUpdateStage DeserializeFleetUpdateStage(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } string name = default; - Optional> groups = default; + Optional> groups = default; Optional afterStageWaitInSeconds = default; foreach (var property in element.EnumerateObject()) { @@ -58,10 +58,10 @@ internal static UpdateStage DeserializeUpdateStage(JsonElement element) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(UpdateGroup.DeserializeUpdateGroup(item)); + array.Add(FleetUpdateGroup.DeserializeFleetUpdateGroup(item)); } groups = array; continue; @@ -76,7 +76,7 @@ internal static UpdateStage DeserializeUpdateStage(JsonElement element) continue; } } - return new UpdateStage(name, Optional.ToList(groups), Optional.ToNullable(afterStageWaitInSeconds)); + return new FleetUpdateStage(name, Optional.ToList(groups), Optional.ToNullable(afterStageWaitInSeconds)); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStage.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStage.cs similarity index 82% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStage.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStage.cs index 8debff210cbf4..7fab2c88d260d 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStage.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStage.cs @@ -18,27 +18,27 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models /// - Parallel within a stage: Groups within a stage run in parallel. /// - Sequential within a group: Clusters within a group are updated sequentially. /// - public partial class UpdateStage + public partial class FleetUpdateStage { - /// Initializes a new instance of UpdateStage. + /// Initializes a new instance of FleetUpdateStage. /// The name of the stage. Must be unique within the UpdateRun. /// is null. - public UpdateStage(string name) + public FleetUpdateStage(string name) { Argument.AssertNotNull(name, nameof(name)); Name = name; - Groups = new ChangeTrackingList(); + Groups = new ChangeTrackingList(); } - /// Initializes a new instance of UpdateStage. + /// Initializes a new instance of FleetUpdateStage. /// The name of the stage. Must be unique within the UpdateRun. /// /// A list of group names that compose the stage. /// The groups will be updated in parallel. Each group name can only appear once in the UpdateRun. /// /// The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified. - internal UpdateStage(string name, IList groups, int? afterStageWaitInSeconds) + internal FleetUpdateStage(string name, IList groups, int? afterStageWaitInSeconds) { Name = name; Groups = groups; @@ -51,7 +51,7 @@ internal UpdateStage(string name, IList groups, int? afterStageWait /// A list of group names that compose the stage. /// The groups will be updated in parallel. Each group name can only appear once in the UpdateRun. /// - public IList Groups { get; } + public IList Groups { get; } /// The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified. public int? AfterStageWaitInSeconds { get; set; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStageStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStageStatus.Serialization.cs similarity index 65% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStageStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStageStatus.Serialization.cs index 6dba10b436b20..b2377f6b18215 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStageStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStageStatus.Serialization.cs @@ -11,18 +11,18 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - public partial class UpdateStageStatus + public partial class FleetUpdateStageStatus { - internal static UpdateStageStatus DeserializeUpdateStageStatus(JsonElement element) + internal static FleetUpdateStageStatus DeserializeFleetUpdateStageStatus(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional status = default; + Optional status = default; Optional name = default; - Optional> groups = default; - Optional afterStageWaitStatus = default; + Optional> groups = default; + Optional afterStageWaitStatus = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("status"u8)) @@ -31,7 +31,7 @@ internal static UpdateStageStatus DeserializeUpdateStageStatus(JsonElement eleme { continue; } - status = UpdateStatus.DeserializeUpdateStatus(property.Value); + status = FleetUpdateOperationStatus.DeserializeFleetUpdateOperationStatus(property.Value); continue; } if (property.NameEquals("name"u8)) @@ -45,10 +45,10 @@ internal static UpdateStageStatus DeserializeUpdateStageStatus(JsonElement eleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(UpdateGroupStatus.DeserializeUpdateGroupStatus(item)); + array.Add(FleetUpdateGroupStatus.DeserializeFleetUpdateGroupStatus(item)); } groups = array; continue; @@ -59,11 +59,11 @@ internal static UpdateStageStatus DeserializeUpdateStageStatus(JsonElement eleme { continue; } - afterStageWaitStatus = WaitStatus.DeserializeWaitStatus(property.Value); + afterStageWaitStatus = FleetWaitStatus.DeserializeFleetWaitStatus(property.Value); continue; } } - return new UpdateStageStatus(status.Value, name.Value, Optional.ToList(groups), afterStageWaitStatus.Value); + return new FleetUpdateStageStatus(status.Value, name.Value, Optional.ToList(groups), afterStageWaitStatus.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStageStatus.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStageStatus.cs similarity index 63% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStageStatus.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStageStatus.cs index c74cfdf2ef861..fd5269182ee02 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateStageStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStageStatus.cs @@ -11,20 +11,20 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The status of a UpdateStage. - public partial class UpdateStageStatus + public partial class FleetUpdateStageStatus { - /// Initializes a new instance of UpdateStageStatus. - internal UpdateStageStatus() + /// Initializes a new instance of FleetUpdateStageStatus. + internal FleetUpdateStageStatus() { - Groups = new ChangeTrackingList(); + Groups = new ChangeTrackingList(); } - /// Initializes a new instance of UpdateStageStatus. + /// Initializes a new instance of FleetUpdateStageStatus. /// The status of the UpdateStage. /// The name of the UpdateStage. /// The list of groups to be updated as part of this UpdateStage. /// The status of the wait period configured on the UpdateStage. - internal UpdateStageStatus(UpdateStatus status, string name, IReadOnlyList groups, WaitStatus afterStageWaitStatus) + internal FleetUpdateStageStatus(FleetUpdateOperationStatus status, string name, IReadOnlyList groups, FleetWaitStatus afterStageWaitStatus) { Status = status; Name = name; @@ -33,12 +33,12 @@ internal UpdateStageStatus(UpdateStatus status, string name, IReadOnlyList The status of the UpdateStage. - public UpdateStatus Status { get; } + public FleetUpdateOperationStatus Status { get; } /// The name of the UpdateStage. public string Name { get; } /// The list of groups to be updated as part of this UpdateStage. - public IReadOnlyList Groups { get; } + public IReadOnlyList Groups { get; } /// The status of the wait period configured on the UpdateStage. - public WaitStatus AfterStageWaitStatus { get; } + public FleetWaitStatus AfterStageWaitStatus { get; } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateState.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateState.cs similarity index 55% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateState.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateState.cs index bd79a0e96087d..90a21844acfeb 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateState.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateState.cs @@ -11,13 +11,13 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The state of the UpdateRun, UpdateStage, UpdateGroup, or MemberUpdate. - public readonly partial struct UpdateState : IEquatable + public readonly partial struct FleetUpdateState : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public UpdateState(string value) + public FleetUpdateState(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -31,31 +31,31 @@ public UpdateState(string value) private const string CompletedValue = "Completed"; /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has not been started. - public static UpdateState NotStarted { get; } = new UpdateState(NotStartedValue); + public static FleetUpdateState NotStarted { get; } = new FleetUpdateState(NotStartedValue); /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is running. - public static UpdateState Running { get; } = new UpdateState(RunningValue); + public static FleetUpdateState Running { get; } = new FleetUpdateState(RunningValue); /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is being stopped. - public static UpdateState Stopping { get; } = new UpdateState(StoppingValue); + public static FleetUpdateState Stopping { get; } = new FleetUpdateState(StoppingValue); /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has stopped. - public static UpdateState Stopped { get; } = new UpdateState(StoppedValue); + public static FleetUpdateState Stopped { get; } = new FleetUpdateState(StoppedValue); /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has been skipped. - public static UpdateState Skipped { get; } = new UpdateState(SkippedValue); + public static FleetUpdateState Skipped { get; } = new FleetUpdateState(SkippedValue); /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has failed. - public static UpdateState Failed { get; } = new UpdateState(FailedValue); + public static FleetUpdateState Failed { get; } = new FleetUpdateState(FailedValue); /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has completed. - public static UpdateState Completed { get; } = new UpdateState(CompletedValue); - /// Determines if two values are the same. - public static bool operator ==(UpdateState left, UpdateState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(UpdateState left, UpdateState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator UpdateState(string value) => new UpdateState(value); + public static FleetUpdateState Completed { get; } = new FleetUpdateState(CompletedValue); + /// Determines if two values are the same. + public static bool operator ==(FleetUpdateState left, FleetUpdateState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FleetUpdateState left, FleetUpdateState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FleetUpdateState(string value) => new FleetUpdateState(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is UpdateState other && Equals(other); + public override bool Equals(object obj) => obj is FleetUpdateState other && Equals(other); /// - public bool Equals(UpdateState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(FleetUpdateState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/WaitStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetWaitStatus.Serialization.cs similarity index 74% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/WaitStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetWaitStatus.Serialization.cs index d0d678a4a7ff2..2dd7941b80573 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/WaitStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetWaitStatus.Serialization.cs @@ -10,15 +10,15 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { - public partial class WaitStatus + public partial class FleetWaitStatus { - internal static WaitStatus DeserializeWaitStatus(JsonElement element) + internal static FleetWaitStatus DeserializeFleetWaitStatus(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional status = default; + Optional status = default; Optional waitDurationInSeconds = default; foreach (var property in element.EnumerateObject()) { @@ -28,7 +28,7 @@ internal static WaitStatus DeserializeWaitStatus(JsonElement element) { continue; } - status = UpdateStatus.DeserializeUpdateStatus(property.Value); + status = FleetUpdateOperationStatus.DeserializeFleetUpdateOperationStatus(property.Value); continue; } if (property.NameEquals("waitDurationInSeconds"u8)) @@ -41,7 +41,7 @@ internal static WaitStatus DeserializeWaitStatus(JsonElement element) continue; } } - return new WaitStatus(status.Value, Optional.ToNullable(waitDurationInSeconds)); + return new FleetWaitStatus(status.Value, Optional.ToNullable(waitDurationInSeconds)); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/WaitStatus.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetWaitStatus.cs similarity index 66% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/WaitStatus.cs rename to sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetWaitStatus.cs index 08d6056fe6fd7..2243516765ec9 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/WaitStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetWaitStatus.cs @@ -8,24 +8,24 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The status of the wait duration. - public partial class WaitStatus + public partial class FleetWaitStatus { - /// Initializes a new instance of WaitStatus. - internal WaitStatus() + /// Initializes a new instance of FleetWaitStatus. + internal FleetWaitStatus() { } - /// Initializes a new instance of WaitStatus. + /// Initializes a new instance of FleetWaitStatus. /// The status of the wait duration. /// The wait duration configured in seconds. - internal WaitStatus(UpdateStatus status, int? waitDurationInSeconds) + internal FleetWaitStatus(FleetUpdateOperationStatus status, int? waitDurationInSeconds) { Status = status; WaitDurationInSeconds = waitDurationInSeconds; } /// The status of the wait duration. - public UpdateStatus Status { get; } + public FleetUpdateOperationStatus Status { get; } /// The wait duration configured in seconds. public int? WaitDurationInSeconds { get; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeType.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeType.cs deleted file mode 100644 index 37b79dc2741f1..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ManagedClusterUpgradeType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DatabaseFleetManager.Models -{ - /// The type of upgrade to perform when targeting ManagedClusters. - public readonly partial struct ManagedClusterUpgradeType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ManagedClusterUpgradeType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string FullValue = "Full"; - private const string NodeImageOnlyValue = "NodeImageOnly"; - - /// Full upgrades the control plane and all agent pools of the target ManagedClusters. - public static ManagedClusterUpgradeType Full { get; } = new ManagedClusterUpgradeType(FullValue); - /// NodeImageOnly upgrades only the node images of the target ManagedClusters. - public static ManagedClusterUpgradeType NodeImageOnly { get; } = new ManagedClusterUpgradeType(NodeImageOnlyValue); - /// Determines if two values are the same. - public static bool operator ==(ManagedClusterUpgradeType left, ManagedClusterUpgradeType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ManagedClusterUpgradeType left, ManagedClusterUpgradeType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ManagedClusterUpgradeType(string value) => new ManagedClusterUpgradeType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ManagedClusterUpgradeType other && Equals(other); - /// - public bool Equals(ManagedClusterUpgradeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.Serialization.cs index d367e38dd6aa7..29bf5ae7636a1 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.Serialization.cs @@ -18,9 +18,9 @@ internal static MemberUpdateStatus DeserializeMemberUpdateStatus(JsonElement ele { return null; } - Optional status = default; + Optional status = default; Optional name = default; - Optional clusterResourceId = default; + Optional clusterResourceId = default; Optional operationId = default; Optional message = default; foreach (var property in element.EnumerateObject()) @@ -31,7 +31,7 @@ internal static MemberUpdateStatus DeserializeMemberUpdateStatus(JsonElement ele { continue; } - status = UpdateStatus.DeserializeUpdateStatus(property.Value); + status = FleetUpdateOperationStatus.DeserializeFleetUpdateOperationStatus(property.Value); continue; } if (property.NameEquals("name"u8)) @@ -41,7 +41,11 @@ internal static MemberUpdateStatus DeserializeMemberUpdateStatus(JsonElement ele } if (property.NameEquals("clusterResourceId"u8)) { - clusterResourceId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("operationId"u8)) diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.cs index 4d55ea2e8811a..9458a11a2e2ec 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.cs @@ -5,6 +5,8 @@ #nullable disable +using Azure.Core; + namespace Azure.ResourceManager.DatabaseFleetManager.Models { /// The status of a member update operation. @@ -21,7 +23,7 @@ internal MemberUpdateStatus() /// The Azure resource id of the target Kubernetes cluster. /// The operation resource id of the latest attempt to perform the operation. /// The status message after processing the member update operation. - internal MemberUpdateStatus(UpdateStatus status, string name, string clusterResourceId, string operationId, string message) + internal MemberUpdateStatus(FleetUpdateOperationStatus status, string name, ResourceIdentifier clusterResourceId, string operationId, string message) { Status = status; Name = name; @@ -31,11 +33,11 @@ internal MemberUpdateStatus(UpdateStatus status, string name, string clusterReso } /// The status of the MemberUpdate operation. - public UpdateStatus Status { get; } + public FleetUpdateOperationStatus Status { get; } /// The name of the FleetMember. public string Name { get; } /// The Azure resource id of the target Kubernetes cluster. - public string ClusterResourceId { get; } + public ResourceIdentifier ClusterResourceId { get; } /// The operation resource id of the latest attempt to perform the operation. public string OperationId { get; } /// The status message after processing the member update operation. diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunProvisioningState.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunProvisioningState.cs deleted file mode 100644 index fec891f8f89a3..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/UpdateRunProvisioningState.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DatabaseFleetManager.Models -{ - /// The provisioning state of the UpdateRun resource. - public readonly partial struct UpdateRunProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public UpdateRunProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - - /// Resource has been created. - public static UpdateRunProvisioningState Succeeded { get; } = new UpdateRunProvisioningState(SucceededValue); - /// Resource creation failed. - public static UpdateRunProvisioningState Failed { get; } = new UpdateRunProvisioningState(FailedValue); - /// Resource creation was canceled. - public static UpdateRunProvisioningState Canceled { get; } = new UpdateRunProvisioningState(CanceledValue); - /// Determines if two values are the same. - public static bool operator ==(UpdateRunProvisioningState left, UpdateRunProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(UpdateRunProvisioningState left, UpdateRunProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator UpdateRunProvisioningState(string value) => new UpdateRunProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is UpdateRunProvisioningState other && Equals(other); - /// - public bool Equals(UpdateRunProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetMembersRestOperations.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetMembersRestOperations.cs index a8c87dff62af7..51463e8f2e452 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetMembersRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetMembersRestOperations.cs @@ -65,7 +65,7 @@ internal HttpMessage CreateListByFleetRequest(string subscriptionId, string reso /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFleetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public async Task> ListByFleetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -77,9 +77,9 @@ public async Task> ListByFleetAsync(string subsc { case 200: { - FleetMemberListResult value = default; + DatabaseFleetMemberListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FleetMemberListResult.DeserializeFleetMemberListResult(document.RootElement); + value = DatabaseFleetMemberListResult.DeserializeDatabaseFleetMemberListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -94,7 +94,7 @@ public async Task> ListByFleetAsync(string subsc /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByFleet(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public Response ListByFleet(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -106,9 +106,9 @@ public Response ListByFleet(string subscriptionId, string { case 200: { - FleetMemberListResult value = default; + DatabaseFleetMemberListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FleetMemberListResult.DeserializeFleetMemberListResult(document.RootElement); + value = DatabaseFleetMemberListResult.DeserializeDatabaseFleetMemberListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -146,7 +146,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 fleetName, string fleetMemberName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -159,13 +159,13 @@ public async Task> GetAsync(string subscriptionId, str { case 200: { - FleetMemberData value = default; + DatabaseFleetMemberData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FleetMemberData.DeserializeFleetMemberData(document.RootElement); + value = DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((FleetMemberData)null, message.Response); + return Response.FromValue((DatabaseFleetMemberData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -179,7 +179,7 @@ public async Task> GetAsync(string subscriptionId, str /// 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 fleetName, string fleetMemberName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -192,19 +192,19 @@ public Response Get(string subscriptionId, string resourceGroup { case 200: { - FleetMemberData value = default; + DatabaseFleetMemberData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FleetMemberData.DeserializeFleetMemberData(document.RootElement); + value = DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((FleetMemberData)null, message.Response); + return Response.FromValue((DatabaseFleetMemberData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, FleetMemberData data, string ifMatch, string ifNoneMatch) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, DatabaseFleetMemberData data, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -249,7 +249,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -280,7 +280,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, FleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -300,7 +300,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string f } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, FleetMemberPatch patch, string ifMatch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, DatabaseFleetMemberPatch patch, string ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -340,7 +340,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// 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 fleetName, string fleetMemberName, FleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, DatabaseFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -370,7 +370,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// 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 fleetName, string fleetMemberName, FleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, DatabaseFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -496,7 +496,7 @@ internal HttpMessage CreateListByFleetNextPageRequest(string nextLink, string su /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFleetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public async Task> ListByFleetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -509,9 +509,9 @@ public async Task> ListByFleetNextPageAsync(stri { case 200: { - FleetMemberListResult value = default; + DatabaseFleetMemberListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FleetMemberListResult.DeserializeFleetMemberListResult(document.RootElement); + value = DatabaseFleetMemberListResult.DeserializeDatabaseFleetMemberListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -527,7 +527,7 @@ public async Task> ListByFleetNextPageAsync(stri /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByFleetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public Response ListByFleetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -540,9 +540,9 @@ public Response ListByFleetNextPage(string nextLink, stri { case 200: { - FleetMemberListResult value = default; + DatabaseFleetMemberListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FleetMemberListResult.DeserializeFleetMemberListResult(document.RootElement); + value = DatabaseFleetMemberListResult.DeserializeDatabaseFleetMemberListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetsRestOperations.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetsRestOperations.cs index fba06e4d09c67..7c134b97a1d52 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetsRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetsRestOperations.cs @@ -59,7 +59,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) /// 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) + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -69,9 +69,9 @@ public async Task> ListBySubscriptionAsync(string subs { case 200: { - FleetListResult value = default; + DatabaseFleetListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FleetListResult.DeserializeFleetListResult(document.RootElement); + value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -84,7 +84,7 @@ public async Task> ListBySubscriptionAsync(string subs /// 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) + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -94,9 +94,9 @@ public Response ListBySubscription(string subscriptionId, Cance { case 200: { - FleetListResult value = default; + DatabaseFleetListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FleetListResult.DeserializeFleetListResult(document.RootElement); + value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -129,7 +129,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str /// 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) + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -140,9 +140,9 @@ public async Task> ListByResourceGroupAsync(string sub { case 200: { - FleetListResult value = default; + DatabaseFleetListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FleetListResult.DeserializeFleetListResult(document.RootElement); + value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -156,7 +156,7 @@ public async Task> ListByResourceGroupAsync(string sub /// 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) + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -167,9 +167,9 @@ public Response ListByResourceGroup(string subscriptionId, stri { case 200: { - FleetListResult value = default; + DatabaseFleetListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FleetListResult.DeserializeFleetListResult(document.RootElement); + value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -204,7 +204,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 fleetName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -216,13 +216,13 @@ public async Task> GetAsync(string subscriptionId, string re { case 200: { - FleetData value = default; + DatabaseFleetData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FleetData.DeserializeFleetData(document.RootElement); + value = DatabaseFleetData.DeserializeDatabaseFleetData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((FleetData)null, message.Response); + return Response.FromValue((DatabaseFleetData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -235,7 +235,7 @@ public async Task> GetAsync(string subscriptionId, string re /// 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 fleetName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -247,19 +247,19 @@ public Response Get(string subscriptionId, string resourceGroupName, { case 200: { - FleetData value = default; + DatabaseFleetData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FleetData.DeserializeFleetData(document.RootElement); + value = DatabaseFleetData.DeserializeDatabaseFleetData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((FleetData)null, message.Response); + return Response.FromValue((DatabaseFleetData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, FleetData data, string ifMatch, string ifNoneMatch) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, DatabaseFleetData data, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -301,7 +301,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 fleetName, FleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -330,7 +330,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// 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 fleetName, FleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string fleetName, DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -349,7 +349,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, FleetPatch patch, string ifMatch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, DatabaseFleetPatch patch, string ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -386,7 +386,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// 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 fleetName, FleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, DatabaseFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -414,7 +414,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// 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 fleetName, FleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string fleetName, DatabaseFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -610,7 +610,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// 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) + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -621,9 +621,9 @@ public async Task> ListBySubscriptionNextPageAsync(str { case 200: { - FleetListResult value = default; + DatabaseFleetListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FleetListResult.DeserializeFleetListResult(document.RootElement); + value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -637,7 +637,7 @@ public async Task> ListBySubscriptionNextPageAsync(str /// 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) + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -648,9 +648,9 @@ public Response ListBySubscriptionNextPage(string nextLink, str { case 200: { - FleetListResult value = default; + DatabaseFleetListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FleetListResult.DeserializeFleetListResult(document.RootElement); + value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -679,7 +679,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// 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) + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -691,9 +691,9 @@ public async Task> ListByResourceGroupNextPageAsync(st { case 200: { - FleetListResult value = default; + DatabaseFleetListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FleetListResult.DeserializeFleetListResult(document.RootElement); + value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -708,7 +708,7 @@ public async Task> ListByResourceGroupNextPageAsync(st /// 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) + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -720,9 +720,9 @@ public Response ListByResourceGroupNextPage(string nextLink, st { case 200: { - FleetListResult value = default; + DatabaseFleetListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FleetListResult.DeserializeFleetListResult(document.RootElement); + value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/UpdateRunsRestOperations.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/UpdateRunsRestOperations.cs index 6d9c0feb02eb4..afef7ef223b92 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/UpdateRunsRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/UpdateRunsRestOperations.cs @@ -65,7 +65,7 @@ internal HttpMessage CreateListByFleetRequest(string subscriptionId, string reso /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFleetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public async Task> ListByFleetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -77,9 +77,9 @@ public async Task> ListByFleetAsync(string subscri { case 200: { - UpdateRunListResult value = default; + DatabaseFleetUpdateRunListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = UpdateRunListResult.DeserializeUpdateRunListResult(document.RootElement); + value = DatabaseFleetUpdateRunListResult.DeserializeDatabaseFleetUpdateRunListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -94,7 +94,7 @@ public async Task> ListByFleetAsync(string subscri /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByFleet(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public Response ListByFleet(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -106,9 +106,9 @@ public Response ListByFleet(string subscriptionId, string r { case 200: { - UpdateRunListResult value = default; + DatabaseFleetUpdateRunListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = UpdateRunListResult.DeserializeUpdateRunListResult(document.RootElement); + value = DatabaseFleetUpdateRunListResult.DeserializeDatabaseFleetUpdateRunListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -146,7 +146,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 fleetName, string updateRunName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -159,13 +159,13 @@ public async Task> GetAsync(string subscriptionId, strin { case 200: { - UpdateRunData value = default; + DatabaseFleetUpdateRunData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = UpdateRunData.DeserializeUpdateRunData(document.RootElement); + value = DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((UpdateRunData)null, message.Response); + return Response.FromValue((DatabaseFleetUpdateRunData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -179,7 +179,7 @@ public async Task> GetAsync(string subscriptionId, strin /// 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 fleetName, string updateRunName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -192,19 +192,19 @@ public Response Get(string subscriptionId, string resourceGroupNa { case 200: { - UpdateRunData value = default; + DatabaseFleetUpdateRunData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = UpdateRunData.DeserializeUpdateRunData(document.RootElement); + value = DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((UpdateRunData)null, message.Response); + return Response.FromValue((DatabaseFleetUpdateRunData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, UpdateRunData data, string ifMatch, string ifNoneMatch) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, DatabaseFleetUpdateRunData data, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -249,7 +249,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 fleetName, string updateRunName, UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -280,7 +280,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// 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 fleetName, string updateRunName, UpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -572,7 +572,7 @@ internal HttpMessage CreateListByFleetNextPageRequest(string nextLink, string su /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFleetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public async Task> ListByFleetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -585,9 +585,9 @@ public async Task> ListByFleetNextPageAsync(string { case 200: { - UpdateRunListResult value = default; + DatabaseFleetUpdateRunListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = UpdateRunListResult.DeserializeUpdateRunListResult(document.RootElement); + value = DatabaseFleetUpdateRunListResult.DeserializeDatabaseFleetUpdateRunListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -603,7 +603,7 @@ public async Task> ListByFleetNextPageAsync(string /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByFleetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public Response ListByFleetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -616,9 +616,9 @@ public Response ListByFleetNextPage(string nextLink, string { case 200: { - UpdateRunListResult value = default; + DatabaseFleetUpdateRunListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = UpdateRunListResult.DeserializeUpdateRunListResult(document.RootElement); + value = DatabaseFleetUpdateRunListResult.DeserializeDatabaseFleetUpdateRunListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/autorest.md b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/autorest.md index 90b80c5f1b795..f9444ebe2ed5a 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/autorest.md +++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/autorest.md @@ -8,6 +8,7 @@ csharp: true library-name: DatabaseFleetManager namespace: Azure.ResourceManager.DatabaseFleetManager require: https://github.com/Azure/azure-rest-api-specs/blob/de06c42bd985fb66b6a49c907aaf5baee693bc7b/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md +#tag: package-2023-06-preview output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -20,7 +21,29 @@ modelerfour: #mgmt-debug: # show-serialized-names: true - +rename-mapping: + AgentProfile: FleetAgentProfile + APIServerAccessProfile: FleetApiServerAccessProfile + Fleet: DatabaseFleet + FleetListResult: DatabaseFleetListResult + FleetMember: DatabaseFleetMember + FleetMemberListResult: DatabaseFleetMemberListResult + ManagedClusterUpdate: FleetManagedClusterUpdate + ManagedClusterUpgradeSpec: FleetManagedClusterUpgradeSpec + ManagedClusterUpgradeType: FleetManagedClusterUpgradeType + MemberUpdateStatus.clusterResourceId: -|arm-id + UpdateGroup: FleetUpdateGroup + UpdateGroupStatus: FleetUpdateGroupStatus + UpdateRun: DatabaseFleetUpdateRun + UpdateRunListResult: DatabaseFleetUpdateRunListResult + UpdateRunProvisioningState: FleetUpdateRunProvisioningState + UpdateRunStatus: FleetUpdateRunStatus + UpdateRunStrategy: FleetUpdateRunStrategy + UpdateStage: FleetUpdateStage + UpdateStageStatus: FleetUpdateStageStatus + UpdateState: FleetUpdateState + UpdateStatus: FleetUpdateOperationStatus + WaitStatus: FleetWaitStatus format-by-name-rules: 'tenantId': 'uuid'